OpenSheetMusicDisplay
    Preparing search index...

    Class GraphicalVoiceEntry

    The graphical counterpart of a [[VoiceEntry]].

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    boundingBox: BoundingBox
    GraceSlash: boolean
    noteHeadsCenterX: number

    The x of the centre of the column of note heads the notes are drawn in, relative to the voice entry like the positions of its notes: including the shift of all of them aside from another voice's notes, but not the shift of a single head beside the others (e.g. of a second in a chord), so the same for all notes of a chord. The column also has the heads of other voices that aren't moved aside from them, e.g. of a whole note beside a quarter note: its centre is that of the widest head. The fingerings of the notes are centred on it (see MusicSheetCalculator.calculateFingerings()). Set with the positions of the notes (see VexFlowStaffEntry.positionNotesAtNoteHeads()), undefined e.g. for a rest.

    notes: GraphicalNote[]
    octaveShiftValue: OctaveEnum

    Contains octave shifts affecting this voice entry, caused by octave brackets.

    parentStaffEntry: GraphicalStaffEntry
    parentVoiceEntry: VoiceEntry

    Accessors

    Methods

    • Sort notes for vexflow (bottom to top), which needs them in the reverse order OSMD likes to have them. Note that sort() and reverse() replace the array in place, so to avoid changing the array one could copy it first, see sortedNotesCopyForVexflow() (commented), though copying the array is also unnecessary (time+memory) for now.

      Returns GraphicalNote[]