|
From: | Joel C. Salomon |
Subject: | Re: Adding durations (for \after) |
Date: | Wed, 9 Nov 2022 16:51:43 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 |
On 11/9/22 13:21, Lukas-Fabian Moser wrote:
Am 09.11.22 um 16:11 schrieb David Kastrup:Maybe something like \after #(make-duration-of-length (ly:music-length #{ 2. 4. #}))Or, with a bit of added sugar:
<snip>
\version "2.23.4" #(define (duration-or-music? x) (or (ly:duration? x) (ly:music? x))) duration = #(define-scheme-function (x) (duration-or-music?) (if (ly:duration? x) x (make-duration-of-length (ly:music-length x)))) { \after \duration 2. -> \repeat unfold 16 { 8 } }
Per Jean’s note that the function already exists, I omitted `duration-or-music?`, and this works quite nicely. Thank you!
--Joel
[Prev in Thread] | Current Thread | [Next in Thread] |