Hey, I’m new to SuperCollider, so please excuse a very basic question. I’m trying to just control the frequency of a SinOsc with a MIDI-controller slider. Why doesn’t this work, and how can I get it to work? (Isn’t global-variable “a” just being set to the incoming value from the MIDI controller?
s.boot;
(
SynthDef(\testOsc, {
| freq=440 |
Out.ar([0, 1], SinOsc.ar(freq, 0, 0.5));
}).add;
)
(
MIDIClient.init;
MIDIIn.connectAll;
a = MIDIFunc.cc({arg first; first.postln}, 13, 0);
z = Synth.new(\testOsc, [\freq, a]);
z.scope;
)