// title: Simple Amplitude Tracker (language side) // author: rukano // description: // It's jsut an amplitude tracker, to exaplin how to send values from scsynth to sclang. // code: ( // Simple amplitude tracker sending values to sclang SynthDef(\ampTracker, { |in| var freq = 30; // num of values per second SendReply.kr(Impulse.kr(freq), '/amp', Amplitude.kr(SoundIn.ar(in))); }).add; ) // start the tracker on scsynth Synth(\ampTracker); ( // receive the values in sclang OSCdef(\ampTracker, { |m| m.postln; // now use m[3] for your purpose (detecting changes, etc...) }, '/amp'); )