lilypond-user
[Top][All Lists]
Advanced

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

Re: Change to \rest markup in 2.23


From: David F.
Subject: Re: Change to \rest markup in 2.23
Date: Sat, 23 Jul 2022 16:38:32 -0600


> On Jul 20, 2022, at 5:13 AM, Thomas Morley <thomasmorley65@gmail.com> wrote:
> 
> Am Mi., 20. Juli 2022 um 05:58 Uhr schrieb David F. <davidf@gmx.us>:
>> 
>> In 2.23, the rest markup command changed from taking a string to taking a 
>> duration.
>> 
>> \version "2.22"
>> \markup \rest #"4.."
>> 
>> \version "2.23"
>> \markup \rest { 4.. }
>> 
>> It would be nice if this change were backward compatible, at least for a 
>> version or two.
>> 
>> My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
>> environment I use for final “production” of scores.  But I’ve been trying to 
>> do as much development as possible in v2.23 on macOS 10.15.
>> 
>> Unfortunately, the change to the rest markup command makes going back and 
>> forth quite cumbersome.  Would be be possible to make this command take 
>> either a string or duration?
>> 
>> David F.
>> 
>> 
> 
> Well, going back and forth between 2.22.2 and new devel-version only
> works if you don't use devel-features and don't hit internal changes.
> 
> That said, below a coding which makes \rest always take a duration,
> transforming it to a string for 2.22.
> Once you settled with 2.23. simply delete it.
> Disclaimer: it's all a bit clumsy, cheeky and not tested in the wild.
> 
> \version "2.20.0"
> 
> #(begin
>  (define default-make-rest-markup make-rest-markup)
>  (define-markup-command (rest layout props duration) (ly:duration?)
>    (let ((version-arg
>            (if (string<? "22" (second (string-split (lilypond-version) #\.)))
>                duration
>                (ly:duration->string duration))))
>    (interpret-markup layout props
>      (default-make-rest-markup version-arg)))))
> 
> \markup \rest { 4.. }
> 
> Cheers,
>  Harm

Thanks Harm.  That seems to do the trick!

David F.




reply via email to

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