new GeneralNote(ql)
Superclass for all Note values
Parameters:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
ql |
number | undefined |
<optional> |
1.0 | quarterLength of the note |
- Source:
Properties:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
isChord |
boolean |
<optional> |
false | is this a chord |
quarterLength |
number | shortcut to |
||
activeVexflowNote |
object | most recent Vex.Flow.StaveNote object to be made from this note (could change); default, undefined |
||
expressions |
Array.<music21.expressions.Expression> | array of attached expressions |
||
articulations |
Array.<music21.articulations.Articulation> | array of attached articulations |
||
lyric |
string | the text of the first |
||
lyrics |
Array.<music21.note.Lyric> | array of attached lyrics |
||
volume |
number |
<optional> |
60 | how loud is this note, 0-127, before articulations |
midiVolume |
number | how loud is this note, taking into account articulations |
||
tie |
music21.note.Tie | undefined |
<optional> |
a tie object |
Extends
Methods
-
<static> GeneralNote#addLyric(text, lyricNumber, applyRaw, lyricIdentifier)
-
Add a
music21.note.Lyricobject to the NoteParameters:
Name Type Argument Default Description textstring text to be added
lyricNumbernumber <optional>
integer specifying lyric (defaults to the current
.lyrics.length+ 1)applyRawboolean <optional>
false if
true, do not parse the text for cluses about syllable placement.lyricIdentifierstring <optional>
an optional identifier
- Source:
-
<static> GeneralNote#playMidi(tempo, nextElement, options) → {Number}
-
Play the current element as a MIDI note.
Parameters:
Name Type Argument Default Description temponumber <optional>
120 tempo in bpm
nextElementbase.Music21Object <optional>
for determining the length to play in case of tied notes, etc.
optionsobject <optional>
other options (currently just
{instrument:)music21.instrument.Instrument}- Source:
Returns:
- delay time in milliseconds until the next element (may be ignored)
- Type
- Number
-
<static> GeneralNote#setStemDirectionFromClef(clef) → {undefined}
-
Change stem direction according to clef. Does nothing for GeneralNote; overridden in subclasses.
Parameters:
Name Type Argument Description clefmusic21.clef.Clef <optional>
clef to set the stem direction of.
- Source:
Returns:
- Type
- undefined
-
<static> GeneralNote#vexflowAccidentalsAndDisplay(vfn, {object)
-
Sets the vexflow accidentals (if any), the dots, and the stem direction
Parameters:
Name Type Description vfnVex.Flow.StaveNote a Vex.Flow note
{object- Source: