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: Valentin Petzel
Subject: Re: Should \partial accept music instead of duration?
Date: Thu, 24 Mar 2022 22:18:18 +0100

Hello Carl,

I don’t think recreating \partial is the best thing to do. After all we can 
simply do

pickupNotes =
#(define-music-function (mus) (ly:music?)
   (let* ((mom (ly:music-length mus))
          (dur (make-duration-of-length mom)))
     #{
       \partial #dur
       #mus
     #}))

Cheers,
Valentin

Am Donnerstag, 24. März 2022, 20:57:23 CET schrieb Carl Sorensen:
> 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

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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