{
   "labels" : [],
   "id" : "1-50u",
   "is_private" : null,
   "code" : "// Rumush\r\n// Facebook: https://www.facebook.com/rumushproduction\r\n// SoundCloud: https://soundcloud.com/rumushproduction\r\n// YouTube: https://www.youtube.com/channel/UCs_Cn1R4iFrYOyc8liFucSQ\r\n// Blog: https://mycelialcordsblog.wordpress.com/\r\n\r\n(\r\nfork{\r\n\tvar buf1 = Buffer.alloc(s, 4e5, 2);\r\n\tvar buf2 = Buffer.alloc(s, 2e5, 2);\r\n\tloop{\r\n\t\tvar tim = [0.5, 1, 2, 3, 4].choose;\r\n\t\tvar freq1 = [1, 5, 9, 20, 50].choose * [0.5, 2, 6, 4].choose;\r\n\t\tvar freq2 = [1, 5, 9, 20, 50].choose * [0.5, 2, 6, 4].choose;\r\n\t\t(\"loop time\" + tim).postln;\r\n\t\t(\"freq1\" + freq1).postln;\r\n\t\t(\"freq2\" + freq2).postln;\r\n\t\tplay{\r\n\t\t\tvar mainEnv = EnvGen.ar(Env.linen(tim*0.5, tim*8, tim), doneAction:2);\r\n\t\t\tvar timA = Array.geom(3, tim, 0.5);\r\n\t\t\tvar trig = Impulse.ar(timA);\r\n\r\n\t\t\tvar pos = Demand.ar(trig[1], 0, Dxrand([0, 4e5*0.25, 4e5*0.4, 4e5*0.75], inf));\r\n\t\t\tvar pos2 = Demand.ar(trig[2], 0, Dxrand([0, 2e5*0.25, 2e5*0.4, 2e5*0.75], inf));\r\n\t\t\tvar src1 = BufRd.ar(2, buf1, Phasor.ar(trig[0], 1, 0, 4e5, pos))*0.5;\r\n\t\t\tvar src2 = PinkNoise.ar(Decay.ar(trig[0]!2, 0.1, 250)).fold(-0.5, 0.5);\r\n\t\t\tvar src3 = BufRd.ar(2, buf2, Phasor.ar(trig[0], 1, 0, 2e5, pos2))*0.75;\r\n\t\t\tvar src4 = Mix.fill(8, {\r\n\t\t\t\tSinOsc.ar([freq1*100.rand, freq2*100.rand], 0, LFSaw.ar([Rand(0.25, 1), Rand(0.25, 1)])+1*0.5)*0.125\r\n\t\t\t});\r\n\t\t\tBufWr.ar(Blip.ar([freq1, freq2], LFNoise1.ar(freq1)+1*50)+src1, buf1, Phasor.ar(0, 1, 0, 2e5)+(LFNoise1.ar(freq1*0.1)+1*2e5));\r\n\t\t\tBufWr.ar(Saw.ar([freq1, freq2],0.25)+src3, buf2, LFNoise1.ar(freq2*0.1)+1*2e4);\r\n\t\t\tsrc2 = src2*0.125;\r\n\r\n\t\t\t(((src1+src2+src3+src4)*0.25).tanh)*mainEnv\r\n\t\t};tim*8.wait\r\n\t}\r\n};\r\n)",
   "name" : "Glitch Routine - Basis for 'Lost Among the Atoms' SuperCollider EP",
   "author" : "rumush",
   "description" : "Routine that randomly changes parameters of the glitch function. It is a basis for one of the tracks for 'Lost Among the Atoms' Noise/Glitch EP",
   "ancestor_list" : []
}
