On 11 October 2010 10:31, Steve Yegge <[email protected]> wrote:

> Is there a succinct way to do it?

Sort of...

\version "2.13.36"

baseTempo = 50

myTempo =
#(define-music-function (parser location dur count) (ly:music? integer?)
   ;; `tempo' is the syntax constructor (defined in
scm/ly-syntax-constructors.scm)
   ;; used by the parser when parsing \tempo [text] dur = count
   (tempo parser location #f
          (ly:music-property
           (car (extract-named-music dur 'SkipEvent)) 'duration)
          count))

\relative c' {
  \myTempo s4 #baseTempo
  c1
  \myTempo s4 #(* 2 baseTempo)
  c1
}

You have to brew your own music function here since the parser expects
a bare number for the count (which can't be stored in an identifier).

Cheers,
Neil

_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to