p= ProxySpace.push(s.boot)
p.makeTempoClock(2)
c= p.clock

//--?
(SynthDef(\asdf, {|out= 0, freq= 200, amp= 0.1, t_trig= 0|
	var e, z;
	e= EnvGen.ar(Env.perc(0.001, 0.1), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(111, 0, freq/10, freq), 0, amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)

Pdef(\first, Pbind(\instrument, \asdf)).play(c)
Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq(1.dup(10)++0.24.dup(20), inf)))
Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq((1.dup(10)++0.2.dup(20)).scramble, inf)))
Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq((1.dup(10)++0.2.dup(20)).scramble, inf), \freq, Pseq((200.dup(10)++300.dup(20)).scramble, inf)))
Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq((1.dup(8)++0.2.dup(8)).scramble, inf), \freq, Pseq((200.dup(4)++300.dup(4)++400.dup(4)).scramble, inf)))

(SynthDef(\asdf, {|out= 0, freq= 200, amp= 0.1, t_trig= 0, len= 0.1|
	var e, z;
	e= EnvGen.ar(Env.perc(0.001, len), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(111, 0, freq/(e+1), freq), 0, amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)

Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq({1.0.rand}.dup(8).normalizeSum*4, inf), \freq, Pseq((200.dup(4)++300.dup(4)++400.dup(4)).scramble, inf)))
Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq({1.0.rand}.dup(8).normalizeSum*4, inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq((200.dup(4)++300.dup(4)++400.dup(4)).scramble, inf)))
Pdef(\second, Pbind(\instrument, \asdf, \dur, Pseq({1.0.rand}.dup(8).normalizeSum*4, inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq((100.dup(4)++150.dup(4)++200.dup(4)).scramble, inf))).play(c)
Pdef(\third, Pbind(\instrument, \asdf, \dur, Pseq({1.0.rand}.dup(8).normalizeSum*4, inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq((500.dup(4)++700.dup(4)++900.dup(4)).scramble, inf))).play(c)

Pdef(\third, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(8).normalizeSum*4), inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq((500.dup(4)++700.dup(4)++900.dup(4)).scramble, inf)))
Pdef(\second, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(8).normalizeSum*4), inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq((100.dup(4)++150.dup(4)++200.dup(4)).scramble, inf)))
Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(8).normalizeSum*4), inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq((200.dup(4)++300.dup(4)++400.dup(4)).scramble, inf)))

Pdef(\third, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(8).normalizeSum*4), inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq([600, 800]++((500.dup(4)++700.dup(4)++900.dup(4)).scramble), inf)))
Pdef(\second, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(8).normalizeSum*4), inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq([125, 175]++((100.dup(4)++150.dup(4)++200.dup(4)).scramble), inf)))
Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(8).normalizeSum*4), inf), \len, Pseq([0.1, 0.2], inf), \freq, Pseq([250, 350]++((200.dup(4)++300.dup(4)++400.dup(4)).scramble), inf)))
Pdef(\third).quant_(4)
Pdef(\second).quant_(4)
Pdef(\first).quant_(4)

Pdef(\third).stop
Pdef(\second).stop
Pdef(\first).stop
(
Pdef(\third).play(c);
Pdef(\second).play(c);
Pdef(\first).play(c);
)

