lilypond-user
[Top][All Lists]
Advanced

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

Re: Getting \tempo params


From: David Kastrup
Subject: Re: Getting \tempo params
Date: Thu, 21 Oct 2021 14:01:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Paolo Prete <paolopr976@gmail.com> writes:

> On Thu, Oct 21, 2021 at 1:22 PM David Kastrup <dak@gnu.org> wrote:
>
>> Paolo Prete <paolopr976@gmail.com> writes:
>>
>> > Hello,
>> >
>> > after a \tempo X = Y is set, is there a way (a scheme function or
>> > variable?) to get X and Y?
>>
>> What does "after" mean and "is set"?  At a later point in the source
>> text, at a later time in musical execution?
>>
>>
> yes

Those are two different things entirely.  "yes" as an answer is not
suitable.

>> With regard to the latter (which you could access in callbacks or
>> \applyContext) \tempo sets the context variable tempoWholesPerMinute in
>> the Score context.  How this relates to X and Y depends on the unit of
>> the beat.  A reasonable guess is it is measured in baseMoment beats,
>> possibly multipled by the gcd of the values in beatStructure (if any).
>> At least that's what Time_signature_performer tries to state.
>>
>>
> unfortunately this doesn't sound trivial to achieve, and I presume that
> tempoWholesPerMinute is not in the API.

I have no idea what you mean by "is not in the API".  What is the API
according to your definition?

> Then I wonder if it's preferable to override the \tempo function by setting
> two custom vars

Setting variables (unless you mean context properties) sounds like you
are interested in "a later point in the source text" which is quite
different from what I was writing about.

\tempo creates a music expression, and this music expression has effects
when the music is being interpreted ("iterated").  You sound like you
want to remember what \tempo does in the source text instead.  That's
kind of unusual and there are few things treated in that manner (default
durations during entry are the main exception coming to mind).  What are
you actually trying to do?

-- 
David Kastrup



reply via email to

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