Does anyone have ideas for fading changes to the tempo of the default TempoClock?
Ideally I would like to have a smooth transition a bit like BeaconClock from the brilliant Utopia package has but with vanilla TempoClock.
Here is my attempt at doing so, but I wonder what other people do ?
// Tempo changer
// Time between tempo adjustments
var timeGrain = 0.01;
// Fade time
var fTime = 16;
// Current tempo
var ogTemp = TempoClock.default.tempo;
// Target tempo
var newTemp = 0.5;
// Envelope used for the fading
var env = Pseg([ogTemp, newTemp], fTime, \exp).asStream;
var val = 0;
// Do the tempo change
val = env.next;
TempoClock.default.tempo = val;
Mads, I just realised, there’s a problem with your definition, you’re setting the same clock on which the Tdef is running and which determines the fade, so the wait times are changed also. You need two different clocks, but of course a Tdef can accomplish this as well as a Pbind.