{
   "name" : "Simple Amplitude Tracker (language side)",
   "author" : "rukano",
   "ancestor_list" : [],
   "description" : "It's jsut an amplitude tracker, to exaplin how to send values from scsynth to sclang.",
   "labels" : [
      "amplitude tracker"
   ],
   "code" : "(\r\n// Simple amplitude tracker sending values to sclang\r\nSynthDef(\\ampTracker, { |in|\r\n\tvar freq = 30; // num of values per second\r\n\tSendReply.kr(Impulse.kr(freq), '/amp', Amplitude.kr(SoundIn.ar(in)));\r\n}).add;\r\n)\r\n\r\n// start the tracker on scsynth\r\nSynth(\\ampTracker);\r\n\r\n(\r\n// receive the values in sclang\r\nOSCdef(\\ampTracker, { |m|\r\n\tm.postln;\r\n\t// now use m[3] for your purpose (detecting changes, etc...)\r\n}, '/amp');\r\n)",
   "id" : "1-4V8",
   "is_private" : null
}
