{
   "name" : "Lag to make waves",
   "author" : "38nonprivate",
   "ancestor_list" : [],
   "description" : "A starting point for \"analogue emulation.\" Lagging a Pulse in different ways depending on direction of the input (up or down) changes the waveform as MouseX is swept from left to right.",
   "labels" : [
      "waveforms",
      "analogue",
      "analog"
   ],
   "code" : "(\r\n{\r\nvar freq = 100, shape, up, down, output;\r\n\r\nshape = MouseX.kr(0, 1);\r\n\r\nup = shape.clip(0.5, 1.0);\r\nup = [0.5, 1.0].asSpec.unmap(up);\r\nup = [0.0, 0.5].asSpec.map(up);\t\r\ndown = shape.clip(0.0, 0.5);\r\n\r\n//up.poll; down.poll;\r\n\r\noutput = Lag2UD.ar(Pulse.ar(freq, 0.5), freq.reciprocal * up, freq.reciprocal * down);\r\noutput ! 2\r\n\r\n}.scope;\r\n)",
   "is_private" : null,
   "id" : "1-y"
}
