OpenSheetMusicDisplay
    Preparing search index...

    Class Note

    Represents a single pitch with a duration (length)

    Hierarchy (View Summary)

    Index
    AccidentalBracketXml: boolean

    Whether the accidental given in XML is in brackets (), e.g. an editorial accidental. Drawn in parentheses, see VexFlowConverter.StaveNote().

    AccidentalParenthesesXml: boolean

    Whether the accidental given in XML is in parentheses (), usually a cautionary (courtesy) accidental. Drawn in parentheses, see VexFlowConverter.StaveNote().

    CustomNoteheadVFCode: string

    Custom notehead vexflow code. E.g. "vb" = quarter, "v1d" = whole, "v53" = half, etc. - see tables.js Set this before render() (e.g. after load, before first render).

    displayOctaveUnpitched: number
    displayStepUnpitched: NoteEnum
    DotsXml: number
    halfTone: number

    The transposed (!!!) HalfTone of this note.

    IsGraceNote: boolean
    IsWholeMeasureRest: boolean
    NoteToGraphicalNoteObjectId: number

    Used by GraphicalNote.FromNote(note) and osmd.rules.GNote(note) to get a GraphicalNote from a Note. Note that we don't want the data model (Note) to be dependent on the graphical implementation (GraphicalNote), and have (potentially circular) import dependencies of graphical parts, which also applies to other non-graphical classes. That's why we don't save a GraphicalNote reference directly in Note.

    NoteTuplets: Tuplet[] = []

    All tuplets this note is part of, from outermost to innermost (for nested tuplets). Usually a single tuplet. NoteTuplet stays the innermost one for backwards compatibility; this list adds the enclosing tuplet(s).

    state: NoteState
    StringInstruction: TechnicalInstruction
    TieStopWithoutStartDirection: PlacementEnum

    If the note ends a tie that has no start note, e.g. the first note of a second ending (volta), tied from the note before the first ending (#713): the direction of that tie, given in the MusicXML (PlacementEnum.NotYetDefined if none). Undefined if there is no such tie. The tie is drawn into the note from the left, like the part of a tie continued in the next system.

    TransposedPitch: Pitch

    The transposed pitch, if the score is transposed, otherwise undefined.

    TremoloInfo: TremoloInfo

    Tremolo information for this note, e.g. the number of tremolo strokes (16th tremolo = 2 strokes), or the TremoloBetweenNotes object for a tremolo between two notes.

    • get NoteTies(): readonly Tie[]

      All ties/techniques containing this note. A technique endpoint can also start a sustain. NoteTie returns the tie added last; graphical tie creation uses this complete list. Clearing NoteTie also clears these memberships for outgoing graphical tie creation.

      Returns readonly Tie[]

    • Whether the note is drawn: it's not hidden (PrintObject), or EngravingRules.RenderHiddenNotes draws hidden notes too, and its voice isn't hidden in its shown instrument (Voice.isHiddenInShownInstrument(), not drawn with RenderHiddenNotes either). The notes of a hidden instrument stay visible: the instrument isn't drawn as a whole. Use this instead of PrintObject to decide what to draw. This doesn't change with GraphicalNote.setVisible(): GraphicalNote.isVisible() also checks that.

      Returns boolean

    • Note: May be dangerous to use if ParentStaffEntry.VerticalContainerParent etc is not set. better calculate this directly when you have access to the note's measure. whole rest: length = measure length. (4/4 in a 4/4 time signature, 3/4 in a 3/4 time signature, 1/4 in a 1/4 time signature, etc.)

      Returns boolean

    • Whether this note's own notehead is hidden (e.g. print-object="no" or notehead "none") but there is a visible note on the same staff line in another voice at the same staff entry - i.e. a unison whose visible notehead this note shares. Used to render such a note like a visible one instead of dropping it: its beam and stem (the stem still emanates from the shared notehead and joins the beam), the notehead Vexflow lays out beside the visible one wherever the two heads can't be merged into one column (VexFlowVoiceEntry.drawnAsSharedUnisonNote), and its place in a tuplet, whose number spans it either way. E.g. an eighth note sharing a notehead with a dotted quarter in Beethoven's Moonlight Sonata 1st mvt. m.37 (test_unison_notehead_moonlight_sonata_measure37), or the first note of a triplet sharing a half note's notehead in Debussy's Arabesque no. 1 m.3 (test_unison_notehead_tuplet_arabesque_measure3).

      Returns boolean

    • The visible note in another voice whose notehead this note shares (see sharesNoteheadWithVisibleUnisonNote), or undefined if this note's own notehead is visible or there is no such note. A note of a hidden voice (Voice.isHiddenInShownInstrument()) shares none: it isn't drawn at all, not even its stem, beam or tie at another voice's notehead.

      Returns Note