Sweep Timers

Hi,

I would like to make a timer that resets either when it’s triggered by a Trig1.ar or when it has been “on” for longer than 4 seconds. I’d also really like a third trigger that could identify how long it’s been since “trig” has tripped the switch and maybe add one more trigger for a scenario where “trig” hasn’t tripped the switch for over 20 seconds - but that might be getting too complicated.

What I’m finding is that .poll it is only observing the trig variable.
Any idea what mistake I’m making?

{
	var sweep, trig = Trig1.ar(LFNoise1.ar(0.3));
	sweep = Sweep.ar(Trig1.ar((Sweep.ar(trig)>4)));
	sweep.poll;
	0;
}.play

I don’t really understand what you mean, but what about this:

{
    var trig = Trig1.ar(LFNoise1.ar(0.3));
    var sweep = Sweep.ar(trig, 1);
    var sweep4 = Sweep.ar(trig, 1).wrap(0,4);
    var sweep20 = Sweep.ar(trig, 1).wrap(0,20);
    [sweep, sweep4, sweep20].poll;
    nil
}.play
2 Likes