Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a single pitch with a duration (length)

Hierarchy

  • Note

Index

Constructors

Properties

DotsXml: number
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.

StringInstruction: TechnicalInstruction
TransposedPitch: Pitch

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

TremoloInfo: TremoloInfo

The number of tremolo strokes this note has (16th tremolo = 2 strokes). Could be a Tremolo object in future when there is more data like tremolo between two notes.

arpeggio: Arpeggio

The Arpeggio this note is part of.

beam: Beam
displayOctaveUnpitched: number
displayStepUnpitched: NoteEnum
glissando: Glissando
halfTone: number

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

isCueNote: boolean

States whether this is a cue note (Stichnote) (smaller size).

isRestFlag: boolean
length: Fraction
normalNotes: number

The amount of notes the tuplet of this note (if there is one) replaces.

noteTypeXml: NoteType

The NoteType given in the XML, e.g. quarter, which can be a normal quarter or tuplet quarter -> can have different length/fraction

notehead: Notehead = undefined
noteheadColor: string

Color of the notehead currently set/desired for next render. RGB Hexadecimal, like #00FF00. Needs to be stored here and not in Note.Notehead, because Note.Notehead is undefined for normal Noteheads to save space and time.

noteheadColorCurrentlyRendered: string
noteheadColorXml: string

Color of the notehead given in the XML Notehead tag. RGB Hexadecimal, like #00FF00. This should not be changed, instead noteheadColor is used and modifiable for Rendering. Needs to be stored here and not in Note.Notehead, because Note.Notehead is undefined for normal Noteheads to save space and time.

parentStaffEntry: SourceStaffEntry
pitch: Pitch

The untransposed (!!!) source data.

playbackInstrumentId: string = undefined
printObject: boolean = true

States whether the note should be displayed. False if xmlNode.attribute("print-object").value = "no".

slurs: Slur[] = []
sourceMeasure: SourceMeasure
state: NoteState
stemColorXml: string

Color of the stem given in the XML Stem tag. RGB Hexadecimal, like #00FF00. This is not used for rendering, which takes VoiceEntry.StemColor. It is merely given in the note's stem element in XML and stored here for reference. So, to read or change the stem color of a note, modify note.ParentVoiceEntry.StemColor.

stemDirectionXml: StemDirectionType

The stem direction asked for in XML. Not necessarily final or wanted stem direction.

tie: Tie
tuplet: Tuplet
typeLength: Fraction

The length/duration given in the tag. different from length for tuplets/tremolos.

voiceEntry: VoiceEntry

Accessors

  • get IsCueNote(): boolean
  • set IsCueNote(value: boolean): void
  • get NormalNotes(): number
  • set NormalNotes(value: number): void
  • get NoteAsString(): string
  • get NoteBeam(): Beam
  • set NoteBeam(value: Beam): void
  • get NoteSlurs(): Slur[]
  • set NoteSlurs(value: Slur[]): void
  • get NoteTie(): Tie
  • set NoteTie(value: Tie): void
  • get NoteheadColor(): string
  • set NoteheadColor(value: string): void
  • get NoteheadColorCurrentlyRendered(): string
  • set NoteheadColorCurrentlyRendered(value: string): void
  • get NoteheadColorXml(): string
  • set NoteheadColorXml(value: string): void
  • get PlaybackInstrumentId(): string
  • set PlaybackInstrumentId(value: string): void
  • get PrintObject(): boolean
  • set PrintObject(value: boolean): void
  • get StemColorXml(): string
  • set StemColorXml(value: string): void
  • get ToStringShortGet(): string
  • get TremoloStrokes(): number

Methods

  • ToString(): string
  • ToStringShort(octaveOffset?: number): string
  • hasTabEffects(): boolean
  • isDuplicateSlur(slur: Slur): boolean
  • isRest(): boolean
  • isWholeMeasureNote(): boolean
  • isWholeRest(): 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

Generated using TypeDoc