On Thu, Jun 2, 2022 at 5:53 PM Jean Abou Samra <j...@abou-samra.fr> wrote:

>
> In 2.23.9, you can already do \skip \melody_notes, which
> skips the duration of \melody_notes.


That is way cool!


> On the other hand, this
> doesn't allow subtracting a length. For that, you could do
> something like this:
>
> \version "2.23.9"
>
> mus = { c'1 2 4 4 1 1 }
>
> skipLengthMinus =
> #(define-music-function (music minus) (ly:music? ly:duration?)
>     (skip (ly:make-duration 0 0 (ly:moment-main (ly:moment-sub
> (ly:music-length mus)
> (ly:duration-length minus))))))
>

As is this!  Thanks for sharing!


>
> { c'1 \skipLengthMinus \mus 1*2 c'1 }
>
>
>
> The first argument to \skipLengthMinus is the music whose
> length is the main source for the duration to skip. The
> second argument is a duration to subtract from that.
>
> Best,
> Jean
>
>

Reply via email to