For simulating by-ear tempo changes between several musicians (resp. their clocks),
there is the ListeningClock quark, which can do smooth clock tempo changes using
various warps.
(
// prep: make a listening clock,
t = ListeningClock.new.permanent_(true);
// a fast attack sound to use
SynthDef(\ping, {|freq, pan, amp=0.3|
var e = EnvGen.ar(Env.perc(0, 0.1, amp), doneAction:2);
var z = SinOsc.ar(freq, 0, 0.2);
OffsetOut.ar(0, Pan2.ar(z*e, pan));
}).add;
// a pattern on clock t:
Pdef(\a,
Pbind(\instrument, \ping,
\degree, Pseq((0..7), inf),
\dur, 0.25, \pan, -0.5, \amp, 0.5
)
).play(t);
)
// fadeTempo(newTempo, time, warp); //
// makes a smooth tempo change on a listening clock
// newTempo is the tempo to go to,
// time is the transition time,
// and warp the warp of the interpolation from current to new tempo.
t.verbose_(true);
t.fadeTempo(exprand(0.5, 2.0), 4);
t.fadeTempo(exprand(0.5, 2.0), 4);
t.fadeTempo(2, 2, 0); // linear fade
t.fadeTempo(1, 2, 0);
t.fadeTempo(2, 2, 3); // float warp: change begins with little steps, ends w big steps ends
t.fadeTempo(1, 2, 3);
t.fadeTempo(2, 4, \cos); // cosine shape (default): change starts slow, ends slow
t.fadeTempo(1, 6, \cos); // cosine shape (default): change starts slow, ends slow
t.fadeTempo(2, 4, \sin); // sine shape, starts faster, ends slow