OpenSheetMusicDisplay
    Preparing search index...

    Class Note

    Represents a single pitch with a duration (length)

    Index

    Constructors

    Properties

    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
    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.

    Accessors

    Methods

    • 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 keep such a note's beam and stem rendered (the stem still emanates from the shared notehead and joins the beam) instead of dropping it. 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).

      Returns boolean