(
SynthDef(\dis, {|freq, amp, dur, pan|
					var sig, env;
					sig=Pulse.ar(freq, Saw.ar(10,0.24,0.25), amp);
					sig=Pan2.ar(sig,pan);
					env=EnvGen.kr(Env.perc(0.01,dur),doneAction:2);
					Out.ar(0,sig*env);
					}).send(s);
)

(
SynthDef(\dos, {|freq, amp, dur, pan|
					var sig, env;
					sig=RHPF.ar(WhiteNoise.ar, 2600,0.1);
					sig=Pan2.ar(sig,pan);
					env=EnvGen.kr(Env.perc(0.01,dur),doneAction:2);
					Out.ar(0,sig*env);
					}).send(s);
)

(
SynthDef(\bombo, {|freq, amp, dur|
					var sig, env;
					sig=SinOsc.ar(Line.kr([280,300],60,0.05),0);
					env=EnvGen.kr(Env.perc(0.01,dur),doneAction:2);
					Out.ar(0,sig*env);
					}).send(s);
)

Synth(\bombo, [\dur, 0.5])

Synth(\dis, [\freq, 100, \amp, 1, \dur, 2])
Synth(\dos, [\freq, 100, \amp, 1, \dur, 1.05])

(
Tdef(\das, {var cuenta=0,
       	  array=Array.rand(16,0,15),
       	  array2=Array.rand(16,0,15),
       	  array3=Array.rand(16,0,15),
       	  arrayBombo=[0,4,8,12,15];
				inf.do{
						if(array.find([cuenta%16])!=nil,{Synth(\dis, [\freq, (cuenta%([2,4,8,16].choose)).midiratio*300, \amp, 1, \dur, 0.07, \pan, -1])});
						if(array3.find([cuenta%16])!=nil,{Synth(\dis, [\freq, (cuenta%([2,4,8,16].choose)).midiratio*400, \amp, 1, \dur, 0.07, \pan, 1])});
						if(array2.find([cuenta%16])!=nil,{Synth(\dis, [\freq, (cuenta%([2,4,8,16].choose)).midiratio*80, \amp, 1, \dur, 0.2])});
						Synth(\dos, [\freq, [1200,12000,5000].choose, \amp, Array.rand(4,0,1.0).choose, \dur, [0.1, 0.2, 0.4].wchoose([0.4,0.4,0.2]), \pan, 2.rand]);
						if(arrayBombo.find([cuenta%16])!=nil,{Synth(\bombo, [\dur, 0.5])});
						cuenta=cuenta+1;
						0.1.wait;
						}
			})
)

Tdef(\das).play
Tdef(\das).stop