new Note(nn, ql)
A very, very important class! music21.note.Note objects combine a music21.pitch.Pitch
object to describe pitch (highness/lowness) with a music21.duration.Duration object
that defines length, with additional features for drawing the Note, playing it back, etc.
Together with music21.stream.Stream one of the two most important
classes in music21.
See music21.note.NotRest, music21.note.GeneralNote, music21.base.Music21Object
and music21.prebase.ProtoM21Object (or in general, the extends list below) for other
things you can do with a Note object.
Missing from music21p: microtone, pitchClass, pitchClassString, transpose(), fullName.
Parameters:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
nn |
string | music21.pitch.Pitch | undefined |
<optional> |
'C4' | pitch name ("C", "D#", "E-") w/ or w/o octave ("C#4"), or a pitch.Pitch object |
ql |
number | undefined |
<optional> |
1.0 | length in quarter notes |
- Source:
Properties:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
isNote |
Boolean |
<optional> |
true | is it a Note? Yes! |
isRest |
Boolean |
<optional> |
false | is it a Rest? No! |
pitch |
music21.pitch.Pitch | the |
||
name |
string | shortcut to |
||
nameWithOctave |
string | shortcut to |
||
step |
string | shortcut to |
||
octave |
number | shortcut to |
Extends
Methods
-
<static> Note#setStemDirectionFromClef(clef) → {music21.note.Note}
-
Change stem direction according to clef.
Parameters:
Name Type Argument Description clefmusic21.clef.Clef <optional>
clef to set the stem direction of.
- Source:
Returns:
Original object, for chaining methods
- Type
- music21.note.Note
-
<static> Note#vexflowNote(options) → {Vex.Flow.StaveNote}
-
Returns a
Vex.Flow.StaveNotethat approximates this note.Parameters:
Name Type Argument Default Description optionsobject <optional>
{} {clef:music21.clef.Clef}
clef to set the stem direction of.- Source:
Returns:
- Type
- Vex.Flow.StaveNote