Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MusicSheetCalculator Abstract

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

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

abstractNotImplementedErrorMessage: string = "abstract, not implemented"
dynamicExpressionMap: Map<number, BoundingBox> = ...
graphicalLyricWords: GraphicalLyricWord[] = []
graphicalMusicSheet: GraphicalMusicSheet
musicSystems: MusicSystem[]
staffEntriesWithChordSymbols: GraphicalStaffEntry[] = []
staffEntriesWithGraphicalTies: GraphicalStaffEntry[] = []
staffEntriesWithOrnaments: GraphicalStaffEntry[] = []
staffLinesWithLyricWords: StaffLine[] = []
stafflineNoteCalculator: IStafflineNoteCalculator
textMeasurer: ITextMeasurer
transposeCalculator: ITransposeCalculator

Accessors

  • get leadSheet(): boolean

Methods

  • calcGraphicalRepetitionEndingsRecursively(repetition: Repetition): void
  • calculate(): void
  • calculateChordSymbols(): void
  • calculateComments(): void
  • calculateDashes(staffLine: StaffLine, startX: number, endX: number, y: number): void
  • calculateDynamicExpressions(): void
  • calculateDynamicExpressionsForMultiExpression(multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void
  • calculateExpressionAlignements(): void
  • calculateFingerings(): void
  • calculateGlissandi(): void
  • calculateLyricsPosition(): void
  • calculateMarkedAreas(): void
  • calculateMeasureNumberPlacement(musicSystem: MusicSystem): void
  • calculateMeasureNumberSkyline(musicSystem: MusicSystem): void
  • calculateMeasureWidthFromStaffEntries(measuresVertical: GraphicalMeasure[], oldMinimumStaffEntriesWidth: number): number
  • 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: GraphicalMeasure[]

      The minimum required x width of the source measure

    Returns number

  • calculateMoodAndUnknownExpression(multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void
  • calculateMoodAndUnknownExpressions(): void
  • calculateMusicSystems(): void
  • calculateOctaveShifts(): void
  • calculateOrnaments(): void
  • calculatePedals(): void
  • calculateRehearsalMarks(): void
  • calculateRepetitionEndings(): void
  • calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote(graphicalStaffEntry: GraphicalStaffEntry): void
  • calculateRightAndLeftDashesForLyricWord(staffLine: StaffLine, startX: number, endX: number, y: number): number
  • calculateSheetLabelBoundingBoxes(): void
  • calculateSingleDashForLyricWord(staffLine: StaffLine, startX: number, endX: number, y: number): void
  • calculateSingleLyricWordWithUnderscore(staffLine: StaffLine, startX: number, endX: number, y: number): void
  • calculateSingleOctaveShift(sourceMeasure: SourceMeasure, multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void
  • calculateSinglePedal(sourceMeasure: SourceMeasure, multiExpression: MultiExpression, measureIndex: number, staffIndex: number): void
  • calculateSkyBottomLines(): void
  • calculateSlurs(): void
  • calculateStaffEntryArticulationMarks(): void
  • calculateStemDirectionFromVoices(voiceEntry: VoiceEntry): void
  • Calculates the desired stem direction depending on the number (or type) of voices. If more than one voice is there, the main voice (typically the first or upper voice) will get stem up direction. The others get stem down direction.

    Parameters

    • voiceEntry: VoiceEntry

      the voiceEntry for which the stem direction has to be calculated

    Returns void

  • calculateTempoExpressions(): void
  • calculateTempoExpressionsForMultiTempoExpression(sourceMeasure: SourceMeasure, multiTempoExpression: MultiTempoExpression, measureIndex: number): void
  • calculateTieCurves(): void
  • calculateTupletNumbers(): void
  • calculateTwoRestNotesPlacementWithCollisionDetection(graphicalStaffEntry: GraphicalStaffEntry): void
  • calculateVerticalContainersList(): void
  • calculateWordRepetitionInstruction(repetitionInstruction: RepetitionInstruction, measureIndex: number): void
  • calculateWordRepetitionInstructions(): void
  • calculateXLayout(graphicalMusicSheet: GraphicalMusicSheet, maxInstrNameLabelLength: number): void
  • checkMeasuresForWholeRestNotes(): void
  • 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

  • clearSystemsAndMeasures(): void
  • createGraphicalTies(): void
  • createMetronomeMark(metronomeExpression: InstantaneousTempoExpression): void
  • formatMeasures(): void
  • getFirstLeftNotNullStaffEntryFromContainer(horizontalIndex: number, verticalIndex: number, multiStaffInstrument: boolean): GraphicalStaffEntry
  • getFirstRightNotNullStaffEntryFromContainer(horizontalIndex: number, verticalIndex: number, multiStaffInstrument: boolean): GraphicalStaffEntry
  • getRelativePositionInStaffLineFromTimestamp(timestamp: Fraction, verticalIndex: number, staffLine: StaffLine, multiStaffInstrument: boolean, firstVisibleMeasureRelativeX?: number, useLeftStaffEntryBorder?: boolean): PointF2D
  • getRelativeXPositionFromTimestamp(timestamp: Fraction): number
  • handleStaffEntries(staffIsPercussionArray: boolean[]): void
  • handleTie(tie: Tie, startGraphicalStaffEntry: GraphicalStaffEntry, staffIndex: number, measureIndex: number): void
  • initGraphicalMeasuresCreation(): void
  • layoutGraphicalTie(tie: GraphicalTie, tieIsAtSystemBreak: boolean, isTab: boolean): void
  • maxInstrNameLabelLength(): number
  • optimizeRestPlacement(): void
  • prepareGraphicalMusicSheet(): void
  • setBeamNotesWantedStemDirections(voiceEntry: VoiceEntry): void
  • setIndicesToVerticalGraphicalContainers(): void
  • updateStaffLineBorders(staffLine: StaffLine): void
  • setMeasuresMinStaffEntriesWidth(measures: GraphicalMeasure[], minimumStaffEntriesWidth: number): void

Generated using TypeDoc