[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cannot set MIDI tempo Programmatically
From: |
musicologist1964 |
Subject: |
Cannot set MIDI tempo Programmatically |
Date: |
Fri, 14 Dec 2007 06:27:59 -0800 (PST) |
Hi,
I'm having a problem setting the MIDI tempo from within a function. When I
compile the file below, I get the error message:
GNU LilyPond 2.11.35
Processing `test.ly'
Parsing...
<string>:3:11: error: syntax error, unexpected SCM_TOKEN, expecting DIGIT or
UNSIGNED or DURATION_IDENTIFIER
\tempo
#lilyvartmpb = \lilyvartmpc
test.ly:26:0: error: errors found, ignoring music expression
\relative c'
It seems that lilypond is complaining that the parameter Duration is not a
number. I've tried various ways of getting around this, but it doesn't seem
to work. If I comment out the \tempo line, I get a music file (
http://www.nabble.com/file/p14336623/test.png test.png ) with the
appropriate tempo marking, but it has no effect on the MIDI tempo.
Any ideas?
Cheers,
Garry.
-------------------------------------------------------------------------------------
\version "2.11.35"
\include "english.ly"
GRtempoMark =
#(define-music-function (parser location Padding Text Duration PerMinute)
( number? string? string? string?)
#{
\once \override Score.MetronomeMark #'transparent = ##t
\tempo #$Duration = $PerMinute
\once \override Score.RehearsalMark #'self-alignment-X = #left
\once \override Score.RehearsalMark #'padding = #$Padding
\mark \markup
{
\bold $Text
(
\smaller \general-align #Y #DOWN \note #$Duration #1
=
\smaller \general-align #Y #DOWN \italic "ca."
\general-align #Y #DOWN $PerMinute
)
}
#}
)
\relative c'
{
\GRtempoMark #2 #"Andante" #"4" #"60"
c4
}
--
View this message in context:
http://www.nabble.com/Cannot-set-MIDI-tempo-Programmatically-tp14336623p14336623.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.
- Cannot set MIDI tempo Programmatically,
musicologist1964 <=