Hello everyone!
I’ve got a very silly question. I’ll post here an example just to be simple and get rid of every complication.
Let’s say I have an Array2D 2x2 containing MIDI notes:
~notes = Array2D.fromArray(2, 2, [60,61,62,63]);
Let’s say I need to set the frequency of a synth passing two coordinates of that array. Because of OSC messages, I ended up with a syntax like this (I need to use the .set method):
SynthDef.new(\try, {
arg lagtime = 3
var sig;
sig = SinOsc.ar(FREQUENCY.kr(20).lag(lagtime);
Out.ar(0, Pan2.ar(sig, 0, 1));
}).add;
)
x = Synth.new(\try);
x.set(\coordinatex, 0, \coordinatey, 0);
So, basically I need to convert the coordinates into frequencies INSIDE the synth (if possible), maintaining the subsequent methods (.kr and .lag, in this case).
Any idea?
Thank you a lot for the help!