OpenSheetMusicDisplay
    Preparing search index...

    Class TabNote

    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
    FretParentheses: boolean = false

    Whether the fret number is drawn in parentheses, from <notehead parentheses="yes">.

    FretVisible: boolean = true

    Whether the fret number is drawn: false when the <notations> with string and fret have print-object="no", e.g. for the end note of a bend from MuseScore (see VoiceGenerator).

    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.

    TransposedFretNumber: number

    The fret of the transposed note, undefined if the sheet isn't transposed (like Note.TransposedPitch), see TabFretTransposer.

    TransposedPitch: Pitch

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

    TransposedStringNumberTab: number

    The string of the transposed note, undefined if the sheet isn't transposed. It's the XML's string (StringNumberTab) unless the transposed note doesn't fit on that string, see TabFretTransposer.

    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 DisplayedFretNumber(): number

      The fret number that is drawn: the transposed one if the sheet is transposed, otherwise the XML's.

      Returns number

    • get DisplayedStringNumberTab(): number

      The string the fret number is drawn on: the transposed note's if the sheet is transposed, otherwise the XML's.

      Returns number

    • 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[]

    • get StringNumberTab(): number

      Returns the string number the note should be played on. Note there can also be violin string numbers in treble clef.

      Returns number

    • 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