[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme predicative types

From: Lukas-Fabian Moser
Subject: Re: Scheme predicative types
Date: Wed, 16 Sep 2020 21:09:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0


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, 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 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

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]