Sending arrays from max to sc3~

    Oct 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 =[2]);,;
    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)
    but its not working , i tried different conbinations but no luck, how
    can i solve this, any idea?

    • Oct 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 . . .
    • Nov 08 2011 | 7:22 pm
      hi Pikku,
      try this...
      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).