Forums > MaxMSP

Sending arrays from max to sc3~

October 28, 2011 | 12:44 pm

Hello , do anybody is using the object sc3~ in max?
I need to send arrays from max to the sc3~ object in max.

this is the code i have inside my sc3~ object

SynthDef("Lin", {arg out=0, freqs = #[1300, 1490, 3587, 1741];
var signal;
signal = LinCongC.ar(freqs[2]);
Out.ar(out, Pan2.ar(signal));
}).send(s);

then im generating my object in max in this way:

sc3 y = Synth("Lin").play

and them im trying to send my arrays from max to sc3~ in this way:

[454, 7767, 7888, 666]
|
|
sc3 y.set("freqs", $1)
|
|
sc3~

but its not working , i tried different conbinations but no luck, how
can i solve this, any idea?

cheers

Pikku


October 28, 2011 | 1:37 pm

Have you checked the help ?
I thought something like this was covered under vars or something in one of the subpatchs . . .
hth
MM



f
November 8, 2011 | 7:22 pm

hi Pikku,
try this…

– Pasted Max Patch, click to expand. –

in general it’s easier if you use symbols (") instead of strings ("") because then you can skip the escape characters () in max.

i edited your synthdef a little. freqs[2] means you only use the third value out of the array but i think you meant to have all four frequencies there. and i also added a Splay to spread the four channels out in the stereo field (sc3~ is stereo only).

_f


Viewing 3 posts - 1 through 3 (of 3 total)