e=NetAddr("169.254.237.7",57120)
e.sendMsg("/s", "yo tambien")
t=OSCresponder(nil, "/tito", {arg a,b,c; [a,b,c].postln}).add
p.pop

~mod1=32;
~mod2=16;
~mod3=16;
~modPerc=12;

~arrayPuro1=[0,16]
~arrayPuro1=[0,8,16,24]

~arrayPuro2=[28]
~arrayPuro2=[3,8,16]+4
~arrayPuro2=[0,8,16,24]+4

~arrayPuro3=(0..31)
~arrayPuro3=Array.rand(32,0,31)
~arrayPuro3=[0,1,2,3,8,9,10,11]*2

~arrayPerc=[0,2,4,8,9,10,24,28]
~arrayPerc=([0,2,4,8,9,10,24,28]-31)* -1
~arrayPerc=(0..31)
~arrayPerc=Array.rand(12,0,31)

~pPerc=Pseq([0,2,4,2,7,9,7,12].midiratio*400,100000).asStream;
~pPerc=Pseq(([0,2,4,2,7,9,7,12]+4).midiratio*400,100000).asStream;
~pPerc=Pseq(([0,2,4,5,7,9,11,12].scramble).midiratio*400,100000).asStream;
~pPerc=Pseq((([0,2,4,5,7,9,11,12]-7).scramble).midiratio*400,100000).asStream;
~pPerc=Pseq((([0,2,4,5,7,9,11,12]+17).scramble).midiratio*400,100000).asStream;

(
Tdef(\pulso, {var pulso=0;
			inf.do{
					e.sendMsg("/s", pulso%32);
					if(~arrayPuro1.find([pulso%~mod1])!=nil,{Synth(\puro, [\freq, [100,100*(7.midiratio)].choose, \dur, rand(0.1,1), \cutoff, 0.1])});
					if(~arrayPuro2.find([pulso%~mod2])!=nil,{Synth(\puro, [\freq, 250, \dur, rand(0.1,1)])});
					if(~arrayPerc.find([pulso%~modPerc])!=nil,{Synth(\perc, [\freq, ~pPerc.next, \rq, 0.05, \dur, 0.01, \rel, 0.5, \amp, 0.15])});
					//if(~arrayPuro3.find([pulso%~mod3])!=nil,{Synth(\puro, [\freq, ((pulso%7)+[72,60].choose).midicps, \dur, 0.01, \rel, 0.01, \amp, 0.23, \cutoff, ((pulso%16)+1)*0.01])});
					pulso=pulso+1;
					0.09.wait;
					}
			})
)

Tdef(\pulso).play
Tdef(\pulso).stop

(
SynthDef(\puro, {|freq=100, amp=0.5, dur,cutoff=0.2, rel=0.5|
				var sig, env;
				sig=Demand.ar(Dust.ar(100),0,Dseq([-1,0,1,0],10000));
				sig=RLPF.ar(sig,freq,cutoff,amp)!2;
				env=EnvGen.kr(Env([0,1,1,0],[0.01,dur,rel]),doneAction:2);
				Out.ar(0,sig*env);
				}).send(s)
)

Synth(\puro, [\dur, rand(0.1,1)])		

(
SynthDef(\perc, {|freq=100, amp=0.5, dur=0.5,rq=0.2, rel=0.5|
				var sig, env;
				sig=WhiteNoise.ar;
				sig=RHPF.ar(sig,freq,rq,amp)!2;
				env=EnvGen.kr(Env([0,1,1,0],[0.01,dur,rel]),doneAction:2);
				Out.ar(0,sig*env);
				}).send(s)
)

Synth(\perc, [\freq, 300, \cutoff, 0.05, \dur, 0.1, \rel, 0.01])