OpenSheetMusicDisplay
    Preparing search index...

    Class MusicSheet

    This is the representation of a complete piece of sheet music. It includes the contents of a MusicXML file after the reading. Notes: the musicsheet might not need the Rules, e.g. in the testframework. The EngravingRules Constructor fails when no FontInfo exists, which needs a TextMeasurer

    Index
    IgnoreTempoInstructions: boolean = false

    Ignore tempo instructions like metronome numbers, e.g. because a bpm was set in the UI

    LyricLanguages: LyricLanguage[] = []

    The default languages of the lyrics. A lyric's own xml:lang comes first, see LyricsEntry.language.

    MeasureWidthFactor: number = 1.0

    Global factor / scale by which all measure widths will be scaled. (e.g. 0.7 = all measures are only 70% as long) This is similar to SourceMeasure.widthFactor, which only applies to one measure and is multiplicative to the global factor. (so if globalWidthFactor is 0.7 and measure.widthFactor is 0.7, that measure's length will be 49% as long) As with measure.widthFactor, use this with caution, as it can cause overlaps, especially with lyrics.

    pageWidth: number
    userStartTempoInBPM: number
    XmlColorAlphaLast: boolean = false

    Whether the MusicXML's 8-digit colors are #RRGGBBAA (alpha last) instead of the spec's #AARRGGBB. Set by the reader from : MuseScore exports them like that, see [[musicXmlColorsAreAlphaLast]].

    defaultTitle: string = "defaultTitle"
    • get DefaultStartTempoInBpm(): number

      The start tempo the file gives, in quarter notes per minute (e.g. 60 for a metronome mark half = 30 without a <sound tempo>). Setting it sets userStartTempoInBPM too.

      Returns number

    • set DefaultStartTempoInBpm(value: number): void

      Parameters

      • value: number

      Returns void

    • get Transpose(): number

      Returns number

    • set Transpose(value: number): void

      Sets the number of halftones for transposition. E.g. +1 halftone will transpose Eb major to E major. also see Instrument.Transpose (e.g. osmd.Sheet.Instruments[0].Transpose will additionally transpose this instrument only) osmd.TransposeCaculator needs to be defined/created for this to take effect. (just set it with new TransposeCalculator()) The next osmd.render() applies it (no need to call osmd.updateGraphic()).

      Parameters

      • value: number

      Returns void

    • The tempo at the start of the piece in quarter notes per minute, not the first later tempo instruction.

      Returns number

    • Parameters

      • staffIndexInMusicSheet: number

        The global staff index, iterating through all staves of all instruments.

      Returns Staff

    • Set to the index-given Repetition a new (set from user) value.

      Parameters

      • index: number
      • value: number

      Returns void