Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SourceMeasure

The Source Measure represents the source data of a unique measure, including all instruments with their staves. There exists one source measure per XML measure or per paper sheet measure (e.g. the source measures are not doubled in repetitions)

Hierarchy

Index

Constructors

constructor

  • new SourceMeasure(completeNumberOfStaves: number): SourceMeasure

Properties

Private absoluteTimestamp

absoluteTimestamp: Fraction

Private breakSystemAfter

breakSystemAfter: boolean

Private completeNumberOfStaves

completeNumberOfStaves: number

Private duration

duration: Fraction

endsPiece

endsPiece: boolean

The measure number for showing on the music sheet. Typically starts with 1.

Private firstInstructionsStaffEntries

firstInstructionsStaffEntries: SourceStaffEntry[]

Private firstRepetitionInstructions

firstRepetitionInstructions: RepetitionInstruction[] = []

Private implicitMeasure

implicitMeasure: boolean

Protected instanceId

instanceId: string

Private lastInstructionsStaffEntries

lastInstructionsStaffEntries: SourceStaffEntry[]

Private lastRepetitionInstructions

lastRepetitionInstructions: RepetitionInstruction[] = []

measureListIndex

measureListIndex: number

The unique measure list index starting with 0.

Private measureNumber

measureNumber: number

Private staffLinkedExpressions

staffLinkedExpressions: MultiExpression[] = []

Private staffMeasureErrors

staffMeasureErrors: boolean[] = []

Private tempoExpressions

tempoExpressions: MultiTempoExpression[] = []

Private verticalSourceStaffEntryContainers

verticalSourceStaffEntryContainers: VerticalSourceStaffEntryContainer[] = []

Accessors

AbsoluteTimestamp

  • get AbsoluteTimestamp(): Fraction
  • set AbsoluteTimestamp(value: Fraction): void

BreakSystemAfter

  • get BreakSystemAfter(): boolean
  • set BreakSystemAfter(value: boolean): void

CompleteNumberOfStaves

  • get CompleteNumberOfStaves(): number

Duration

FirstInstructionsStaffEntries

FirstRepetitionInstructions

ImplicitMeasure

  • get ImplicitMeasure(): boolean
  • set ImplicitMeasure(value: boolean): void

LastInstructionsStaffEntries

LastRepetitionInstructions

MeasureNumber

  • get MeasureNumber(): number
  • set MeasureNumber(value: number): void

StaffLinkedExpressions

TempoExpressions

VerticalSourceStaffEntryContainers

Methods

beginsWithLineRepetition

  • beginsWithLineRepetition(): boolean

beginsWithWordRepetition

  • beginsWithWordRepetition(): boolean

calculateInstrumentsDuration

checkForEmptyVerticalContainer

  • checkForEmptyVerticalContainer(index: number): void

endsWithLineRepetition

  • endsWithLineRepetition(): boolean

endsWithWordRepetition

  • endsWithWordRepetition(): boolean

findOrCreateStaffEntry

  • findOrCreateStaffEntry(inMeasureTimestamp: Fraction, inSourceMeasureStaffIndex: number, staff: Staff): object

findOrCreateVoiceEntry

getEntriesPerStaff

getErrorInMeasure

  • getErrorInMeasure(staffIndex: number): boolean

getKeyInstruction

Private getLastSourceStaffEntryForInstrument

  • getLastSourceStaffEntryForInstrument(instrumentIndex: number): SourceStaffEntry

getNextMeasure

getPreviousMeasure

getPreviousSourceStaffEntryFromIndex

  • getPreviousSourceStaffEntryFromIndex(verticalIndex: number, horizontalIndex: number): SourceStaffEntry

getVerticalContainerByTimestamp

getVerticalContainerIndexByTimestamp

  • getVerticalContainerIndexByTimestamp(musicTimestamp: Fraction): number

hasBeginInstructions

  • hasBeginInstructions(): boolean

reverseCheck

  • This method is used for handling a measure with the following error (in the procedure of finding out the Instrument's Duration): If the LastStaffEntry is missing (implied restNote or error), then go back the StaffEntries until you find a TiedNote (tie Start), which gives the correct MeasureDuration.

    Parameters

    Returns Fraction

setErrorInStaffMeasure

  • setErrorInStaffMeasure(staffIndex: number, hasError: boolean): void

toString

  • toString(): string

Generated using TypeDoc