Lukas-Fabian Moser <[email protected]> writes:
> Am 30.09.26 um 12:41 schrieb David Kastrup:
>>> \after expects a duration, and IIUC we only have convenient arithmetic
>>> for lengths, unfortunately. But one could do:
>>>
>>> \version "2.26"
>>>
>>> dur =
>>> #(define-scheme-function (mus) (ly:music?)
>>> (make-duration-of-length (ly:music-length mus)))
>>>
>>> {
>>> \after \dur { 2. 16 } <>->
>>> \*16 c16
>>> }
>> Soon playing in the theatre of your choice:
>>
>> https://gitlab.com/lilypond/lilypond/-/merge_requests/3158
>
> ... which will then enable us to simply write
>
> \version "2.26"
>
> {
> \after { 2. 16 } <>->
> \*16 c16
> }
\after is written in a manner where you can just write
\after { 2. 16 } ->
and it will supply the <> on its own. This is done in a "cute" manner
using a #{ ... #} construct that can be parsed in several different
manners. I think that I might have posted a variant of this to the
mailing lists at some point, with it getting scavenged into LilyPond
later. There is a point to being cute on the mailing list or snippets
and offering concise code.
I think I'll back out the cuteness from LilyPond's internals, though,
and stop using #{ ... #} here. That may make it more obvious to the
reader of the code that supplying one's own <> is not needed.
--
David Kastrup