4. Inspecting note attributes — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »

# 4. Inspecting note attributes

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)

## 4.1. Pitch attributes

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.

## 4.2. Duration attributes

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.

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »