Lukas has very kindly pointed me at the function ly:moment-main which
has enabled me to fix most of my problem with minimal disruption to my
code, and none to my existing scores.
There is however one residual issue. If the following MWE is compiled
under lilypond 2.25.18, the PDF output is as expected. However if it
is compiled under 2.25.25, an unwanted markup "[semibreve] = 50"
appears at bar 2. How is this best avoided?
(I've included some MIDI output after the MWE, even though it is not
strictly needed to illustrate the problem).
\include "articulate.ly"
currentTempo = #(ly:make-moment 50 2)
newTempo = #(ly:make-moment 100 2)
music = {
c'2 2
#(ac:tempoChange (if (ly:version? > '(2 25 22))
(ly:moment-main newTempo)
newTempo))
c'2 2
}
\score { \music }
%{
\score { \articulate \music
\midi {
\context {
\Score tempoWholesPerMinute =
#(if (ly:version? > '(2 25 22))
(ly:moment-main currentTempo)
currentTempo)
}}}
%}