Reset or resync Gausstrig

I have an array of individual GaussTrigs for clocking different stuff. With dev=0 they play sync. With dev>0 things go random.

When I turn back dev=0 each clock plays steady again, but each has drifted and are no more in sync.

Is there a method to get them synced again when turning back do 0?

Any other strategies to achieve similar behaviour with a clock/trigger generator?

cheers, Bernhard

Here’s the source if it helps:

Can you add your code here? It would be a lot easier to troubleshoot.

My next question would be if you have to use a UGen for triggering or if you can do that client side?

Thanks for the answer. I want to do it inside the synth with a UGen. I play speaker setups with lots of discreet channels. To fill the channels I iterate a function for multichannel expansion.

I like the idea of a synth as autonomous sound object that lives it’s own life. I don’t like sequencing from outside.

It’s a GaussTrig that pings a BPF.


(
SynthDef.new(\GaussPing,


	{

		arg tempo=4, dev=0,pitch=220, q=12, amp=1, out=0;

		var sig;

		sig = {BPF.ar(GaussTrig.ar(tempo,dev),pitch*exprand(1,8),1/q,sqrt(q)*5)}!16;

		sig=Splay.ar(sig);

		sig = Limiter.ar(sig*amp,0.7);

		Out.ar(0,sig);

			}
	).add
)

x = Synth(\GaussPing);


x.set(\tempo,4);
x.set(\dev,0);

x.set(\pitch,220);
x.set(\q,44);


x.set(\amp,1);
x.set(\out,0);


x.free;

For the moment I use a work around with LFDNoise0 modulating a TDelay. Not really gauss-distribution but works. Now it can go to chaos and back to sync.

(
(
SynthDef.new(\RandomPing,

	{

		arg tempo=4, dev=0,pitch=220, q=12, amp=1, lag=0.2, out=0;

		var sig, env, trig, del;

		trig = Impulse.ar(tempo.lag(lag));

		dev = (dev/tempo).lag(lag);

		sig = {BPF.ar(TDelay.ar(trig,LFDNoise0.kr(tempo,dev/2,dev).lag(lag)),pitch*exprand(1,8),1/q,sqrt(q)*5)}!16;

		sig=Splay.ar(sig);

		sig = sig.tanh;

		sig = Limiter.ar(sig*amp,0.7);

		Out.ar(0,sig);

			}
	).add
)

x = Synth(\RandomPing);


x.set(\tempo,5);
x.set(\dev,1.0);

x.set(\lag,2);


x.set(\pitch,420);
x.set(\q,44);


x.set(\amp,3);
x.set(\out,0);


x.free;

Could Latch the output from some Gaussian noise UGen as the deviation, multiply it by a randomness factor from 0-1 where 0 is no randomness, then add that value to your central trigger rate value?

Just getting back into the scsynth world, so apologies for such a late reply. You could do something like the following, and it would, to some extent, preserve the autonomous behavior you desire:

(
SynthDef(\gaussTrig, {|tempo=4, dev=0, out=0|
	var trig = GaussTrig.ar(tempo!16,dev);
	SendReply.ar(trig, '/gausstrig', [dev]);
	Out.ar(out, trig);
}).add;

SynthDef(\ping, {
	arg trigIn = 30, pitch=220, q=12, amp=1, out=0;
	var trig, sig;
	trig = In.ar(trigIn, 16);
	sig = BPF.ar(trig,pitch*ExpRand(1,8),1/q,sqrt(q)*5);
	sig=Splay.ar(sig);
	sig = Limiter.ar(sig*amp,0.7);
	Out.ar(out,sig);
}).add;

b=Bus.audio(s, 16);
)

(
var lastDev = 0;
x=Group.new;
p = Synth(\ping, [\trigIn, b], x); 
g = Synth(\gaussTrig, [\out, b, \dev, lastDev], x);

o=OSCFunc({|msg|
	var dev = msg[3];
	(lastDev > 0.0).and(dev == 0.0).if({
		g = Synth.replace(g, \gaussTrig, [\out, b, \dev, 0]);
	});
	lastDev = dev;
}, '/gausstrig');
)

x.set(\dev, 0.01);
x.set(\tempo,4);
x.set(\dev,0);

x.set(\pitch,220);
x.set(\q,44);

x.set(\amp,1);
x.set(\out,0);

x.free;

Same, but preserve whatever tempo the current trig is using.

(
SynthDef(\gaussTrig, {|tempo=4, dev=0, out=0|
	var trig = GaussTrig.ar(tempo!16,dev);
	SendReply.ar(trig, '/gausstrig', [dev,tempo]);
	Out.ar(out, trig);
}).add;

SynthDef(\ping, {
	arg trigIn = 30, pitch=220, q=12, amp=1, out=0;
	var trig, sig;
	trig = In.ar(trigIn, 16);
	sig = BPF.ar(trig,pitch*ExpRand(1,8),1/q,sqrt(q)*5);
	sig=Splay.ar(sig);
	sig = Limiter.ar(sig*amp,0.7);
	Out.ar(out,sig);
}).add;

b=Bus.audio(s, 16);
)

(
var lastDev = 0;
x=Group.new;
p = Synth(\ping, [\trigIn, b], x); 
g = Synth(\gaussTrig, [\out, b, \dev, lastDev], x);

o=OSCFunc({|msg|
	var dev = msg[3];
	(lastDev > 0).and(dev == 0.0).if({
		g = Synth.replace(g, \gaussTrig, [\out, b, \dev, 0, \tempo, msg[4]]);
	});
	lastDev = dev;
}, '/gausstrig');
)

x.set(\dev, 0.1);
x.set(\tempo,5);
x.set(\dev,0.01);
x.set(\dev,0);

x.set(\pitch,220);
x.set(\q,44);

x.set(\amp,1);
x.set(\out,0);

x.free;