lilypond-devel
[Top][All Lists]
Advanced

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

Re: TimeSignature with note in denominator


From: Kieren MacMillan
Subject: Re: TimeSignature with note in denominator
Date: Mon, 8 Nov 2021 15:39:43 -0500

Hi Aaron,

> Technically, you could create string->duration:
> 
> %%%%
> #(define (string->duration str)
>  (let* ((parser (ly:parser-clone '()))
>         (music (ly:parse-string-expression parser str)))
>   (if (ly:duration? music) music (ly:error "Expecting duration"))))
> 
> { b' $(string->duration "4.") c'' $(string->duration "8") }
> %%%%

Thanks.Just wanted to make sure I wasn’t reinventing a wheel!

> But it would seem better to let the parser do the work by having the function 
> accept a ly:duration? directly.  Certainly, it would be easier to use:
> 
> %%%%
> \timeII 3 4.  % logically \time 9/8
> %%%%

I considered a separate function, but rejected the idea for several reasons 
(backwards compatibility, incompatibility with “stylesheet” mentality, etc.). 
That being said, if \time can be re-coded so that it will accept a duration for 
the “denom” *without breaking existing code or requiring a convert-ly rule*, 
then that would be home run!

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kieren@kierenmacmillan.info




reply via email to

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