SynthDef(\sound,{arg freq=440,amp=0.1,pan=0.0, dur=0.1;
var sound;

sound= Line.kr(1,0,dur,doneAction:2)*BPF.ar(Blip.ar(freq,10,amp),freq*3,0.1);

Out.ar(0,Pan2.ar(sound,pan))
}).send(s);

Synth(\sound);

(
Tdef(\task1,{
var waittime= 0.5;

loop {

waittime= (waittime*([0.9,1.1].choose)).min(1.0).max(0.1);

Synth(\sound,[\freq,waittime*440,\pan,rrand(-1.0,0.0)]);

waittime.wait;

}

});
)

Tdef(\task1).play;
Tdef(\task1).stop;

(
Tdef(\task2,{
var waittime= 0.5;

loop {

waittime= (waittime*([0.9,1.1].choose)).min(1.0).max(0.1);

Synth(\sound,[\freq,waittime*460,\pan,rrand(0.0,1.0)]);

waittime.wait;

}

});
)

Tdef(\task2).play;
Tdef(\task2).stop;

(
var num;

num=15;

num.do {arg i;

Tdef((\task++(i+3)).asSymbol,{
var waittime= 0.25;

loop {

waittime= (waittime*([0.9,1.1].choose)).min(2.0).max(0.05);

Synth(\sound,[\freq,waittime*(1000+(i*200)),\pan, (i/(num-1)*2-1),\dur,0.6*((i+1)/num)]);

waittime.wait;

}

}).play;
};
)

(
var num;

num=15;

num.do {arg i;

Tdef((\task++(i+3)).asSymbol).stop;
};
)

(
SynthDef(\sound2,{arg freq=440,amp=0.1,pan=0.0, q=0.1,dur=0.1;
var sound;

sound= Line.kr(1,0,dur,doneAction:2)*BPF.ar(PinkNoise.ar(amp),freq,q,10);

Out.ar(0,Pan2.ar(sound,pan))
}).send(s);
)

Synth(\sound2);

(
Tdef(\task20,{
var waittime= 0.5;

loop {

waittime= (waittime*([0.6,1.5].choose)).min(2.0).max(0.03);

Synth(\sound2,[\freq,waittime*220,\pan,rrand(-1.0,1.0),\q,rrand(0.05,0.2)]);

waittime.wait;

}

});
)

Tdef(\task20).play;
Tdef(\task20).stop;

(
SynthDef(\sound3,{arg freq=440,amp=0.1,pan=0.0, q=0.1,dur=0.1;
var sound;

sound= Line.kr(1,0,dur,doneAction:2)*BRF.ar(BrownNoise.ar(amp),freq,q);

Out.ar(0,Pan2.ar(sound,pan))
}).send(s);
)

Synth(\sound3);

(
Tdef(\task21,{
var waittime= 0.5;

loop {

waittime= (waittime*([0.6,1.5].choose)).min(2.0).max(0.03);

Synth(\sound3,[\freq,waittime*220,\pan,rrand(-1.0,1.0),\q,rrand(0.05,0.2)]);

waittime.wait;

}

});
)

Tdef(\task21).play;
Tdef(\task21).stop;

(
a=SynthDef(\fx1,{

Out.ar(0,CombN.ar(In.ar(0,2),0.1,0.1,MouseX.kr(0.1,10,\exponential)))
}).play(RootNode.new,addAction:\addToTail);
)

a.free

(
b=SynthDef(\fx2,{

ReplaceOut.ar(0,Resonz.ar(In.ar(0,2),MouseX.kr(100,10000,'exponential'),MouseY.kr(0.1,1)))
}).play(RootNode.new,addAction:\addToTail);
)

b.free