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

  • SourceMeasure

Index

Constructors

constructor

  • new SourceMeasure(completeNumberOfStaves: number): SourceMeasure
  • The data entries and data lists will be filled with null values according to the total number of staves, so that existing objects can be referred to by staff index.

    Parameters

    • completeNumberOfStaves: number

    Returns SourceMeasure

Properties

Private absoluteTimestamp

absoluteTimestamp: Fraction

Private activeTimeSignature

activeTimeSignature: Fraction

Private breakSystemAfter

breakSystemAfter: boolean

Private completeNumberOfStaves

completeNumberOfStaves: number

Private duration

duration: Fraction

endingBarStyleEnum

endingBarStyleEnum: SystemLinesEnum

endingBarStyleXml

endingBarStyleXml: string

The style of the ending bar line.

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 graphicalMeasureErrors

graphicalMeasureErrors: boolean[] = []

Private implicitMeasure

implicitMeasure: boolean

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 tempoExpressions

tempoExpressions: MultiTempoExpression[] = []

Private tempoInBPM

tempoInBPM: number

Private verticalMeasureList

verticalMeasureList: GraphicalMeasure[]

Private verticalSourceStaffEntryContainers

verticalSourceStaffEntryContainers: VerticalSourceStaffEntryContainer[] = []

Accessors

AbsoluteTimestamp

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

ActiveTimeSignature

  • get ActiveTimeSignature(): Fraction
  • set ActiveTimeSignature(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

TempoInBPM

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

VerticalMeasureList

VerticalSourceStaffEntryContainers

Methods

beginsRepetitionEnding

  • beginsRepetitionEnding(): boolean

beginsWithLineRepetition

  • beginsWithLineRepetition(): boolean

beginsWithWordRepetition

  • beginsWithWordRepetition(): boolean

calculateInstrumentsDuration

checkForEmptyVerticalContainer

  • checkForEmptyVerticalContainer(index: number): void

endsRepetitionEnding

  • endsRepetitionEnding(): boolean

endsWithLineRepetition

  • endsWithLineRepetition(): boolean

endsWithWordRepetition

  • endsWithWordRepetition(): boolean

findOrCreateStaffEntry

  • findOrCreateStaffEntry(inMeasureTimestamp: Fraction, inSourceMeasureStaffIndex: number, staff: Staff): { createdNewContainer: boolean; staffEntry: SourceStaffEntry }

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

setErrorInGraphicalMeasure

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

Generated using TypeDoc