Hi Pedro,
You might want to explore selection functions here: Abjad Selection Functions.
These allow you to select specific parts of a container in various
ways, which can be really useful when you need to attach something to a
particular leaf. For instance, you can select by the number of logical
ties, or by duration, and even separate chunks into different variables.
If you're working with time signatures, you can select the container by
measure. Also, check out the split()
function: Abjad Mutate Split.
I've created a fit_in_duration()
function that is somewhat related:
def fit_in_duration(container, duration: abjad.Duration, final=False):
if duration < abjad.get.duration(container):
shards = abjad.mutate.split(container, [duration])
n = 0
if final is True:
n = -1
copy = abjad.mutate.copy(shards[n])
del container[:]
container.append(copy[0])
else:
difference = duration - abjad.get.duration(container)
if difference:
rests = rest_maker([difference]) # other function
rests = abjad.Container(rests, name="fit in duration")
container.extend(rests)
To have more "manageable" components or scores, I'd recommend looking into the Best Practices page: Abjad Best Practices. Specifically:
I understand you're working with process music, and I face similar challenges. It would be nice if we could consider both a larger and smaller scope when structuring pieces. Personally, I haven’t fully solved this yet, but I've been opting for smaller sections and trying to concatenate them so that the overall process sounds like a single one.
Best regards,
Davi
I'm working on some process music, and I'm generating long containers. I would like split them into manageble chunks, while still splitting notes into logical ties if possible so not to get a "bar check fail" in Lilypond; Is there a known way of doing so?
--
You received this message because you are subscribed to the Google Groups "abjad-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to abjad-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abjad-user/3d93c6ba-b503-4d1e-b356-69fee0244ccbn%40googlegroups.com.
I'm working on some process music, and I'm generating long containers. I would like split them into manageble chunks, while still splitting notes into logical ties if possible so not to get a "bar check fail" in Lilypond; Is there a known way of doing so? --