Thanks Lukas,

Le jeu. 2 mai 2024, à 13 h 29, Lukas-Fabian Moser <l...@gmx.de> a écrit :
> fromEnd =
> #(define-music-function (delta ev mus) (ly:duration? ly:music? ly:music?)
>    (_i "Add music @var{ev} with a distance of @var{delta} before the end of
>
> @var{ev} is usually a post-event.")
>    #{
>      \context Bottom
>      <<
>        {
>          \skip $(make-duration-of-length (- (ly:music-length mus)
>                                             (ly:duration-length delta)))
>          <> $ev
>        }
>        #mus
>    >> #})
>
>
> {
>    <>(
>    <>\<
>    \after 2 \>
>    \after 16*15 )
>    \fromEnd 16 \!
>    \fromEnd 8 ->
>    \repeat unfold 8 {e''16 d''} |
> }
>
> %%%%
>
> \beforeLast (in the sense of "before the last note of the given music
> argument") isn't likely to work though, since it's not guaranteed that
> the music given is SequentialMusic: What is the last note of a << >>
> expression?

Of course. I said \beforeLast not as \before-the-last-note-please but
rather \beforeEnd. \fromEnd is way clearer.

I've added your snippet and will surely make good use of it !

Thank you very much.
-- 
Pierre-Luc Gauthier

Reply via email to