Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StaffMeasure

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

Hierarchy

Index

Constructors

constructor

Properties

beginInstructionsWidth

beginInstructionsWidth: number

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

Protected boundingBox

boundingBox: BoundingBox

endInstructionsWidth

endInstructionsWidth: number

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

Protected firstInstructionStaffEntry

firstInstructionStaffEntry: GraphicalStaffEntry

hasError

hasError: boolean

Protected lastInstructionStaffEntry

lastInstructionStaffEntry: GraphicalStaffEntry

Private measureNumber

measureNumber: number = -1

minimumStaffEntriesWidth

minimumStaffEntriesWidth: number

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

parentMusicSystem

parentMusicSystem: MusicSystem

parentSourceMeasure

parentSourceMeasure: SourceMeasure

Private parentStaff

parentStaff: Staff

Private parentStaffLine

parentStaffLine: StaffLine

staffEntries

staffEntries: GraphicalStaffEntry[]

staffEntriesScaleFactor

staffEntriesScaleFactor: number

Will be set by music system builder while building systems.

Accessors

FirstInstructionStaffEntry

LastInstructionStaffEntry

MeasureNumber

  • get MeasureNumber(): number

ParentStaff

  • get ParentStaff(): Staff

ParentStaffLine

PositionAndShape

Methods

addClefAtBegin

addClefAtEnd

addGraphicalStaffEntry

addGraphicalStaffEntryAtTimestamp

addKeyAtBegin

addRhythmAtBegin

beginsWithLineRepetition

  • beginsWithLineRepetition(): boolean

beginsWithWordRepetition

  • beginsWithWordRepetition(): boolean

endsWithLineRepetition

  • endsWithLineRepetition(): boolean

endsWithWordRepetition

  • endsWithWordRepetition(): boolean

findGraphicalStaffEntryFromTimestamp

findGraphicalStaffEntryFromVerticalContainerTimestamp

getGraphicalMeasureDurationFromStaffEntries

  • getGraphicalMeasureDurationFromStaffEntries(): Fraction

getLineWidth

hasMultipleVoices

  • hasMultipleVoices(): boolean

hasSameDurationWithSourceMeasureParent

  • hasSameDurationWithSourceMeasureParent(): boolean

isVisible

  • isVisible(): boolean

layoutSymbols

  • 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

  • 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

  • setPositionInStaffline(xPos: number): void

setWidth

  • setWidth(width: number): void

Generated using TypeDoc