I definitively need to be able to change pattern with unfinit dur (like dur:1/3) without “bug”.
The exemple below demonstrate how sometimes (seem cyclic) the pattern-change is ok and sometimes not (out of 0db)…
The routine “r” is here to automate the pattern-change not to forge a Pchain.
You don’t really need to hear what happen (sound bad); the meter illustrate the problem.
Is there any tip to do it good ?
(
SynthDef(\bip, {
Out.ar(0, SinOsc.ar(666 , 0.5pi, Env.asr(0.01, 1, 0.01,0).ar(2, \gate.kr(1))));
}).add;
waitForBoot(s, {
Pdef.removeAll;
Pdef.defaultQuant_(2);
a = Pbind(\type, Pseq([\note, \rest!5].flat, inf), \instrument, \bip, \dur, 1/3, \sustain, 0.5)!2;
t = TempoClock(8);
t.schedAbs(t.nextBar, {t.beatsPerBar_(2)});
Pdef(\a, a[1]).play(t, quant:2);
r = Routine{
var i=0;
loop{
Pdef(\a).source_(a[i]);
"Pdef(\a).source_(a[%])".format(i).postln;
i = i+1%2;
4.wait;
}
}.play(t, [2, 1]);
s.meter;
})
)
/*
work fine with finit dur
a = Pbind(\type, Pseq([\note, \rest!3].flat, inf), \instrument, \bip, \dur, 1/2, \sustain, 0.5)!2;
*/