// WIPSupercolliderPiece-v.0.0.41-IannixXenakisStyleSuperStruktureGenerator-TiagoMoraisMorgado2022
~meinServer = ServerOptions.new; ~meinServer.memSize = 4096*512; Server.local.reboot
(
//strukt1
~strukt1_1={Mix.fill(11,{[SinOsc, Saw, Pulse].choose.ar(freq:[rrand(33,2000),rrand(33,2000)]*XLine.kr(rrand(0.125,8),rrand(0.125,8),70,doneAction:2)) })*0.06};
~strukt1_2={Mix.fill(11,{[SinOsc, Saw, Pulse].choose.ar(freq:[rrand(666,2222),rrand(666,2222)]*XLine.kr(rrand(0.125,8),rrand(0.125,8),70,doneAction:2)) })*0.06};
~strukt1_3={Mix.fill(11,{[SinOsc, Saw, Pulse].choose.ar(freq:[rrand(666,2222),rrand(666,2222)]*XLine.kr(rrand(0.125,8),rrand(0.125,8),70,doneAction:2)) })*0.06};
//strukt2
~strukt2_1={Mix.fill(11,{FreeVerb.ar([SinOsc, Saw, Pulse].choose.ar(freq:[rrand(33,2000),rrand(33,2000)] * TRand.kr(0.125,4,Impulse.kr(1/10)),mul:EnvGen.kr(Env.perc,Impulse.kr(1/2 * TRand.kr(0.125,4,Impulse.kr(1/5)))*XLine.kr(rrand(0.125,4),rrand(0.125,4),70,doneAction:2)) ))})*0.3};
~strukt2_2={Mix.fill(11,{FreeVerb.ar([SinOsc, Saw, Pulse].choose.ar(freq:[rrand(33,2000),rrand(33,2000)],mul:[0.3,0.3]) )})};
//strukt3
~strukt3={GVerb.ar([SinOsc, Saw, Pulse].choose.ar(freq:322,mul:Blip.ar(rrand(1,30)*TRand.kr(0.125,4,Impulse.kr([1/4,1/7]))*XLine.kr(rrand(0.125,4),rrand(0.125,4),80,doneAction:2))),revtime:0.3)*3};
//strukt4
~strukt4_1_1={GVerb.ar(WhiteNoise.ar(mul:Blip.ar(rrand(1,30)*TRand.kr(0.125,4,Impulse.kr([1/4,1/7]))*XLine.kr(rrand(0.125,4),rrand(0.125,4),80,doneAction:2))),revtime:0.3)*3};
~strukt4_1_2={GVerb.ar(WhiteNoise.ar(mul:ChaosGen.allSubclasses.choose.ar([rrand(1,30),rrand(1,30)]),revtime:0.3)*3)};
//strukt5
~strukt4_2_1={Mix.fill(11,{([Saw,Pulse,SinOsc].choose.ar(freq:[LFDNoise0,LFDNoise1,LFDNoise3].choose.kr(1,505,322)+666*XLine.kr(rrand(0.125,8),rrand(0.125,8),80,doneAction:2),mul:EnvGen.kr(Env.perc,Blip.ar([rrand(1,30),rrand(1,30)]))))})};
~strukt4_2_2={Mix.fill(11,{SinOsc.ar(freq:[LFDNoise1,LFDNoise3,LFDNoise0].choose.kr(1,rrand(333,6666),rrand(333,6666))*XLine.kr(rrand(0.125,8),rrand(0.125,8),80,doneAction:2)+666*XLine.kr(rrand(0.125,8),rrand(0.125,8),33,doneAction:2))})};
//strukt5
~strukt5_1={LeakDC.ar(Limiter.ar(ChaosGen.allSubclasses.choose.ar([rrand(1,30),rrand(1,30)]),6))};
//~strukt5_2={LeakDC.ar(Limiter.ar([LFDNoise0,LFDNoise1,LFDNoise3].choose.ar([rrand(1,30),rrand(1,30)])))};
//strukt6
~strukt6_1={LeakDC.ar(Limiter.ar(WhiteNoise.ar(EnvGen.kr(Env.perc,ChaosGen.allSubclasses.choose.ar([rrand(1,30),rrand(1,30)])))))};
~strukt6_2={LeakDC.ar(Limiter.ar(WhiteNoise.ar([LFDNoise0,LFDNoise1,LFDNoise3].choose.ar([rrand(1,30),rrand(1,30)]))))};
//strukt7
~strukt7_1={Pan2.ar(Mix.fill(18,{[SinOsc, Saw, Pulse].choose.ar(freq:rrand(33,2000)*XLine.kr(rrand(0.467,6.66),rrand(0.467,6.66),45,doneAction:2)) })*0.1)};
~strukt7_2={Pan2.ar(Mix.fill(18,{[SinOsc, Saw, Pulse].choose.ar(freq:rrand(666,2222)*XLine.kr(rrand(0.467,6.6),rrand(0.467,6.66),45,doneAction:2)) })*0.1)};
~strukt7_3={Pan2.ar(Mix.fill(18,{[SinOsc, Saw, Pulse].choose.ar(freq:rrand(666,2222)*XLine.kr(rrand(0.467,6.66),rrand(0.467,6.66),45,doneAction:2)) })*0.1)};
//strukt7
~strukt8={Pan2.ar(Blip.ar([rrand(1,30),rrand(1,30)]))};
//pieceA
~piece=Task({
~sec1=[~strukt1_1,~strukt1_2,~strukt1_3].choose;
~sec2=[~strukt2_1,~strukt2_2].choose;
~sec3=[~strukt3].choose;
~sec4=[~strukt4_2_1,~strukt4_2_1,~strukt4_2_2].choose;
~sec5=[~strukt5_1].choose;
~sec6=[~strukt6_1,~strukt6_2].choose;
~sec7=[~strukt7_1,~strukt7_2,~strukt7_3].choose;
~sec8=[~strukt8].choose;
// ################################################### //
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
~f1=~sec7.play; 45.wait; ~f1.free;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
~f1=~sec7.play; 45.wait; ~f1.free;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
[
[~f1=~sec1.play; 70.wait; ~f1.free;],
[~f1=~sec2.play; 70.wait; ~f1.free;],
[~f1=~sec3.play; 80.wait; ~f1.free;],
[~f1=~sec4.play; 80.wait; ~f1.free;],
[~f1=~sec5.play; 60.wait; ~f1.free;],
[~f1=~sec6.play; 60.wait; ~f1.free;]
].choose;
~f1=~sec8.play; 90.wait;~f1.free;
}).play;
)
Server.local.makeWindow;
```