Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GraphicalMeasure Abstract

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

Hierarchy

Index

Constructors

Properties

ExtraGraphicalMeasurePreviousMeasure: GraphicalMeasure
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.

ShowKeySignature: boolean = true
ShowTimeSignature: boolean = true
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.

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.

isTabMeasure: boolean = false
lastInstructionStaffEntry: GraphicalStaffEntry
measureNumber: number = -1
minimumStaffEntriesWidth: number

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

parentMusicSystem: MusicSystem
parentSourceMeasure: SourceMeasure
parentStaff: Staff
parentStaffLine: StaffLine
staffEntries: GraphicalStaffEntry[]
staffEntriesScaleFactor: number

Will be set by music system builder while building systems.

Accessors

  • get MeasureNumber(): number

Methods

  • beginsWithLineRepetition(): boolean
  • beginsWithWordRepetition(): boolean
  • endsWithLineRepetition(): boolean
  • endsWithWordRepetition(): boolean
  • getGraphicalMeasureDurationFromStaffEntries(): Fraction
  • getTransposedHalftones(): number
  • hasMultipleVoices(): boolean
  • hasSameDurationWithSourceMeasureParent(): boolean
  • isInstanceOfClass(className: string): boolean
  • isLowerStaffOfInstrument(): boolean
  • isPianoLeftHand(): boolean
  • isPianoRightHand(): boolean
  • isUpperStaffOfInstrument(): boolean
  • isVisible(): boolean
  • layoutSymbols(): void
  • 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

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

  • setPositionInStaffline(xPos: number): void
  • setWidth(width: number): void

Generated using TypeDoc