Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SmoScore

SmoScore is the container for the entire score: staves, measures, notes

Hierarchy

  • SmoScore

Index

Constructors

Methods

  • addDefaultMeasureWithNotes(measureIndex: number, parameters: SmoMeasureParams): void
  • Add a measure to the score with the supplied parameters at the supplied index. The defaults per staff may be different depending on the clef, key of the staff.

    Parameters

    Returns void

  • addMeasure(measureIndex: number): void
  • Give a measure prototype, create a new measure and add it to each staff, with the correct settings for current time signature/clef.

    Parameters

    • measureIndex: number

    Returns void

  • deleteMeasure(measureIndex: number): void
  • delete the measure at the supplied index in all the staves

    Parameters

    • measureIndex: number

    Returns void

  • getPrototypeMeasure(measureIndex: number, staffIndex: number): SmoMeasure
  • get a measure 'compatible' with the measure at the given index, in terms of key, time signature etc.

    Parameters

    • measureIndex: number
    • staffIndex: number

    Returns SmoMeasure

  • isMultimeasureRest(measureIndex: number, start: boolean, forceRest: boolean): boolean
  • determine if the measure at this index could be a multi-measure rest

    Parameters

    • measureIndex: number

      the measure index we are considering to add

    • start: boolean

      the measure index would be the start of the rest

    • forceRest: boolean

    Returns boolean

  • numberStaves(): void
  • serialize(): any
  • serializeColumnMapped(): {}
  • serialize the keySignature, tempo and time signature, which are mapped to a column at a measure index

    Returns {}

    • setNonTransposing(): void
    • If the score is switching from transposing to non-transposing, update the index and pitches. This logic assumes we are changing from transposing to non-transposing.

      Returns void

    • setTransposing(): void
    • If the part is a transposing part, remove the transposition from the notes/staff. This logic assumes the measures previously had transposeIndex set up by the instrument map.

      Returns void

    • updateMeasureFormats(): void
    • deserializeColumnMapped(scoreObj: any): void
    • Column-mapped attributes stay the same in each measure until changed, like key-signatures. We don't store each measure value to make the files smaller

      Parameters

      • scoreObj: any

        the json blob that contains the score data

      Returns void

    • upConvertLayout(jsonObj: any): void
    • Convert legacy score layout to layoutManager object parameters

      Parameters

      • jsonObj: any

      Returns void

    Generated using TypeDoc