// unit generators  UGens 
{Saw.ar(100)}.play

{ Resonz.ar(Saw.ar(100), LFNoise1.kr(1).range(300, 1200), 0.1) }.play

{ Resonz.ar(Saw.ar(100), LFNoise1.kr(1, 450, 750), 0.1) }.play

{ Resonz.ar(Saw.ar(100), LFNoise1.kr(0.3).range(300, 1200), 0.01) }.play
{ Resonz.ar(Saw.ar(100), LFNoise1.kr(1).range(300, 1200), 1) }.play

\symbol

g = Group(s)
g.free
g
s.class
g.class

(
SynthDef(\overtone, { 
	Out.ar(0, Resonz.ar(Saw.ar(100), LFNoise1.kr(0.3).range(300, 1200), 0.1));

	}).store   // send, play, load and other
)

y = Synth(\overtone)
y.free

(
y = SynthDef.new(\overtone, { 
	Out.ar(0, Resonz.ar(Saw.ar(100), LFNoise1.kr(0.3).range(300, 1200), 0.1));
	}).play
)

y.free

(
y = SynthDef.new(\overtone, { 
	Out.ar(0, Resonz.ar(Saw.ar(100), LFNoise1.kr(0.3).range(300, 1200), 0.1));
	})
)

y.free

(
SynthDef.new(\overtone, { 
	var source, freq, filtered;
	source = Saw.ar(100);
	freq = LFNoise1.kr(0.3).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	}).store
)

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=0.3;
	var source, freq, filtered;
	source = Saw.ar(basefreq);
	freq = LFNoise1.kr(lfo).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	}).store
)

y = Synth(\overtone)
y.set(\lfo, 12)
y.set(\lfo, 1)
y.set(\lfo, 7, \basefreq, 300)

y.free

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=0.3;
	var source, freq, filtered;
	source = Saw.ar(basefreq);
	freq = LFNoise1.kr(lfo).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	}).play
)

y = Synth(\overtone, [\basefreq, 50])
a = Synth(\overtone, [\basefreq, 71])
b = Synth(\overtone, [\basefreq, 111])
c = Synth(\overtone, [\basefreq, 200, \lfo, 5])
y.free
c.free

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=0.3;
	var source, freq, filtered;
	source = Saw.ar(basefreq);
	freq = LFNoise1.kr(lfo).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	Out.ar(1, filtered);	
}).play
)

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=0.3;
	var source, freq, filtered;
	source = Saw.ar(basefreq);
	freq = LFNoise1.kr(lfo).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, [filtered, source * 0.05].sum);
	//Out.ar(0, filtered + (source * 0.05));
}).play
)

[1,2,3,4].sum

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=0.3;
	var source, freq, filtered;
	source = Saw.ar(basefreq);
	freq = LFNoise1.kr(lfo).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, [filtered, Impulse.ar(5)]);
}).play
)

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=0.3;
	var source, freq, filtered,source2, freq2, filtered2;
	source = Saw.ar(basefreq);
	freq = LFNoise1.kr(lfo).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	source2 = Saw.ar(basefreq+ 2.7);
	freq2 = LFNoise1.kr(lfo).range(300, 1200);
	filtered2 = Resonz.ar(source2, freq2, 0.1);
	Out.ar(0, [filtered, filtered2]);
}).play
)

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=0.3;
	var source, freq, filtered;
	source = Saw.ar( [ basefreq, basefreq + 2.7 ] );
	freq = LFNoise1.kr(lfo).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	}).play
)

// multi-channel expansion

a = (10 .. 20) // Array.series(11, 10, 1)
a[2]					// a.at(2)

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=5.3;
	var source, freq, filtered;
	source = Saw.ar( [ basefreq, basefreq * 1.01 ] );
	freq = LFNoise1.kr( [lfo, lfo * 1.1] ).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	}).play
)

(
SynthDef.new(\overtone, { arg basefreq=100, lfo=5.3;
	var source, freq, filtered;
	source = Saw.ar( [ basefreq, basefreq * 1.01 ] );
	freq = LFNoise1.kr( [lfo, lfo * 1.1] ).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	}, [25]).store
)

y = Synth(\overtone, [\basefreq, 50])
y.set(\basefreq, 500)
y.set(\basefreq, 5)

(
SynthDef.new(\overtone, { arg basefreq=100, bft=0, lfo=5.3;
	var source, freq, filtered;
	source = Saw.ar( basefreq.lag(bft) ); // Lag.kr(basefreq)
	freq = LFNoise1.kr( [lfo, lfo * 1.1] ).range(300, 1200);
	filtered = Resonz.ar(source, freq, 0.1);
	Out.ar(0, filtered);
	}).store
)

y = Synth(\overtone, [\basefreq, 50])
y.set(\basefreq, 500)
y.set(\bft, 10, \basefreq, 5)
y.set(\bft, 0)
y.set(\basefreq, 200)

Array.fill(100, { rrand(-1.0, 1.0) })
{ rrand(-1.0, 1) } ! 100
1.0.rand2

(
SynthDef("test", {
	var sig, amp;
	amp = { LFNoise1.kr(rrand(0.5, 0.9)).exprange(0.001, 0.1) } ! 100; // { }.dup(100)
	sig = SinOsc.ar(Array.exprand(100, 100.0, 5000.0), 0, amp );
	sig = Pan2.ar(sig, { 1.0.rand2 } ! 100);
	sig = sig.sum;
	sig = Limiter.ar(sig, 0.95);
	Out.ar(0, sig);
	}).play
)