Setting pitch deviation
=======================

Use deviation to model the fact that two pitches differ by a fraction of a semitone:

<abjad>
note_1 = Note(24, (1, 2))
note_2 = Note(24, (1, 2))
staff = Staff([note_1, note_2])
</abjad>

<abjad>
show(staff)
iotools.write_expr_to_ly(staff, 'example-1') <hide
</abjad>

<abjad>
note_2.written_pitch = pitchtools.NamedChromaticPitch(24, deviation = -31)
</abjad>

The pitch of the the first note is greater than the pitch of the second:

<abjad>
note_1.written_pitch > note_2.written_pitch
print repr(note_1.written_pitch > note_2.written_pitch) <hide
</abjad>

Use markup to include indications of pitch deviation in your score:

<abjad>
markuptools.Markup(note_2.written_pitch.deviation_in_cents, 'up')(note_2)
iotools.write_expr_to_ly(staff, 'example-2') <hide
</abjad>
