Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MusicSheetCalculator

Class used to do all the calculations in a MusicSheet, which in the end populates a GraphicalMusicSheet.

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Protected graphicalMusicSheet

graphicalMusicSheet: GraphicalMusicSheet

Protected rules

Protected staffEntriesWithChordSymbols

staffEntriesWithChordSymbols: GraphicalStaffEntry[] = []

Protected staffEntriesWithGraphicalTies

staffEntriesWithGraphicalTies: GraphicalStaffEntry[] = []

Protected staffEntriesWithOrnaments

staffEntriesWithOrnaments: GraphicalStaffEntry[] = []

Protected staffLinesWithGraphicalExpressions

staffLinesWithGraphicalExpressions: StaffLine[] = []

Protected staffLinesWithLyricWords

staffLinesWithLyricWords: StaffLine[] = []

Protected symbolFactory

Static Protected textMeasurer

textMeasurer: ITextMeasurer

Static transposeCalculator

transposeCalculator: ITransposeCalculator

Accessors

Protected leadSheet

  • get leadSheet(): boolean

Static TextMeasurer

Methods

Protected calcGraphicalRepetitionEndingsRecursively

  • calcGraphicalRepetitionEndingsRecursively(repetition: Repetition): void

calculate

  • calculate(): void

Private calculateBeams

  • calculateBeams(): void

Protected calculateChordSymbols

  • calculateChordSymbols(): void

Protected calculateComments

  • calculateComments(): void

Private calculateDynamicExpressions

  • calculateDynamicExpressions(): void

