I have a piece of music (piano + trumpet) with changes of tempos within the
same piece.
I am trying to find a way to produce from the lilypond file
normal midi outputs at the regular tempos
and another output with the trumpet at a slower proportional tempo.
I have tried using a simple multiplicative function
and using it in the definition of the music:
% =================================================
tempoMult =
#(define-scheme-function (n) (number?)
(* factor n))
% ------------------------------------------
music = {
#(define factor 1)
\tempo "Presto" 4 = \tempoMult 120
c4 d e f g1
\tempo "Moderato" 4 = \tempoMult 72
c4 d e f g1
}
% --------------------------------------------
% What I would like is having something like
% --------------------------------------------
\book {
\bookOutputSuffix "fast"
\score {
#(define factor (/ 2 3))
% this does not affect the music in this book
% because the initial value of factor (=1)
% was already defined in the music definition block
% and must be defined before the music definition.
{
\music
}
\midi {
}
}
}
% ======================================================
It does work to change the factor in the definition of the music.
But it does not give me the expected result.
because the variable factor must be defined in the music definition.
What I would like is to be able to define the factor in the score definition
Is there a sheme function which could do the job
and be applied within the score / midi bloc
to transform each the tempo indications proportionally
within one specific score / midi block?
--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>