Re: Alleviating issue #34
Thomas Morley <[email protected]>
| Newsgroups | gmane.comp.gnu.lilypond.devel |
|---|---|
| Message-ID | <CABsfGyW71GBM31t81AwJm7LsfPPMO2a2o+sz_DyHAWtb4U3pGw@mail.gmail.com> |
Am Do., 1. Jan. 2026 um 17:59 Uhr schrieb Thomas Morley <[email protected]>: > > Am Do., 1. Jan. 2026 um 14:37 Uhr schrieb Dan Eble <[email protected]>: > > > > On 2025-12-31 05:42, Thomas Morley wrote: > > > At least for automatic repeats 'volta settings are entirely missing, why? > > > > Automatic repeats were enhanced to handle nested alternatives. Manual > > repeats were not. > > > > Volta_engraver gets information about the music structure from > > volta-span-event: > > > > void > > Volta_engraver::boot () > > { > > ADD_ACKNOWLEDGER (bar_line); > > ADD_LISTENER (dal_segno); > > ADD_LISTENER (fine); > > ADD_LISTENER (volta_span); //<<<<<<<<<<<< > > } > > > > For backward compatibility, Volta_engraver also reads the repeatCommands > > context property and creates brackets that have a fixed relationship > > with automatic brackets. This is one reason why the "Manual repeat > > marks" section of the NR begins with a cautionary note. > > > > I haven't reviewed your custom engraver, but an engraver concerned with > > repeat structure might listen for some of these events in addition to > > volta-span-event (from define-event-classes.scm): > > > > (structural-event . (alternative-event > > coda-mark-event > > dal-segno-event > > fine-event > > section-event > > segno-mark-event > > volta-repeat-end-event > > volta-repeat-start-event)) > > > > Summary: Engravers handling repeat structure should listen for events. > > If there is good reason to support the repeatCommands interface, they > > should also read repeatCommands, but repeatCommands does not support the > > same range of uses as automatic repeats. > > -- > > Dan > > > > Well, its not my engraver..., I may try to rewrite it, though. > > Thanks for the insights, > Harm In 2.22.2 one could the following to cure #34 with repeats in a manual way: %% example triggering issue 34 << { \repeat volta 3 { \grace b8 b1 } \alternative { { \grace b8 c'1 } { \grace b8 d'1 } } e'1 } { \repeat volta 3 { b1 } \alternative { c' d' } e' } >> %% manual cleared using \set repeatCommands = #'() norC = \set repeatCommands = #'() << { \repeat volta 3 { \grace b8 b1 } \alternative { { \grace b8 c'1 } { \grace b8 d'1 } } e'1 } { \repeat volta 3 { \norC b1 } \alternative { { \norC c' } { \norC d' } } e' } >> See attached image. Basically, the engraver in question did this in an automatic way. Alas, this does not work in current lilypond anymore. If I try to redo the old engravers functionality looking at events, I end up wishing to delete certain events from the music-stream. Is this possible at all? Or is there a better method for a workaround? Cheers, Harm
atest-122.cropped.png
(image/png, 11.6 KB) - not displayed