{
   "name" : "Re: the perfect frequencies",
   "author" : "rumush",
   "ancestor_list" : [
      "1-4ZS"
   ],
   "description" : "Random texture generator based on 'the perfect frequencies' code with a simple routine to play it.",
   "labels" : [
      "ambient",
      "code fork",
      "random"
   ],
   "id" : "1-50j",
   "is_private" : null,
   "code" : "// Rumush\r\n// https://mycelialcordsblog.wordpress.com/\r\n// https://fungorumush.bandcamp.com/releases\r\n// https://soundcloud.com/fungorum\r\n\r\n(\r\nf = {\r\n\tvar rep = [4, 8, 16, 32];\r\n\tvar n = rep.choose;\r\n\tvar x = [\r\n\r\n\t      54, 60, 66, 72, 81, 90, 96, 102,\r\n\t      108, 128, 132, 144, 162, 180, 192, 204,\r\n\t      216, 240, 264, 288, 324, 360, 384, 408,\r\n\t      432, 480, 528, 576, 648, 720, 768, 816,\r\n\t      864, 960, 1056, 1152, 1296, 1440, 1536, 1632,\r\n\t      1728, 1920, 2112, 2304, 2592, 2880, 3072, 3264,\r\n\t      3456, 3840, 4224, 4608, 5184, 5760, 6144, 6528,\r\n\t      6912, 7680, 8448, 9216, 10368, 11520, 12288, 528\r\n\r\n       ];\r\n\tMix.fill(n,\r\n\t\t{\r\n\t\t\tvar detune = 5.rand;\r\n\t\t\tvar sin = SinOsc.ar(x.choose, 4.rand, 0.25);\r\n\t\t\tvar saw = RLPF.ar(Saw.ar(x.choose*0.01+detune, 0.75), x.choose, 2.rand).tanh;\r\n\t\t\tPan2.ar((sin+saw) * EnvGen.kr(Env.sine(12, 1/n), 1, doneAction:2),\r\n\t\t\t1.rand2) }\r\n\t);\r\n};\r\n)\r\n\r\n(\r\n// DEFINE A ROUTINE\r\nr = Routine({\r\n\r\n    inf.do({\r\n\t\tf.play;\r\n        10.wait;\r\n    })\r\n});\r\n)\r\n\r\nr.reset.play;"
}
