Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Properties

Accessors

Methods

Constructors

Properties

IsSystemStartMeasure: boolean = false
MeasureNumberPrinted: number
MeasureNumberXML: number
RhythmPrinted: RhythmInstruction
WidthFactor: number = 1

The graphical measure width will be multiplied by this factor. E.g. factor 0.6 = 60% will make the measure only 60% as long as before. Note that this potentially causes issues by counteracting systems like lyrics overlap prevention, and if you give Vexflow too little width to render it will eventually cause other layout issues too. This factor is also read by a custom XML attribute osmdWidthFactor in the measure node, e.g. This will either be multiplicative with a sheet-wide widthFactor or override it, depending on settings. (TODO sheet-wide widthFactor not yet implemented)

absoluteTimestamp: Fraction
activeTimeSignature: Fraction
allRests: boolean = false

Whether the SourceMeasure only has rests, no other entries. Not the same as GraphicalMeasure.hasOnlyRests, because one SourceMeasure can have many GraphicalMeasures (staffs).

completeNumberOfStaves: number
duration: Fraction
endingBarStyleEnum: SystemLinesEnum
endingBarStyleXml: string

The style of the ending bar line.

firstInstructionsStaffEntries: SourceStaffEntry[]
firstRepetitionInstructions: RepetitionInstruction[] = []
graphicalMeasureErrors: boolean[] = []
hasEndClef: boolean
hasEndLine: boolean
hasLyrics: boolean = false
hasMoodExpressions: boolean = false
implicitMeasure: boolean
isReducedToMultiRest: boolean = false
lastInstructionsStaffEntries: SourceStaffEntry[]
lastRepetitionInstructions: RepetitionInstruction[] = []
measureListIndex: number

The unique measure list index starting with 0.

measureNumber: number
multipleRestMeasureNumber: number = 0

If this measure is a MultipleRestMeasure, this is the number of the measure in that sequence of measures.

multipleRestMeasures: number
printNewPageXml: boolean = false

Whether the MusicXML says to print a new page (page break). See OSMDOptions.newPageFromXML

printNewSystemXml: boolean = false

Whether the MusicXML says to print a new system (line break). See OSMDOptions.newSystemFromXML

rehearsalExpression: RehearsalExpression
staffLinkedExpressions: MultiExpression[][] = []
tempoExpressions: MultiTempoExpression[] = []
tempoInBPM: number
verticalMeasureList: GraphicalMeasure[]
verticalSourceStaffEntryContainers: VerticalSourceStaffEntryContainer[] = []

Accessors

  • get ActiveTimeSignature(): Fraction
  • set ActiveTimeSignature(value: Fraction): void
  • get CompleteNumberOfStaves(): number
  • get HasEndLine(): boolean
  • set HasEndLine(value: boolean): void
  • get ImplicitMeasure(): boolean
  • set ImplicitMeasure(value: boolean): void
  • get MeasureNumber(): number
  • set MeasureNumber(value: number): void
  • get StaffLinkedExpressions(): MultiExpression[][]
  • get TempoExpressions(): MultiTempoExpression[]
  • get TempoInBPM(): number
  • set TempoInBPM(value: number): void

Methods

  • beginsRepetitionEnding(): boolean
  • beginsWithLineRepetition(): boolean
  • beginsWithWordRepetition(): boolean
  • canBeReducedToMultiRest(): boolean
  • checkForEmptyVerticalContainer(index: number): void
  • endsRepetitionEnding(): boolean
  • endsWithLineRepetition(): boolean
  • endsWithWordRepetition(): boolean
  • findOrCreateStaffEntry(inMeasureTimestamp: Fraction, inSourceMeasureStaffIndex: number, staff: Staff): { createdNewContainer: boolean; staffEntry: SourceStaffEntry }
  • getErrorInMeasure(staffIndex: number): boolean
  • getLastSourceStaffEntryForInstrument(instrumentIndex: number, skipChordOnlyEntry?: boolean): SourceStaffEntry
  • getPreviousSourceStaffEntryFromIndex(verticalIndex: number, horizontalIndex: number): SourceStaffEntry
  • getPrintedMeasureNumber(): number
  • getVerticalContainerIndexByTimestamp(musicTimestamp: Fraction): number
  • hasBeginInstructions(): boolean
  • 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(staffIndex: number, hasError: boolean): void

Generated using TypeDoc