lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot get clef and time on first measure


From: Carl Sorensen
Subject: Re: Cannot get clef and time on first measure
Date: Thu, 2 Jun 2022 17:58:56 -0600



On Thu, Jun 2, 2022 at 5:53 PM Jean Abou Samra <jean@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

[Prev in Thread] Current Thread [Next in Thread]