I want to synchronize the phase of the BufRd with a hanning window envelope:
(
SynthDef.new(\dline, {
arg buf, trans=0;
var dl, env, phasor;
phasor = Phasor.ar(0, BufRateScale.ir(buf)*trans.midiratio, 0, BufFrames.ir(buf));
env = EnvGen.ar(Env.sine, phasor, timeScale: BufDur.ir(buf)).poll;
dl = BufRd.ar(
2,
buf,
phasor,
0,
4);
dl = dl * env;
Out.ar(0, dl);
}).add;
)
The Phasor is supposed to jump to 0 and then increase, which should trigger the envelope, right? Why is this not the case? Is there a better way to implement this synchronization?