Re: rit. in Midi - was: Re: lilypond-user Digest, Vol 137, Issue 62

2015-02-18 Thread H. S. Teoh
On Sun, Feb 15, 2015 at 12:14:19PM +, David Sumbler wrote:
   From: Patrick Karl patrickk...@me.com
   Date: Sat, 14 Feb 2015 11:18:49 -0600
   
   I think the most disturbiing thing is that \articulate is
   interpreting rit. to mean ritenuto rather than ritardando,
   which I think is the most common interpretation of rit..  It
   would be great if the tempo would ramp down gradually to 4=36 at
   the end.
 
 It's true that articulate.ly does not handle gradual tempo changes as
 one would expect.
 
 I get around this, and simultaneously give myself control over the
 contour of the rit. or accel. by writing another invisible stave
 just for the midi, and containing nothing but rests and tempo
 markings.
[...]

You can also write the tempo markings in the same place as the music but
use \omit to make them invisible in the printed score.

OTOH, it would be nice if we could come up with a clever Scheme function
that automates ramping the tempo down/up; it's rather tedious to insert
all those \tempo markings by hand.


T

-- 
Beware of bugs in the above code; I have only proved it correct, not tried it. 
-- Donald Knuth

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: rit. in Midi - was: Re: lilypond-user Digest, Vol 137, Issue 62

2015-02-15 Thread David Sumbler
  From: Patrick Karl patrickk...@me.com
  Date: Sat, 14 Feb 2015 11:18:49 -0600
  
  I think the most disturbiing thing is that \articulate is interpreting
  rit. to mean ritenuto rather than ritardando, which I think is
  the most common interpretation of rit..  It would be great if the
  tempo would ramp down gradually to 4=36 at the end.

It's true that articulate.ly does not handle gradual tempo changes as
one would expect.

I get around this, and simultaneously give myself control over the
contour of the rit. or accel. by writing another invisible stave just
for the midi, and containing nothing but rests and tempo markings.  And
I use a modified version of articulate.ly with the lines

#(define ac:rallFactor (ly:make-moment 60/100)) % 40% slowdown
#(define ac:pocoRallFactor (ly:make-moment 90/100)) % 10% slowdown

changed to

#(define ac:rallFactor (ly:make-moment 100/100)) % no slowdown
#(define ac:pocoRallFactor (ly:make-moment 100/100)) % no slowdown

so that rit. markings have no effect.

Then I add additional tempo markings in the midi stave (there is no
actual stave) to produce what is in fact a stepped change of tempo.  You
can add as many tempo changes as you need to give the illusion of a
gradual tempo change, and if you want more rit. towards the end, or at
the beginning, you can control that too by altering the figures.

For instance:

\version 2.18.0

\include articulate.ly

mid = {
\tempo 4 = 120 r1 | r1 |
\tempo 4 = 115 r4 \tempo 4 = 110 r4 \tempo 4 = 104 r4 \tempo 4 = 98
r4 |
\tempo 4 = 90 r4 \tempo 4 = 82 r4 \tempo 4 = 36 r2 | 
}

music = \new Staff \with { midiInstrument = trumpet }
\relative c' { \tempo Allegro 4 = 120
c8 d e f g a b c | d e f g a b c b |
a g f e d c b a | g f e d c2\fermata |
}

\score {
\music
\layout { }
}

\score {
\articulate

\mid
\music

\midi { }
}

Even the length of the pause at the end can be adjusted.

I have not put a rit. marking in the music here, because using the
unmodified version of articulate.ly it would confuse things.  But with
the alterations I suggested, rits and ralls in the score will not affect
the midi output.

I also find it useful to change the values of staccatoFactor,
normalFactor and other variables in the articulate script to produce a
better result.  Dynamics. too, can be changed.

David


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user