OpenSheetMusicDisplay
    Preparing search index...

    Class MusicSystemBuilder

    Index

    Constructors

    Properties

    activeClefs: ClefInstruction[]
    activeKeys: KeyInstruction[]
    activeRhythm: RhythmInstruction[]
    currentSystemParams: SystemBuildParameters
    globalSystemIndex: number = 0
    graphicalMusicSheet: GraphicalMusicSheet
    leadSheet: boolean = false
    measureList: GraphicalMeasure[][]
    measureListIndex: number
    musicSystems: MusicSystem[] = []
    numberOfVisibleStaffLines: number
    visibleStaffIndices: number[]

    Does the mapping from the currently visible staves to the global staff-list of the music sheet.

    Methods

    • If a line repetition is ending and a new line repetition is starting at the end of the system, the double repetition line has to be split into two: one at the currently ending system and one at the next system. (this should be refactored at some point to not use a combined end/start line but always separated lines)

      Returns void

    • Calculate the width needed for Instructions (Key, Clef, Rhythm, Repetition) for the measure.

      Parameters

      • measures: GraphicalMeasure[]
      • isSystemFirstMeasure: boolean
      • isFirstSourceMeasure: boolean

      Returns number

    • Calculate the X ScalingFactor in order to strech the whole System.

      Parameters

      • systemFixWidth: number
      • systemVarWidth: number

      Returns number

    • If the last [[MusicSystem]] doesn't need stretching, then this method decreases the System's Width, the [[StaffLine]]'s Width and the 5 [[StaffLine]]s length.

      Returns void

    • When the actual source measure doesn't fit any more, this method finalizes the current system and opens up a new empty system, where the actual measure will be added in the next iteration.

      Parameters

      • measures: GraphicalMeasure[]
      • systemEndsPart: boolean = false
      • checkExtraInstructionMeasure: boolean = true
      • startNewPage: boolean = false

      Returns void

    • Snaps a system's y position (in units) so that its staff lines render as crisp single pixel rows: the lines are 1px wide (at zoom 1), so their centers need to lie at half-pixel positions (a line centered between two pixel rows is anti-aliased over both at half opacity instead). The stafflines within the system share the same sub-pixel phase (see optimizeDistanceBetweenStaffLines), so snapping the system y aligns all of them. Shifts the system by at most half a pixel. No-op if EngravingRules.SnapStafflinesToCrispPixels is off.

      Parameters

      Returns number