Hi,

After struggling with understanding Lilypond/Scheme's predicative types, of which I found basically no documentation other than a list of them with a minimal description here http://lilypond.org/doc/v2.20/Documentation/notation/predefined-type-predicates, I would like to ask what type of predicatives the \tempo function accepts. When you write \tempo 4 = 56, what does "4 = 56" for Scheme mean? This is of course something that I'm not using in my script yet, but knowing this might let me extend the script, namely that its usage accepts a proper tempo definition, so that (maybe with a more elegant syntax that doesn't use "" for each argument) I can also use that same number to give to an omitted tempo marking for MIDI playback.

I'm sure more knowledgeable people will be able to provide more insightful answers, but for what it's worth: Looking at lily/parser.yy, I see

tempo_event:
    TEMPO steno_duration '=' tempo_range    {
        $$ = MAKE_SYNTAX (tempo, @$, SCM_EOL, $2, $4);
    }
    | TEMPO text steno_duration '=' tempo_range    {
        $$ = MAKE_SYNTAX (tempo, @$, $2, $3, $5);
    }
    | TEMPO text {
        $$ = MAKE_SYNTAX (tempo, @$, $2);
    } %prec ':'
    ;

which I take to mean: The three forms

 * \tempo 4 = 96
 * \tempo Crazy 4 = 260-270
 * \tempo "Sluggishly slow"

are hardcoded as variants into the parser. My guess is that this might be hard (or impossible) to accomplish in a music function.

Best
Lukas


Reply via email to