David Hobach <lilypond-u...@hobach.de> writes: > Hi all, > > I'd like to compute the \tempo directive from variables, but couldn't > yet figure out how to do it. > > For example, let's say I have two variables such as > myTempoBase = 4 > myTempo = 80 > > Then I'd like to do something such as > global = { > \key c \major > \time 4/4 > \tempo \myTempoBase = \myTempo > } > > I'd expect it to resolve to \tempo 4 = 80. The above code however fails on > 2.24.1. > > Any ideas?
in \tempo 4 = 80 , the 4 is not a number but a duration. This works when writing myTempoBase = ##{ 4 #} myTempo = 80 global = { \key c \major \time 4/4 \tempo \myTempoBase = \myTempo } because ##{ 4 #} resolves to a duration rather than a number. -- David Kastrup