{
   "name" : "random 303",
   "author" : "devilfish404",
   "description" : "i found this somewhere as an example of obtrusive coding. i don't know who the original author is, sorry. I cleaned it a bit up as a study tool for myself. (learned a lot from this patch)",
   "ancestor_list" : [],
   "labels" : [],
   "id" : "1-4Uf",
   "is_private" : null,
   "code" : "(\r\n{ var lk = [0,3,7,9], jx = [3,4,2,4,2], n, ox = 10, qw, cx, oi,z,w, faz, mp,\r\n\tcs = [Select,Stepper,RLPF,LFTri,Pulse,PulseDivider,Lag2,Lag,EnvGen,\r\n\t\tSaw, LPF, PitchShift, AllpassN, Env, LocalIn, LocalOut, Impulse ];\r\n\tvar fa,ffa, ra, eca, era, fsa, xc, fxc, rq, ec, er,xcs, o,e;\r\n\tmp = {… |n,alk| alk = alk ? lk;                      \r\n\t\t{midicps(jx .choose * 12 + lk.choose) } !n };   \r\n\tfaz = [ mp.(3)* 2.midiratio, mp.( 3 )\r\n\t\t*1. midiratio, mp.( 2,[ 0,3,9 ])*5.midiratio,mp.(1 )*1.midiratio ]; \r\n\tfa = faz[[3,0,3,1,2,2,2,2, 1,1,1,1,0,3]].flat; \r\n\tn = fa.size;          \r\n\tqw = Impulse.kr(10); \r\n\tcx = PulseDivider.kr(qw, n); \r\n\toi = Stepper.kr(qw,0,0,n-1); \r\n\tfsa = { [0,0,0, 0.02,0.08,0.1 ].choose }!div(n,4);  \r\n\txcs = Select.kr( Stepper.kr( qw,0,0,fsa.size-1 ), fsa); \r\n\txc = Lag2.kr( Select.kr(oi, fa), xcs ); \r\n\tffa = { rrand( 20, 90 ) } ! n;\r\n\tffa.size.do({ |i| var pn = [2,4,8].choose;\r\n\t\tif ( 0.2.coin, { ffa[i] = Select.kr(Stepper.kr(cx, 0,0,pn-1), { rrand( 4, 70 ) } ! n) }) });\r\n\tfxc = Lag2.kr( Select.kr(oi, ffa), 0.04);\r\n\tra = { rrand(0.05,0.5) } ! n;\r\n\trq = Lag.kr( cs[0].kr(oi, ra), 0.04);\r\n\teca = { [-4,0,-1].choose } ! n;\r\n\tec = Select.kr(oi,eca);\r\n\to = Saw.ar(xc) + Pulse.ar(xc * 0.01.midiratio,1-rq) + Pulse.ar(xc *0.04.midiratio,LFTri.ar(ox/n).range(0.1,0.9),0.02) + Pulse.ar(xc *\r\n\t\t24.midiratio,LFTri.ar(ox/n/4).range(0.8,0.01),0.05);\r\n\tera = { rrand(0.8,0.4) } ! 4;\r\n\ter = Select.kr(cs[1].kr(qw, 0,0,3), era);\r\n\te = Env.new([0,1,0],[xcs/5,er],ec);\r\n\te = EnvGen.kr(e, gate:qw);\r\n\tfxc = fxc * [1.02, 0.98];\r\n\txc = xc * [0.8,1.2].scramble;\r\n\tz = cs[2].ar(o, (fxc * e).midiratio * xc, rq) + (cs[2].ar(o.neg, fxc * (50 * e)\r\n\t\t.midiratio, 0.4) *0.05) + (cs[2].ar(o.neg, fxc * (65 * e).midiratio, rq/2) *0.01) * e;\r\n\tz = (z + (cs[11].ar(z,0.001,0.5,0.1,0.1).distort * 0.5)).distort;\r\n\tw = z+ cs[14].ar (2). distort;\r\n\t10.do({ w = cs[12].ar(w,0.4,{0.03.rand}!2,{0.06.rand}!2) });\r\n\tcs[15].ar(cs[10].ar( w*0.9,800 )); (w *0.1 ) + (z * 0.7) }.play\r\n)"
}
