lilypond-user
[Top][All Lists]
Advanced

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

Re: changes leads to error


From: Lukas-Fabian Moser
Subject: Re: changes leads to error
Date: Sat, 20 Mar 2021 10:59:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Hi Ursus,

I have run the code through convert-ly, no changes were needed. I compiled on an older pc with an older version of lilypond without problems. So it seems there is some difference between 2.20.0 and 2.22.0 that breaks the code.

The markup command \note has changed: Now it expects a duration, not a string anymore. But you can use the internal function \note-by-number instead:

\version "2.22.0"

#(use-modules (srfi srfi-60))

#(define-public (format-time-sig-note grob)
   (let* ((frac (ly:grob-property grob 'fraction))
          (num (if (pair? frac) (car frac) 4))
          (den (if (pair? frac) (cdr frac) 4))
          (m (markup #:override '(baseline-skip . 0.5)
                     #:center-column (#:number (number->string num)
                                               #:override '(style . default)                                                #:note-by-number (log2-binary-factors den) 0 DOWN))))
     (grob-interpret-markup grob m)))


{
  \override Staff.TimeSignature.stencil = #format-time-sig-note
  \time 4/2
  a4
}

Anyway, it seems to me that, even before that change, you had no possibility of writing something like "4 dotted quarter notes". Do you need that functionality?

Lukas




reply via email to

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