Now that we know how to make, name and show notes, we can look at a few of the many note attributes available in Abjad.
abjad> note = Note(13, (1, 4))
abjad> show(note)
First note that Abjad pitch numbers equal IRCAM / MIDI pitch numbers minus 60. So Abjad pitch number 13 equals IRCAM / MIDI pitch number 73. This pitch is the the C-sharp, or D-flat, in the first octave above the octave of middle C. [1]
We can ask Abjad directly about the pitch of our note.
abjad> note.pitch
Pitch(cs, 5)
Abjad responds with a reference to the Pitch instance bound to our note. Abjad pitch instances have many different attributes which will be familiar to most composers.
abjad> note.pitch.name
'cs'
abjad> note.pitch.number
13
abjad> note.pitch.octave
5
abjad> note.pitch.pc
1
But Abjad implements some less familiar pitch attributes, too.
abjad> note.pitch.degree
1
abjad> note.pitch.altitude
7
The Pitch entry in the Abjad API lists all pitch attributes available in Abjad.
We can also ask Abjad about the duration of our note.
abjad> note.duration
<_LeafDurationInterface>
Abjad responds with a reference to a _LeafDurationInterface.
Duration management is a major topic in Abjad, and is covered in greater detail later in the docs. For now we’ll look only at the written duration of our note and come back to other topics in duration management later.
abjad> note.duration.written
Rational(1, 4)
Footnotes
[1] | For more on the identification of pitch in Abjad, see Pitch conventions in the appendices. |