I’d like to do something relatively straightforward, but I’m not sure if there is a shortcut for doing it. I’d like to interpolate the stretch time between the following Pbindefs, when they are executed. Is there a convention for doing this?
I was thinking it might be possible to do something with Plazy, but the following requires re-executing the Pbindef and of course, the pattern doesn’t stay put after it finishes the adjustment.
Is the idea that every time you execute the Pbindef again, it uses a different stretch factor?
But over how much “executes” should this interpolation happen? The desired behavior is not entirely clear yet to me.
You could e.g. just generate a new Pbind every time you need one, e.g.
(
s.waitForBoot({
var list_of_patterns = [];
var pattern_maker = {
| stretchtime |
Pbind(
\degree, Pseq([1,2,3,2], 1),
\duration, 0.3,
\stretch, stretchtime,
).trace;
};
s.sync;
list_of_patterns = (0.9, 0.8..0.2).collect({
| stretchtime|
pattern_maker.(stretchtime);
});
fork {
// this wait statement is useful if calculating all the patterns takes a lot of time
// to avoid that the first events are late
wait(thisThread.clock.elapsedBeats - thisThread.clock.beats);
Pseq(list_of_patterns).play;
};
});
)