OpenSheetMusicDisplay
    Preparing search index...

    Class GraphicalMeasureAbstract

    Represents a measure in the music sheet (one measure in one staff line)

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    beginInstructionsWidth: number

    The x-width of possibly existing: repetition start line, clef, key, rhythm.

    boundingBox: BoundingBox
    endInstructionsWidth: number

    The x-width of possibly existing: repetition end line, clef.

    ExtraGraphicalMeasurePreviousMeasure: GraphicalMeasure
    firstInstructionStaffEntry: GraphicalStaffEntry
    hasError: boolean
    hasOnlyRests: boolean = false

    Whether or not this measure is nothing but rest(s). Also see SourceMeasure.allRests, which is not the same, because a source measure can have multiple staffs/graphicalMeasures.

    InitiallyActiveClef: ClefInstruction

    The clef of the first note of the measure (the clef the measure starts with).

    IsExtraGraphicalMeasure: boolean

    Used to show key, rhythm changes at the end of the system, has MeasureNumber < 0, because never set.

    isTabMeasure: boolean = false
    lastInstructionStaffEntry: GraphicalStaffEntry
    minimumStaffEntriesWidth: number

    The minimum possible x-width of all staff entries without overlapping.

    parentSourceMeasure: SourceMeasure
    ShowKeySignature: boolean = true
    ShowTimeSignature: boolean = true
    staffEntries: GraphicalStaffEntry[]
    staffEntriesScaleFactor: number

    Will be set by music system builder while building systems.

    Accessors

    Methods

    • Check if the all the [[GraphicalMeasure]]'s [[StaffEntry]]s (their minimum Length) have the same duration with the [[SourceMeasure]].

      Returns boolean

    • This method is called after the StaffEntriesScaleFactor has been set. Here the final x-positions of the staff entries have to be set. (multiply the minimal positions with the scaling factor, considering the BeginInstructionsWidth).

      Returns void

    • Reset all the geometric values and parameters of this measure and put it in an initialized state. This is needed to evaluate a measure a second time by system builder.

      Returns void

    • Set the x-position relative to the staffline (y-Position is always 0 relative to the staffline).

      Parameters

      • xPos: number

      Returns void