(SynthDef(\asdf, {|out= 0, freq= 200, amp= 0.1, t_trig= 0, len= 0.1|
	var e, z;
	e= EnvGen.ar(Env.perc(0.001, len), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(111, 0, freq/(1-e+1), freq), 0, amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)
(SynthDef(\asdf, {|out= 0, freq= 200, amp= 0.1, t_trig= 0, len= 0.1|
	var e, z;
	e= EnvGen.ar(Env.perc(0.001, len), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(111, 0, freq/(2-e+1), freq), SinOsc.ar(e, 0, pi*2), amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)
(SynthDef(\asdf, {|out= 0, freq= 200, amp= 0.1, t_trig= 0, len= 0.1|
	var e, z;
	e= EnvGen.ar(Env.perc(0.001, len), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(111, 0, freq/(SinOsc.kr(~tempo.kr/4, 0, 1, 2)-e+1), freq), SinOsc.ar(e, 0, pi*2), amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)

(SynthDef(\asdf, {|out= 0, freq= 200, amp= 0.1, t_trig= 0, len= 0.1|
	var e, z;
	e= EnvGen.ar(Env.perc(0.001, len), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(111*(SinOsc.ar(0, e*2*pi, 0.5, 1)), 0, freq/(SinOsc.kr(~tempo.kr/4, 0, 1, 2)-e+1), freq), SinOsc.ar(e, 0, pi*2), amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)

(SynthDef(\asdf, {|out= 0, freq= 200, amp= 0.1, t_trig= 0, len= 0.1|
	var e, z;
	e= EnvGen.ar(Env.perc(0.001, len), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(222*(SinOsc.ar(0, e*2*pi, 0.5, 1)), 0, freq/(SinOsc.kr(~tempo.kr/4, 0, 1, 2)-e+1), freq), SinOsc.ar(e, 0, pi*2), amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)

(SynthDef(\asdf, {|out= 0, freq= 200, freq2= 222, amp= 0.1, t_trig= 0, len= 0.1, attack= 0.001|
	var e, z;
	e= EnvGen.ar(Env.perc(attack, len), t_trig, doneAction:2);
	z= SinOsc.ar(SinOsc.ar(freq2*(SinOsc.ar(0, e*2*pi, 0.5, 1)), 0, freq/(SinOsc.kr(~tempo.kr/4, 0, 1, 2)-e+1), freq), SinOsc.ar(e, 0, pi*2), amp);
	Out.ar(out, Pan2.ar(z*e, SinOsc.kr(0.2, 0, 0.5)));
}).store)

Pdef(\second).pause
Pdef(\third).pause

Pdef(\synth).quant_(4).play(c)
Pdef(\synth, Pbind(\instrument, \asdf, \freq, 50, \freq2, 600))
Pdef(\synth, Pbind(\instrument, \asdf, \freq, 50, \freq2, Prand([600, 700, 800], inf), \len, Prand([0.1, 0.2, 0.3], inf)))
Pdef(\synth, Pbind(\instrument, \asdf, \freq, 100, \freq2, Prand([600, 700, 800], inf), \len, Prand([0.1, 0.2, 0.3], inf)))
Pdef(\synth, Pbind(\instrument, \asdf, \freq, Pseq([Pn(100, 14), 120, 150], inf), \dur, Pseq([Pn(1, 14), 0.75, 1.25], inf), \freq2, Prand([600, 700, 800], inf), \len, Prand([0.1, 0.2, 0.3], inf)))

Pdef(\synth2).quant_(4).play(c)
Pdef(\synth2, Pbind(\instrument, \asdf, \freq, 200, \dur, 0.25, \freq2, 1600, \amp, 0.06))
Pdef(\synth2, Pbind(\instrument, \asdf, \freq, 200, \dur, 0.25, \freq2, Pseq([Pn(1600, 13), 2000, 2400, 2800], inf), \amp, 0.06))
Pdef(\synth2, Pbind(\instrument, \asdf, \freq, 200, \dur, Pseq([Pn(0.25, 14*4), 0.125, 0.125, 0.125, 0.625], inf), \freq2, Pseq([Pn(1600, 13), 2000, 2200, 2000, 2400, 2600, 2000, 2800], inf), \amp, 0.08))

Pdef(\second).resume

//bd
Pdef(\synth3).quant_(4).play(c)
Pdef(\synth3, Pbind(\instrument, \asdf, \freq, 50, \freq2, 100))

Pdef(\third).resume
Pdef(\third).pause
Pdef(\first).pause

//bass
Pdef(\synth4).quant_(4).play(c)
Pdef(\synth4, Pbind(\instrument, \asdf, \freq, 100, \freq2, 100, \len, 1))
Pdef(\synth4, Pbind(\instrument, \asdf, \freq, 100, \freq2, 200, \len, 1))
Pdef(\synth4, Pbind(\instrument, \asdf, \freq, 100, \freq2, 100, \len, 1))
Pdef(\synth4, Pbind(\instrument, \asdf, \freq, Pseq([Pn(100, 8), 100, 120, 100, 150, 100, 100, 150, 150], inf), \freq2, Pseq([100, Prand([20, 15, 10], inf)], inf), \len, 1.2))

Pdef(\second).pause
Pdef(\first).resume
Pdef(\second).resume

Pdef(\first, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(4).normalizeSum*4), inf), \len, Pseq([0.08, 0.12], inf), \freq, Pseq([250, 350]++((200.dup(4)++300.dup(4)++400.dup(4)).scramble), inf)))
Pdef(\second, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(4).normalizeSum*4), inf), \len, Pseq([0.08, 0.12], inf), \freq, Pseq([125, 175]++((100.dup(4)++150.dup(4)++200.dup(4)).scramble)+100, inf)))
Pdef(\third, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(4).normalizeSum*4), inf), \len, Pseq([0.08, 0.12], inf), \freq, Pseq([600, 800]++((500.dup(4)++700.dup(4)++900.dup(4)).scramble), inf), \amp, Pfunc({0.1.rand})))
Pdef(\third).resume
Pdef(\third, Pbind(\instrument, \asdf, \dur, Pseq([0.25, 0.25]++({1.0.rand}.dup(4).normalizeSum*4), inf), \len, Pseq([0.08, 0.12], inf), \freq, Pseq([600, 800]++((500.dup(4)++700.dup(4)++900.dup(4)).scramble), inf)+200, \amp, Pfunc({0.1.rand})))

Pdef(\synth4, Pbind(\instrument, \asdf, \freq, Pseq([Pn(100, 8), 100, 120, 100, 150, 100, 100, 150, 150], inf), \freq2, Pseq([100, Prand([20, 15, 10], inf)], inf)+100, \len, 1.2))

Pdef(\synth3, Pbind(\instrument, \asdf, \freq, 750, \freq2, 40, \dur, 0.5))
Pdef(\synth3, Pbind(\instrument, \asdf, \freq, 750, \freq2, 10, \dur, 0.5))
Pdef(\synth3, Pbind(\instrument, \asdf, \freq, 750, \freq2, Pn(Pseries(1, 1, 40), inf), \dur, 0.5))
Pdef(\synth2, Pbind(\instrument, \asdf, \freq, Pn(Pseries(200, 50, 10), inf), \dur, Pseq([Pn(0.25, 14*4), 0.125, 0.125, 0.125, 0.625], inf), \freq2, Pseq([Pn(1600, 13), 2000, 2200, 2000, 2400, 2600, 2000, 2800], inf), \amp, 0.08))
Pdef(\synth, Pbind(\instrument, \asdf, \freq, Pseq([Pn(100, 14), 120, 150], inf), \dur, Pseq([Pn(1, 14), 0.75, 1.25], inf), \freq2, Pn(Pseries(500, 100, 12)), \len, Pn(Pseries(0.1, 0.2, 5), inf)))

(SynthDef(\efx, {|out= 0, del= 0.4|
	ReplaceOut.ar(out, CombL.ar(In.ar(0, 2), 1, del))
}).send(s))
~efx= \efx
~efx.play
~efx.set(\del, c.tempo/4)
(SynthDef(\efx, {|out= 0, del= 0.4, dec= 1|
	var in;
	in= In.ar(0, 2);
	ReplaceOut.ar(out, CombL.ar(in, 1, del, dec, 0.9, in))
}).send(s))
~efx= \efx
~efx.set(\dec, 0.2)
~efx.set(\del, 0.25)
~efx.set(\dec, 3)
~efx.set(\dec, 0.4)
(SynthDef(\efx, {|out= 0, del= 0.4, dec= 1, q= 0.1|
	var in;
	in= In.ar(0, 2);
	ReplaceOut.ar(out, CombL.ar(RLPF.ar(in, SinOsc.kr(~tempo.kr/4, 0, 200, 600), q), 1, del, dec, 0.9, in))
}).send(s))
~efx= \efx
~efx.set(\dec, 1/3, \del, 1/3)
~efx.set(\dec, 1/3, \del, 2/3)
~efx.set(\dec, 1/3, \del, c.tempo/5)

Pdef(\synth, Pbind(\instrument, \asdf, \freq, Pseq([Pn(100, 14), 120, 150], inf), \dur, Pseq([Pn(1, 14), 0.75, 1.25], inf), \freq2, Pn(Pseries(500, 50, 20)), \len, Pn(Pseries(0.05, 0.1, 20), inf)))
Pdef(\third).pause
Pdef(\first).pause
Pdef(\synth2, Pbind(\instrument, \asdf, \freq, Pn(Pseries(100, 50, 12), inf), \dur, Pseq([Pn(0.25, 14*4), 0.125, 0.125, 0.125, 0.625], inf), \freq2, Pseq([Pn(1600, 13), 2000, 2200, 2000, 2400, 2600, 2000, 2800], inf), \amp, 0.08))
Pdef(\synth3, Pbind(\instrument, \asdf, \freq, 950, \freq2, Pn(Pseries(1, 1, 40), inf), \dur, 0.5))
Pdef(\synth3, Pbind(\instrument, \asdf, \freq, Pseq([Pn(750, 16), Pn(950, 14), Prand([1050, 2050, 3050], 2)], inf), \freq2, Pn(Pseries(1, 1, 40), inf), \dur, 0.5))
Pdef(\synth3, Pbind(\instrument, \asdf, \freq, Pseq([Pn(750, 16), Pn(950, 14), Prand([1050, 2050, 1550], 2)], inf), \freq2, Pn(Pseries(1, 1.1, 40), inf), \dur, Pwrand([0.5, Pn(0.125, 4), Pn(0.24, 2)], #[0.9, 0.05, 0.05], inf)))
Pdef(\synth4, Pbind(\instrument, \asdf, \freq, Pseq([100, 120, 100, 150, 100, 100, 150, 150]-100*2+100, inf), \freq2, Pseq([100, Prand([20, 15, 10], inf)], inf)+100, \len, 1.2))
Pdef(\second).pause
Pdef(\first).resume
Pdef(\first).pause
Pdef(\third).resume
Pdef(\second).resume
(SynthDef(\efx, {|out= 0, del= 0.4, dec= 1, q= 0.1|
	var in;
	in= In.ar(0, 2);
	ReplaceOut.ar(out, CombL.ar(BPF.ar(in, SinOsc.kr(~tempo.kr/4, 0, 200, 600), q*2), 1, del, dec, 0.9, in))
}).send(s))
~efx= \efx
(SynthDef(\efx, {|out= 0, del= 0.4, dec= 1, q= 0.1|
	var in;
	in= In.ar(0, 2);
	ReplaceOut.ar(out, CombL.ar(LPF.ar(in, SinOsc.kr(~tempo.kr/4, 0, 200, 600)), 1, del, dec, 0.9, in))
}).send(s))
~efx= \efx
~efx.end
Pdef(\second).stop
Pdef(\synth).stop
Pdef(\synth3).stop
Pdef(\synth4).stop
~efx= \efx
~efx.play
~efx.set(\del, 0.1)
~efx.set(\dec, 0.8)
~efx.set(\del, 0.05)
Pdef(\first).resume
Pdef(\synth2).stop
~efx.set(\dec, 2)
~efx.set(\del, 1)
~efx.set(\del, 1.5)
~efx.set(\del, 2)
Pdef(\first).stop
Pdef(\third).isPlaying
Pdef(\third).stop
~efx.end
p.clear
p.pop