Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Simple Amplitude Trigger (language side)
name
code content
( // Simple amplitude trigger SynthDef(\ampTrigger, { |in| var snd = SoundIn.ar(in); var chain = FFT(LocalBuf(512), snd); // here tune the threshold and sensitivity: var trig = Onsets.kr(chain, 0.5); SendReply.kr(trig, '/ampTrigger', Amplitude.kr(snd)); }).add; ) // start the tracker on scsynth Synth(\ampTrigger); ( // receive the values in sclang OSCdef(\ampTrigger, { |m| m.postln; // now use m[3] for your purpose // or just fire up a synth from this function ;) }, '/ampTrigger'); )
code description
Simple amplitude trigger using Onsets, Amplitude and SendReply for sending triggers to sclang from SoundIn.
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change