{
   "is_private" : null,
   "id" : "1-5fG",
   "code" : "t = TempoClock(120/60).permanent_(true);\r\n\r\n(\r\n~change_clock_tempo = {|clock, tempo, beats=1|\r\n    beats.do {|beat|\r\n        var stepTempo = beat.linexp(0, beats-1, clock.tempo, tempo);\r\n        clock.schedAbs(clock.nextBar + beat, {\r\n            \"New Tempo: \".post; (stepTempo*60).post; \" BPM\".postln;\r\n            clock.tempo_(stepTempo);\r\n        });\r\n    };\r\n    nil;\r\n};\r\nPbindef(\\n,\r\n    \\octave, 4,\r\n    \\dur, 0.5,\r\n    \\degree, Pseq((0..7), inf)\r\n).play(t, quant: 4);\r\n);\r\n\r\n~change_clock_tempo.value(t, 200/60, 16);\r\n~change_clock_tempo.value(t, 50/60, 8);\r\nt.tempo*60",
   "labels" : [
      "tempo",
      "accelerando",
      "decelerando"
   ],
   "ancestor_list" : [],
   "description" : "This gradually changes the tempo of a TempoClock, each beat of a specified number of beats, and starting at the next bar.\r\n\r\n\r\nPersonally, I was not able to heavily distinguish between `.linlin` and `.linexp` for reasonable musical tempos.\r\n\r\n\r\nThere may be a mathematically smoother way of handling this at the control rate.\r\n\r\n\r\nThis function does not gracefully handle multiple simultaneous invocations.",
   "author" : "Tom Dugovic",
   "name" : "Gradually change TempoClock tempo [ accelerando / decelerando ]"
}
