Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SuiScoreView Abstract

Base class for all operations on the rendered score. The base class handles the following:

  1. Undo and recording actions for the operation
  2. Maintain/change which staves in the score are displayed (staff map)
  3. Mapping between the displayed score and the data representation

Hierarchy

Index

Constructors

Accessors

  • get defaultStaffMap(): number[]

Methods

  • _getEquivalentStaff(staffId: number): number
  • Get the equivalent staff id from this.storeScore that maps to the displayed selector from this.score

    Parameters

    • staffId: number

    Returns number

  • _mapPartFormatting(): void
  • Parts have different formatting options from the parent score, indluding layout. Reset them when exposing a part.

    Returns void

  • _renderChangedMeasures(measureSelections: SmoSelection[]): void
  • _setTransposing(): void
  • _undoColumn(label: string, measureIndex: number): void
  • Create a rectangle undo, like a multiple columns but not necessarily the whole score.

    Parameters

    • label: string
    • measureIndex: number

    Returns void

  • _undoScore(label: string): void
  • _undoScorePreferences(label: string): void
  • _undoSelection(label: string, selection: SmoSelection): void
  • _undoSelections(label: string, selections: SmoSelection[]): void
  • _undoStaffModifier(label: string, staffModifier: StaffModifierBase, subtype: number): void
  • _undoTrackerMeasureSelections(label: string): SmoSelection[]
  • changeScore(score: SmoScore): Promise<any>
  • Exposes a part: hides non-part staves, shows part staves. Note this will reset the view. After this operation, staff 0 will be the selected part.

    Parameters

    Returns void

  • getFocusedPage(): number
  • groupUndo(val: boolean): void
  • isPartExposed(): boolean
  • refreshViewport(): Promise<any>
  • await on the full update of the score, also resetting the viewport (to reflect layout changes)

    Returns Promise<any>

  • renderPromise(): Promise<any>
  • setMappedStaffIds(): void
  • startRenderingEngine(): void
  • undo(): void
  • updatePromise(): Promise<any>
  • viewAll(): void
  • waitableAction(action: (() => void), repetition?: number): Promise<any>
  • This is used in some Smoosic demos and pens.

    Parameters

    • action: (() => void)

      any action, but most usefully a SuiScoreView method

        • (): void
        • Returns void

    • Optional repetition: number

      number of times to repeat, waiting on render promise between if not specified, defaults to 1

    Returns Promise<any>

    promise, resolved action has been completed and score is updated.

Generated using TypeDoc