Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SuiScoreViewOperations

MVVM-like operations on the displayed score.

All operations that can be performed on a 'live' score go through this module. It maps the score view to the actual score and makes sure the model and view stay in sync.

Because this object operates on the current selections, all operations return promise so applications can wait for the operation to complete and update the selection list.

Hierarchy

Index

Constructors

Accessors

Methods

Constructors

Accessors

  • get defaultStaffMap(): number[]
  • Show all staves, 1:1 mapping of view score staff to stored score staff

    Returns number[]

Methods

  • _getEquivalentStaff(staffId: number): number
  • _mapPartFormatting(): void
  • _renderChangedMeasures(measureSelections: SmoSelection[]): void
  • _setTransposing(): void
  • _undoColumn(label: string, measureIndex: number): 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[]
  • accelerando(): Promise<void>
  • addEnding(): Promise<void>
  • addGraceNote(): Promise<void>
  • addKeySignature(keySignature: string): Promise<void>
  • addMeasure(append: boolean): Promise<void>
  • addMeasures(append: boolean, numberToAdd: number): Promise<void>
  • advanceModifierSelection(keyEv: KeyEvent): Promise<any>
  • beamSelections(): Promise<void>
  • changeScore(score: SmoScore): Promise<any>
  • collapseChord(): Promise<void>
  • copy(): Promise<void>
  • crescendo(): Promise<void>
  • crescendoBracket(): Promise<void>
  • decrescendo(): Promise<void>
  • deleteMeasure(): Promise<any>
  • deleteNote(): Promise<void>
  • we never really delete a note, but we will convert it into a rest and if it's already a rest we will try to hide it. Operates on current selections

    Returns Promise<void>

  • depopulateVoice(): Promise<void>
  • dimenuendo(): Promise<void>
  • getFocusedPage(): number
  • groupUndo(val: boolean): void
  • growSelectionLeft(): Promise<any>
  • growSelectionRight(): Promise<any>
  • growSelectionRightMeasure(): Promise<any>
  • intersectingArtifact(evData: SvgBox): Promise<any>
  • isPartExposed(): boolean
  • loadRemoteJson(url: string): Promise<any>
  • loadRemoteScore(url: string): Promise<any>
  • loadRemoteXml(url: string): Promise<any>
  • load an mxml score remotely, return a promise that completes when the file is loaded

    Parameters

    • url: string

      where to find the xml file

    Returns Promise<any>

  • makeRest(): Promise<void>
  • makeTuplet(numNotes: number): Promise<void>
  • moveSelectionDown(): Promise<any>
  • moveSelectionLeft(): Promise<any>
  • moveSelectionLeftMeasure(): Promise<any>
  • moveSelectionPitchDown(): Promise<any>
  • moveSelectionPitchUp(): Promise<any>
  • moveSelectionRight(ev: KeyEvent): Promise<any>
  • moveSelectionRightMeasure(): Promise<any>
  • moveSelectionUp(): Promise<any>
  • moveStaffUpDown(index: number): Promise<void>
  • paste(): Promise<void>
  • playFromSelection(): void
  • populateVoice(index: number): Promise<void>
  • quickSave(): void
  • refreshViewport(): Promise<any>
  • removeGraceNote(): Promise<void>
  • The lyric editor moves around, so we can't depend on the tracker for the correct selection. We get it directly from the editor.

    Parameters

    • selector: SmoSelector

      the selector of the note with the lyric to remove

    • lyric: SmoLyric

      a copy of the lyric to remove. We use the verse, parser to identify it

    Returns Promise<void>

    render promise

  • removeStaff(): Promise<void>
  • removeSystemBreaks(): Promise<any>
  • removeTempo(measure: SmoMeasure, tempo: SmoTempoText, scoreMode: boolean, selectionMode: boolean): Promise<void>
  • renderPromise(): Promise<any>
  • ritard(): Promise<void>
  • selectSuggestion(evData: KeyEvent): Promise<any>
  • setChordFont(fontInfo: FontInfo): Promise<void>
  • setInterval(interval: number): Promise<void>
  • setLyricFont(fontInfo: FontInfo): Promise<void>
  • setMappedStaffIds(): void
  • setNoteHead(head: string): Promise<void>
  • Add a pitch to the score at the cursor. This tries to find the best pitch to match the letter key (F vs F# for instance) based on key and surrounding notes

    Parameters

    Returns Promise<void>

  • setPitchPiano(pitch: Pitch, chordPedal: boolean): Promise<void>
  • setPitchesPromise(pitches: PitchLetter[]): Promise<any>
  • setTimeSignature(timeSignature: TimeSignature, timeSignatureString: string): Promise<void>
  • showPiano(value: boolean): Promise<void>
  • slashGraceNotes(): Promise<void>
  • slur(): Promise<void>
  • startRenderingEngine(): void
  • tie(): Promise<void>
  • toggleArticulation(modifier: string, ctor: string): Promise<void>
  • toggleBeamDirection(): Promise<void>
  • toggleBeamGroup(): Promise<void>
  • toggleCourtesyAccidentals(): Promise<void>
  • toggleEnharmonic(): Promise<void>
  • toggleRehearsalMark(): Promise<void>
  • toggleSlash(): Promise<void>
  • transposeSelections(offset: number): Promise<void>
  • undo(): void
  • unmakeTuplet(): Promise<void>
  • updatePromise(): Promise<any>
  • updateTempoScore(measure: SmoMeasure, tempo: SmoTempoText, scoreMode: boolean, selectionMode: boolean): Promise<void>
  • 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