Am Sa., 27. Dez. 2025 um 22:20 Uhr schrieb Werner LEMBERG <[email protected]>:
>
>
> Folks,
>
>
> today I've stumbled upon this snippet in the Wiki, which helps
> alleviate some of the problems with the infamous grace note issue #34.
>
>   https://wiki.lilypond.community/wiki/Basic_grace_echo_purger
>
> It has some rough edges currently (and my Scheme powers are not good
> enough to improve them) – for example, the snippet code doesn't work
> correctly if there is a `\break` command right before a grace note.
>
> Would it make sense to make this an 'official' snippet?  If so, could
> Scheme people please have a look and try to improve it?
>
>
>     Werner
>
>
> PS: Alas, its sibling snippet
>
>       https://wiki.lilypond.community/wiki/Repeat_commands_grace_echo_purger
>
>     is currently completely broken – it has never been updated to
>     newer LilyPond versions, now doing nothing.

I switch to the devel-list.

See my comment
https://gitlab.com/lilypond/lilypond/-/issues/34#note_339729636 and the reply.

https://wiki.lilypond.community/wiki/Repeat_commands_grace_echo_purger
relies on reading and resetting 'repeatCommands

As test-case consider the code below:

%%%%%%%%%%%%%%%%%
Tst_engraver =
  #(lambda (ctx)
    (make-engraver
      ((process-music trans)
        (let ((rC (ly:context-property ctx 'repeatCommands)))
          (if (pair? rC)
              (pretty-print (cons (ly:context-current-moment ctx) rC)))))))

\layout {
  \context {
    \Score
    \consists \Tst_engraver
  }
}

\score { { \repeat volta 3 { b1 } \alternative { c' d' } e' } }

\score {
  {
    b1
    \set Score.repeatCommands = #'((volta "1.--2."))
    c'
    \set Score.repeatCommands = #'((volta "3.") end-repeat (volta #f))
    d'
    \set Score.repeatCommands = #'((volta #f))
    e'
  }
}
%%%%%%%%%%%%%%%%%

The code above returns for 2.22.2:

(#<Mom 0> start-repeat)
(#<Mom 1> (volta "1.--2."))
(#<Mom 2> (volta "3.") end-repeat (volta #f))
(#<Mom 3> (volta #f))

for both, the score with automatic repeats and the one with manual
settings of 'repeatCommands
The printed outout is the same, too. (Would be different with \unfoldRepeats).

Alas for current master:
%% automatic:
(#<Mom 0> (start-repeat 3))
(#<Mom 2> (end-repeat 2))

%% manual
(#<Mom 1> (volta "1.--2."))
(#<Mom 2> (volta "3.") end-repeat (volta #f))
(#<Mom 3> (volta #f))

Thus the Repeat_commands_grace_echo_purger has nothing to work with
for automatic repeats.

Though, from IR I expect Repeat_acknowledge_engraver and
Volta_engraver to fill 'repeatCommands with settings for 'end-repeat,
'start-repeat _and_
'volta.
At least for automatic repeats 'volta settings are entirely missing, why?

Cheers,
  Harm

Reply via email to