8. Spacing music proportionally

Note

Abjad’s proportional-by-default stylesheets have been disabled for this cookbook article.

>>> voice = Voice(r"c'4.. g'16 \times 2/3 { e'4 a'4 c''4 }")
>>> staff = Staff([voice])
>>> score = Score([staff])
>>> show(score)

8.1. Uniform stretching

>>> override(score).spacing_spanner.uniform_stretching = True
>>> show(score)

8.2. Proportional notation duration

>>> set_(score).proportional_notation_duration = schemetools.SchemeMoment(1, 16)
>>> show(score)
>>> set_(score).proportional_notation_duration = schemetools.SchemeMoment(1, 24)
>>> show(score)
>>> set_(score).proportional_notation_duration = schemetools.SchemeMoment(1, 32)
>>> show(score)
>>> set_(score).proportional_notation_duration = schemetools.SchemeMoment(1, 48)
>>> show(score)

8.3. Strict note spacing

>>> override(score).spacing_spanner.strict_note_spacing = True
>>> show(score)

8.4. Strict grace spacing

8.5. Handling collisions

8.6. Base shortest duration