Abjad / abjad

Abjad is a Python API for building LilyPond files. Use Abjad to make PDFs of music notation.
https://abjad.github.io
GNU General Public License v3.0
239 stars 40 forks source link

Extend NoteRhythmMaker with maximum_duration property to accommodate headless rhythms unambiguously #212

Closed trevorbaca closed 11 years ago

trevorbaca commented 11 years ago

From trevorb...@gmail.com on February 26, 2013 20:46:47

Observe the following:

maker = rhythmmakertools.NoteRhythmMaker() maker([(2, 4)]) [[Note("c'2")]]

This makes perfect sense.

But a problem arises when the resulting rhythms are used as the headless rhythm voice in a tablature staff. Why? Because headless half notes and headless quarter notes can not be distinguished.

The solution is allows for something like NoteRhythmMaker(maximum_duration=Duration(1, 4)) which will then generate c'4 ~ c'4 in place of c'2.

Original issue: http://code.google.com/p/abjad/issues/detail?id=211

trevorbaca commented 11 years ago

Done in 2.13.

Use fobidden_written_duration keyword.