lilypond-user
[Top][All Lists]
Advanced

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

Re: Getting \tempo params


From: Paolo Prete
Subject: Re: Getting \tempo params
Date: Thu, 21 Oct 2021 14:41:24 +0200



On Thu, Oct 21, 2021 at 2:01 PM David Kastrup <dak@gnu.org> wrote:
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.


Sorry, I used a bad quote of the text. With "yes" I mean "at a later point in the source text".
 

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


API is the public interface exposed to the user. I assumed that tempoWholesPerMinute  was internal stuff, but I just checked that it IS in the API:
https://lilypond.org/doc/v2.22/Documentation/internals/tempo_005fperformer
Anyway, I don't know if it fits what I need. More specifically, I'm trying to obtain in the midi output the behavior of growing beams (Beam.grow-direction). For example, a sort of accelerando from a fixed metronome (which is not the previous metronome mark).
After the beam, the metronome must be reset to the initial value.
For example:

%%%%%%%%%%%%%%%%%%%
{

\tempo 4 = 120

c'4

\override Beam.grow-direction = #RIGHT
%start from \tempo 4 = 40
c'16[
% \tempo 4 = 40 + 20%
c'
% \tempo 4 = 40 + 40%
c'
% \tempo 4 = 40 + 60%
c']

%reset \tempo to 4 = 120
c'4

}
%%%%%%%%%%%%%%%%%%%

I already wrote a Scheme function that increases a tempo by 20% for each note grouped by the beam, starting from a chosen value, but I don't know how to reset the tempo after the beam.

thanks,
P

reply via email to

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