Hi all, today I noticed some behavior I can’t explain. When CoinGate is uncommented in the following example, it appears to skip the first trigger, even with 100% probability. This does not happen if the phase of Impulse is somewhere between 0 and 1.
Is this a bug, or am I misunderstanding intended usage?
i have discovered something similiar in the past. I think this is an initialisation bug.
You could add Impulse.ar(0) or derive the triggers from phases, which im doing at the moment because of this issue with some Ugens.
(
var rampToTrig = { |phase|
var history = Delay1.ar(phase);
var delta = (phase - history);
var sum = (phase + history);
var trig = (delta / sum).abs > 0.5;
Trig1.ar(trig, SampleDur.ir);
};
{
var rate = 100;
var phase = (Phasor.ar(0, rate * SampleDur.ir) - SampleDur.ir).wrap(0, 1);
var trig = rampToTrig.(phase);
var gate = CoinGate.ar(1.0, trig);
[phase, gate];
}.plot(0.02);
)