lilypond-user
[Top][All Lists]
Advanced

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

Re: Should \partial accept music instead of duration?


From: Carl Sorensen
Subject: Re: Should \partial accept music instead of duration?
Date: Thu, 24 Mar 2022 13:57:23 -0600



On Thu, Mar 24, 2022 at 12:48 PM Valentin Petzel <valentin@petzel.at> wrote:
Another idea: We could have a command like partialDuring or partialWith.

Here's what I wrote, renaming Aaron's function:

pickupNotes =
#(define-music-function (mus) (ly:music?)
   (_i "Make a partial measure.")
   (let* ((mom (ly:music-length mus))
          (dur (make-duration-of-length mom)))
     (make-music 'SequentialMusic
       'elements
       (list (context-spec-music
               (make-music 'PartialSet
                           'origin (*location*)
                           'duration dur)
               'Timing)
         mus))))


\relative
{
  \time 4/4
  \pickupNotes {c'8 d} |
  e4 f g a
}

I think it's nicely descriptive and doesn't need to use convert-ly.

Carl


reply via email to

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