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

    Constructors

    Properties

    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
    defaultTitle: string = "defaultTitle"

    Accessors

    • 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())

      Parameters

      • value: number

      Returns void

    Methods

    • Return a sourceMeasureList, where the given indices correspond to the whole SourceMeasureList of the MusicSheet.

      Parameters

      • start: number
      • end: number

      Returns SourceMeasure[]

    • 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