(
SynthDef(\algo, {|freq, dur, gate, cutoff, rq|
				var sig, env;
				sig=RLPF.ar(Pulse.ar(Array.rand(10,30,40),Array.rand(10,0.01,0.5),1/5),cutoff, rq);
				env=EnvGen.kr(Env([0,1,1,0],[0,dur,0]),doneAction:2);
				Out.ar(0,sig*env);
				}).send(s);
)

Synth(\algo, [\cutoff, 3000, \rq, 0.1, \dur, 3])

(
SynthDef(\agudo, {|freq, dur, amp, att, decay|
				var sig, env;
				fm=SinOsc.ar(10,0,freq/2, freq+60);
				sig=SinOsc.ar(fm, 0, amp).wrap2(0.12);
				env=EnvGen.kr(Env([0,1,1,0],[att,dur,decay]),doneAction:2);
				Out.ar(0,sig*env);
				}).send(s);
)

Synth(\agudo, [\freq, 6000, \amp, 0.5, \dur, 1])			
(
SynthDef(\onda, {|freq, dur, amp, att, decay, |
				var sig, fm, env;
				fm=SinOsc.ar(10,0,freq/2, freq+60);
				sig=SinOsc.ar(fm, 0, amp).wrap2(0.12);
				sig=sig*SinOsc.ar(10);
				env=EnvGen.kr(Env([0,1,1,0],[att,dur,decay]),doneAction:2);
				Out.ar(0,sig*env*4.6);
				}).send(s);
)
Synth(\onda, [\freq, 1600, \amp, 1, \dur, 4])		

(
Tdef(\asi, {var cuenta=0,
		     wait=1,
			arrayUno=Array.series(10,0,9),
			arrayDos=Array.rand(10,0,9),
			arrayTres=Array.rand(8,0,9);

			inf.do{
				   (
					SynthDef(\algo, {|freq, dur, gate, cutoff, rq|
								var sig, env;
								sig=RLPF.ar(Pulse.ar(Array.rand(10,30,40),Array.rand(10,0.01,0.5),1/5),cutoff, rq);
								sig=sig*SinOsc.kr(rrand(5,20));
								env=EnvGen.kr(Env([0,1,1,0],[0.1,dur,0]),doneAction:2);
								Out.ar(0,sig*env);
								}).send(s);
					);
					
				 if(cuenta%10==10.rand,{Synth(\algo, [\cutoff, (cuenta%13)*100, \rq, 0.1, \dur, 0.13])});
				   if(arrayUno.find([cuenta%12])!=nil,{Synth(\agudo, [\freq, (cuenta%3).midiratio*200, \amp, [0,1].choose, \dur, 0.1, \att,0, \decay, rrand(0.04,0.2)])});
				   if(arrayDos.find([cuenta%13])!=nil,{Synth(\agudo, [\freq, (cuenta%3).midiratio*230, \amp, [0,1].choose, \dur, 0.1, \att, 0, \decay, rrand(0.04,0.2)])});
				   
				   if(arrayTres.find([cuenta%10])!=nil,{Synth(\onda, [\freq, (cuenta%4).midiratio*700, \amp,  [0,1].choose, \dur, 0.0124])	});
				  cuenta=cuenta+1;
				  wait=([0.025,0.05,0.075]*1).choose;
				  wait.wait
				  }
		})
)		

Tdef(\asi).play