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)

.. image:: images/test.png


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. [#]_

We can ask Abjad directly about the pitch of our note. ::

    abjad> note.pitch
    Pitch(cs, 5)

Abjad responds with a reference to the :class:`~abjad.pitch.pitch.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 :class:`~abjad.pitch.pitch.Pitch` entry in the Abjad API
lists all pitch attributes available in Abjad.


Duration attributes
-------------------

We can also ask Abjad about the duration of our note. ::

   abjad> note.duration
   <_LeafDurationInterface>

Abjad responds with a reference to a 
:class:`~abjad.leaf.duration._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)


.. rubric:: Footnotes

.. [#] For more on the identification of pitch in Abjad,
   see :doc:`Pitch conventions 
   </chapters/appendices/pitch_conventions/index>` in the appendices.