Protected calculateDynamicExpressionsForSingleMultiExpression

  • calculateDynamicExpressionsForSingleMultiExpression(multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void

Private calculateLyricsPosition

  • calculateLyricsPosition(): void

Protected calculateMarkedAreas

  • calculateMarkedAreas(): void

Protected calculateMeasureNumberPlacement

  • calculateMeasureNumberPlacement(musicSystem: MusicSystem): void

Protected calculateMeasureXLayout

  • Calculates the x layout of the staff entries within the staff measures belonging to one source measure. All staff entries are x-aligned throughout all the measures.

    Parameters

    • measures: StaffMeasure[]

      The minimum required x width of the source measure

    Returns number

Protected calculateMoodAndUnknownExpression

  • calculateMoodAndUnknownExpression(multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void

Private calculateMoodAndUnknownExpressions

  • calculateMoodAndUnknownExpressions(): void

Protected calculateMusicSystems

  • calculateMusicSystems(): void

Private calculateOctaveShifts

  • calculateOctaveShifts(): void

Private calculateOrnaments

  • calculateOrnaments(): void

Protected calculatePageLabels

Private calculateRepetitionEndings

  • calculateRepetitionEndings(): void

Private calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote

  • calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote(graphicalStaffEntry: GraphicalStaffEntry): void

Protected calculateRestNotePlacementWithinGraphicalBeam

Protected calculateSheetLabelBoundingBoxes

  • calculateSheetLabelBoundingBoxes(): void

Protected calculateSingleOctaveShift

  • calculateSingleOctaveShift(sourceMeasure: SourceMeasure, multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void

Protected calculateSingleStaffLineLyricsPosition

  • calculateSingleStaffLineLyricsPosition(staffLine: StaffLine, lyricVersesNumber: number[]): void

Protected calculateSkyBottomLine

  • calculateSkyBottomLine(staffLine: StaffLine): void

Private calculateSkyBottomLines

  • calculateSkyBottomLines(): void

Protected calculateSlurs

  • calculateSlurs(): void

Private calculateStaffEntryArticulationMarks

  • calculateStaffEntryArticulationMarks(): void

Protected calculateSystemYLayout

  • calculateSystemYLayout(): void

Private calculateTempoExpressions

  • calculateTempoExpressions(): void

Protected calculateTempoExpressionsForSingleMultiTempoExpression

Private calculateTieCurves

  • calculateTieCurves(): void

Protected calculateTupletNumbers

  • calculateTupletNumbers(): void

Private calculateTwoRestNotesPlacementWithCollisionDetection

  • calculateTwoRestNotesPlacementWithCollisionDetection(graphicalStaffEntry: GraphicalStaffEntry): void

Private calculateVerticalContainersList

  • calculateVerticalContainersList(): void

Protected calculateWordRepetitionInstruction

  • calculateWordRepetitionInstruction(repetitionInstruction: RepetitionInstruction, measureIndex: number): void

Private calculateWordRepetitionInstructions

  • calculateWordRepetitionInstructions(): void

calculateXLayout

  • calculateXLayout(graphicalMusicSheet: GraphicalMusicSheet, maxInstrNameLabelLength: number): void

Protected checkMeasuresForWholeRestNotes

  • checkMeasuresForWholeRestNotes(): void

Private checkNoteForAccidental

Private checkVoiceEntriesForTechnicalInstructions

Protected clearRecreatedObjects

  • clearRecreatedObjects(): void
  • Delete all Objects that must be recalculated. If graphicalMusicSheet.reCalculate has been called, then this method will be called to reset or remove all flexible graphical music symbols (e.g. Ornaments, Lyrics, Slurs) graphicalMusicSheet will have MusicPages, they will have MusicSystems etc...

    Returns void

Protected clearSystemsAndMeasures

  • clearSystemsAndMeasures(): void

Private createAccidentalCalculators

Private createGraphicalMeasure

Private createGraphicalMeasuresForSourceMeasure

Protected createGraphicalTie

Protected createGraphicalTies

  • createGraphicalTies(): void

Private createStaffEntryForTieNote

Private getFirstLeftNotNullStaffEntryFromContainer

  • getFirstLeftNotNullStaffEntryFromContainer(horizontalIndex: number, verticalIndex: number, multiStaffInstrument: boolean): GraphicalStaffEntry

Private getFirstRightNotNullStaffEntryFromContainer

  • getFirstRightNotNullStaffEntryFromContainer(horizontalIndex: number, verticalIndex: number, multiStaffInstrument: boolean): GraphicalStaffEntry

Protected getRelativePositionInStaffLineFromTimestamp

  • getRelativePositionInStaffLineFromTimestamp(timestamp: Fraction, verticalIndex: number, staffLine: StaffLine, multiStaffInstrument: boolean, firstVisibleMeasureRelativeX?: number): PointF2D

Protected getRelativeXPositionFromTimestamp

  • getRelativeXPositionFromTimestamp(timestamp: Fraction): number

Protected handleBeam

Protected handleOpenTies

Private handleStaffEntries

  • handleStaffEntries(): void

Protected handleStaffEntryLink

Private handleTie

  • handleTie(tie: Tie, startGraphicalStaffEntry: GraphicalStaffEntry, staffIndex: number, measureIndex: number): void

Protected handleTiedGraphicalNote

Protected handleTuplet

Protected handleVoiceEntry

Protected handleVoiceEntryArticulations

Protected handleVoiceEntryGraceNotes

Protected handleVoiceEntryLyrics

Protected handleVoiceEntryOrnaments

Protected initStaffMeasuresCreation

  • initStaffMeasuresCreation(): void

initialize

Protected layoutArticulationMarks

Protected layoutBeams

Protected layoutGraphicalTie

  • layoutGraphicalTie(tie: GraphicalTie, tieIsAtSystemBreak: boolean): void

Protected layoutMeasureWithWholeRest

Protected layoutOrnament

Protected layoutSingleRepetitionEnding

  • layoutSingleRepetitionEnding(start: StaffMeasure, end: StaffMeasure, numberText: string, offset: number, leftOpen: boolean, rightOpen: boolean): void

Protected layoutStaffEntry

Protected layoutVoiceEntries

Protected layoutVoiceEntry

Protected maxInstrNameLabelLength

  • maxInstrNameLabelLength(): number

Protected optimizeRestNotePlacement

Private optimizeRestPlacement

  • optimizeRestPlacement(): void

Protected optimizeStaffLineDynamicExpressionsPositions

  • optimizeStaffLineDynamicExpressionsPositions(): void

prepareGraphicalMusicSheet

  • prepareGraphicalMusicSheet(): void

Protected resetYPositionForLeadSheet

Private setIndecesToVerticalGraphicalContainers

  • setIndecesToVerticalGraphicalContainers(): void

Protected staffMeasureCreatedCalculations

  • staffMeasureCreatedCalculations(measure: StaffMeasure): void

Protected updateSkyBottomLine

  • updateSkyBottomLine(staffLine: StaffLine): void

Private updateSkyBottomLines

  • updateSkyBottomLines(): void

Protected updateStaffLineBorders

  • updateStaffLineBorders(staffLine: StaffLine): void

Static Private addTieToTieTimestampsDict

  • addTieToTieTimestampsDict(tieTimestampListDict: Dictionary<Tie, Fraction[]>, note: Note): void

Static Private setMeasuresMinStaffEntriesWidth

  • setMeasuresMinStaffEntriesWidth(measures: StaffMeasure[], minimumStaffEntriesWidth: number): void

Generated using TypeDoc