Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Note

Represents a single pitch with a duration (length)

Hierarchy

  • Note

Index

Constructors

constructor

Properties

Private arpeggio

arpeggio: Arpeggio

The Arpeggio this note is part of.

Private beam

beam: Beam

halfTone

halfTone: number

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

Private isCueNote

isCueNote: boolean

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

Private length

length: Fraction

Private normalNotes

normalNotes: number

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

Private noteTypeXml

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

Private notehead

notehead: Notehead = undefined

Private noteheadColor

noteheadColor: string

Color of the notehead currently set. 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.

Private noteheadColorXml

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.

Private parentStaffEntry

parentStaffEntry: SourceStaffEntry

Private pitch

pitch: Pitch

The untransposed (!!!) source data.

Private playbackInstrumentId

playbackInstrumentId: string = undefined

Private printObject

printObject: boolean = true

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

Private slurs

slurs: Slur[] = []

state

state: NoteState

Private stemColorXml

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.

Private stemDirectionXml

stemDirectionXml: StemDirectionType

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

Private tie

tie: Tie

Private tremoloStrokes

tremoloStrokes: number

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.

Private tuplet

tuplet: Tuplet

Private typeLength

typeLength: Fraction

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

Private voiceEntry

voiceEntry: VoiceEntry

Accessors

Arpeggio

IsCueNote

  • get IsCueNote(): boolean
  • set IsCueNote(value: boolean): void

Length

NormalNotes

  • get NormalNotes(): number
  • set NormalNotes(value: number): void

NoteBeam

  • get NoteBeam(): Beam
  • set NoteBeam(value: Beam): void

NoteSlurs

  • get NoteSlurs(): Slur[]
  • set NoteSlurs(value: Slur[]): void

NoteTie

  • get NoteTie(): Tie
  • set NoteTie(value: Tie): void

NoteTuplet

  • get NoteTuplet(): Tuplet
  • set NoteTuplet(value: Tuplet): void

NoteTypeXml

Notehead

NoteheadColor

  • get NoteheadColor(): string
  • set NoteheadColor(value: string): void

NoteheadColorXml

  • get NoteheadColorXml(): string
  • set NoteheadColorXml(value: string): void

ParentStaff

  • get ParentStaff(): Staff

ParentStaffEntry

ParentVoiceEntry

Pitch

PlaybackInstrumentId

  • get PlaybackInstrumentId(): string
  • set PlaybackInstrumentId(value: string): void

PrintObject

  • get PrintObject(): boolean
  • set PrintObject(value: boolean): void

StemColorXml

  • get StemColorXml(): string
  • set StemColorXml(value: string): void

StemDirectionXml

TremoloStrokes

  • get TremoloStrokes(): number
  • set TremoloStrokes(value: number): void

TypeLength

Methods

ToString

  • ToString(): string

checkForDoubleSlur

  • checkForDoubleSlur(slur: Slur): boolean

getAbsoluteTimestamp

isRest

  • isRest(): boolean

isWholeRest

  • 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.) TODO give a Note a reference to its measure?

    Returns boolean

Generated using TypeDoc