{
   "labels" : [
      "texture",
      "triad",
      "wibbles"
   ],
   "code" : "(\r\nSynthDef(\"wibbly\", \r\n\t{\r\n\targ out = 0, freq = #[60, 65, 57], amp = 0.5, lagTime = 0.1, trigRate = 3, detune = 0.2, noOfSynths = 20;\r\n\tvar output;\r\n\tvar maxNoOfTones = 50;\r\n\t\r\n\toutput = Mix.fill(\r\n\t\tmaxNoOfTones,\r\n\t\t{\r\n\t\targ index;\r\n\t\r\n\t\tvar trig, pitches, dseq_index;\r\n\t\ttrig = Impulse.kr(0) + Dust2.kr(trigRate);\r\n\t\tdseq_index = Drand([0, 1, 2], inf);\r\n\t\t\r\n\t\tpitches = \t\r\n\t\t\tLag.kr(\r\n\t\t\t\tSelect.kr(Demand.kr(trig, 0, dseq_index), freq) + TRand.kr(detune.neg, detune, trig),\r\n\t\t\t\tlagTime * Rand(0.8, 1.2)\r\n\t\t\t).midicps;\r\n\t\t\r\n\t\t\r\n\t\tSinOscFB.ar(\r\n\t\t\tpitches,\r\n\t\t\tRand(0, 0.8), \r\n\t\t\tamp * Lag.kr(TRand.kr(0.8, 1.0, trig), lagTime * Rand(0.8, 1.2))\r\n\t\t)\r\n\t\t*\r\n\t\t(if(index < noOfSynths, 1, 0));\r\n\t\r\n\t\t}\r\n\t);\r\n\t\r\n\toutput = Mix(output) * (1 / noOfSynths) * Line.kr(0.0, 1.0, 0.3);\r\n\t\r\n\tOut.ar(out,\r\n\t \r\n\t\toutput ! 2\r\n\t);\r\n\t\r\n\t}\r\n).send(Server.default);\r\n)\r\n\r\n// try different values for the 3 tones\r\na = Synth(\\wibbly, [\\freq, [60, 65, 69]]);\r\na.set( \\freq, [60, 60.2, 60.4]);\r\na.set( \\freq, [34, 39, 43]);",
   "id" : "1-A",
   "is_private" : null,
   "author" : "38nonprivate",
   "name" : "Wibbly Tones",
   "ancestor_list" : [],
   "description" : "Concept: instead of having 3 sustained tones making up a triad, how about having several tones that jump to the notes at random? If a number of these are heard together, the effect of hearing the triad will be the same, except the texture will be much more involving. Try setting noOfSynths to 1 or 2 to understand the concept.\r\nRoom for improvement: pan the tones, perhaps using Splay to make a nice stereo effect."
}
