Class Score
· undefined - =100 The bpm for the score.
· undefined - =[4,4] Time signature for the score.
· undefined - =my_score Name for the score.
· voiceNames - =[] Array with the names of the voices in the score.
Constructor
constructor(__namedParameters: ScorePropsinterface ScorePropsnotation/ScoreProps = {})
Properties
Methods
static getMeasureSize(timeSignature: Arrayexternal Array<number>): number[src]
Returns the maximum size a measure has, calculated using the time signature.
· timeSignature - undefined
Throws
ErrorReturns
undefinedsetTimeSignature(timeSignature: [number, number]): void[src]
Set the score's time signature.
· timeSignature - undefined
deleteVoice(voiceName: string): boolean[src]
Deletes a voice from the score.
Throws
Error· voiceName - The name of the voice to delete.
Returns
undefinedaddNotes(
voiceName: string,
measureIndex: number,
position: number,
__namedParameters: MeasureDatainterface MeasureDatanotation/MeasureData
): boolean[src]measureIndex: number,
position: number,
__namedParameters: MeasureDatainterface MeasureDatanotation/MeasureData
Add notes to measure.
· voiceName - The voice name.
· measureIndex - The measure's index.
· position - Position in the measure.
· data - undefined
Returns
undefinedaddChord(
voiceName: string,
measureIndex: number,
position: number,
__namedParameters: MeasureDatainterface MeasureDatanotation/MeasureData
): boolean[src]measureIndex: number,
position: number,
__namedParameters: MeasureDatainterface MeasureDatanotation/MeasureData
Add chord to measure.
· voiceName - The voice name.
· measureIndex - The measure's index.
· position - Position in the measure.
· data - undefined
Returns
undefinedaddOperation(
operation: keyof Measureclass Measurenotation/Measure,
voiceName: string,
measureIndex: number,
position: number,
data: unknown
): boolean[src]voiceName: string,
measureIndex: number,
position: number,
data: unknown
Private function to handle addition operations. Should not be called.
· operation - Operation to execute.
· voiceName - The voice name.
· measureIndex - The measure's index.
· position - Position in the measure.
· data - undefined
Returns
undefineddeleteOperation(
operation: keyof Measureclass Measurenotation/Measure,
voiceName: string,
measureIndex: number,
position: number,
data: unknown
): boolean[src]voiceName: string,
measureIndex: number,
position: number,
data: unknown
Private function to handle deletion operations. Should not be called.
· operation - Operation to execute.
· voiceName - The voice name.
· measureIndex - The measure's index.
· position - Position in the measure.
· data - undefined
Returns
undefinedclearMeasure(): boolean[src]
Clears a measure.
· voiceName - The voice name.
· measureIndex - The measure index.
Returns
undefinedcloneMeasure(): boolean[src]
Clones a measure inside a voice and adds the clone next to the original measure.
· voiceName - The voice name.
· measureIndex - The measure index.