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
234 stars 41 forks source link

Add `abjad.FeatherBeamContainer` #1571

Open trevorbaca opened 7 months ago

trevorbaca commented 7 months ago

abjad.FeatherBeamContainer will subclass abjad.Container.

abjad.FeatherBeamContainer will steal much of the logic in rmakers.accelerando() and rmakers.feather_beam().

rmakers.accelerando() will be updated to return a list of feather-beam containers. (rmakers.accelerando() currently returns a list of tuplets.)

Users will be able to iterate feather-beam containers separately from tuplets, grace containers, and all other types of containers, which will make patterns like this straightforward:

for container in abjad.select.containers(voice):
    if isinstance(container, abjad.FeatherBeamContainer):
        leaves = abjad.select.leaves(container)
        abjad.beam(leaves, beam_rests=True, stemlet_length=0.75)