Am 02.02.2014 12:58, schrieb Graham King:
On Sun, 2014-02-02 at 08:51 +0100, Marc Hohl wrote:
Am 29.01.2014 06:41, schrieb Graham King:
To generate MIDI output, I use a piece of boilerplate lilypond code,
containing:
      \midi { \context { \Score tempoWholesPerMinute = #currentTempo }}
where it is expected that:
      currentTempo = #(ly:make-moment TACTUS RF)

I would like to generalise the boilerplate code so that it works with
suitable defaults even when these variables have not been defined.

Where do you want to define these variables? If you want to use them
via the command line, you can do it as follows (untested!):


Thanks Marc.  Normally, TACTUS and RF would be defined at the top level
of a .ly file that \include's the boilerplate.  I'm now wondering
whether Guile's catch and throw mechanism is the way to go.  There's
some reading and experimenting ahead...

I found another solution somewhere buried in my files:

#(define TACTUS
   (if (defined? TACTUS)
       TACTUS
       50))

Perhaps that's something better suited to your needs?

Marc




_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to