{
   "description" : "Simple Pulse with some delayed feedback and a 2D Slider as an interface. Sliding around gives different effects to just clicking in different spots.",
   "ancestor_list" : [],
   "author" : "whillas",
   "name" : "fun little instrument",
   "id" : "1-4Wr",
   "is_private" : null,
   "code" : "(\r\n\r\n// Levels scaling\r\n//m = m ? 0.8;// live\r\nm = m ? 1.2;// rehersal\r\n\r\nNdef(\\pul, { | freq=80, rq=0.001, amp = 0.91 |\r\n\tRLPF.ar(\r\n\t\tPulse.ar([100,250],0.5,0.1),\r\n\t\tfreq: freq,\r\n\t\trq: rq,\r\n\t\tmul: amp\r\n\t)\r\n\t+ (DelayC.ar(Ndef(\\pul).ar) * 0.9)\r\n}).play;\r\n\r\n// GUI: 2D slider\r\nw = Window(\"Pulse\", Rect(100,Window.screenBounds.height - 400, 300, 300));\r\nw.view.decorator = FlowLayout(w.view.bounds);\r\nt = Slider2D(w, Rect(0, 0,292, 292))\r\n\t.y_(1.0)\r\n\t.x_(0.0)\r\n\t.background_(Color.rand)\r\n\t.knobColor_(Color.rand)\r\n\t.action_({|pos|\r\n\t\tNdef(\\pul).set(\r\n\t\t\t\\freq, pos.x.linexp(0,1.0, 80, 8000),\r\n\t\t\t\\rq, pos.y.linlin(0, 1.0, 0.001, 1.0)\r\n\t\t)\r\n\t});\r\nw.front;\r\nCmdPeriod.doOnce({w.close; Ndef(\\pul).clear(4)});\r\n\r\n)\r\n\r\n// Kill it\r\nw.close; Ndef(\\pul).clear(4);",
   "labels" : [
      "feedback",
      "spacey",
      "instrument"
   ]
}
