notetools.make_percussion_note

abjad.tools.notetools.make_percussion_note.make_percussion_note(pitch, total_duration, max_note_duration=(1, 8))[source]

Make percussion note:

abjad> notetools.make_percussion_note(2, (1, 4), (1, 8))
[Note("d'8"), Rest('r8')]
abjad> notetools.make_percussion_note(2, (1, 64), (1, 8))
[Note("d'64")]
abjad> notetools.make_percussion_note(2, (5, 64), (1, 8))
[Note("d'16"), Rest('r64')]
abjad> notetools.make_percussion_note(2, (5, 4), (1, 8))
[Note("d'8"), Rest('r1'), Rest('r8')]

Return list of newly constructed note followed by zero or more newly constructed rests.

Durations of note and rests returned will sum to total_duration.

Duration of note returned will be no greater than max_note_duration.

Duration of rests returned will sum to note duration taken from total_duration.

Useful for percussion music where attack duration is negligible and tied notes undesirable.

Changed in version 2.0: renamed construct.percussion_note() to notetools.make_percussion_note().

This Page