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 <[email protected]> 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
signature.asc
Description: This is a digitally signed message part.
