osc events in supercollider
supercollider uses osc to controll the synthisizers internally, but i wanted a supercollider synth to react to my osc events instead of having to send supercollider-osc events from my app
after some research in the help files i found out that OSCresponderNode does the trick.
the code example shows how to register for an osc event and trigger a synth. now i can use a supercollidersynt with my ruby osc sequencer
(
SynthDef( "guru2", { arg mfreq=40;
var env, amp;
env = Env.perc( 0, 0.2 );
amp = EnvGen.kr(env, 1, doneAction:2);
Out.ar([0,1], SinOsc.ar( mfreq.midicps ) * amp * 0.5);
}).send(s);
)
n = NetAddr("127.0.0.1", 57120)
o = OSCresponderNode(nil, '/melody', { |t, r, msg| Synth( "guru2", [\mfreq, msg[1]]); }).add;
o.remove
read more ...SuperCollider on Linux
Today i have installed supercollider on my ubutu system following this instructions. SuperCollider is a environment and programming language for audio synthesis simliar to chuck. SuperCollider can run on a network and uses OSC events for comunication.
After looking around in the source tree i found a plugin for vim :-)
Installations is a bit quirky (the folders 'ftpplugin', 'syntax' and 'intend' needed to be copied to ~/.vim by hand) but now i can edit my sc code using my vim - veeeery cool :-)
single lines of code can be sent to the server using F6 codeblocks are sent to the server using F5.
s.boot
(
c = { arg f=900;
var x;
x = SinOsc.ar(f);
x * 0.1
}.play;
)
c.set(, 400);
c.set(, 670);
to start te server the first line has to be sent to sclang (using F6). Then the code block starting line 2 is sent to the server (using F5)... tata - a sine wave.
sending the last 2 lines (F6 again) change the frequency of the running synth.
F12 can be used to turn all sounds off.
read more ...

