[maxmsp] [OT]SuperCollider from max
Gary Lee Nelson
gary.nelson at oberlin.edu
Thu Jul 12 06:23:04 MDT 2007
- Previous message: [maxmsp] [OT]SuperCollider from max
- Next message: [maxmsp] [OT]SuperCollider from max
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have SCPlayer that instantiates and plays SC3 synthdefs from max in a
manner somewhat like poly~. If you have trouble with this, let me know and
I can send a .sit or .zip file. The main patch uses my random objects
available at www.timara.oberlin.edu/garyleenelson.
Test with this synthdef:
SynthDef("SH",
{
arg rate = 12, att = 0, decay = 5.0, offset = 400;
var env, out, pan, max;
pan = LFNoise1.kr(1/3);
env = EnvGen.kr(Env.perc(att, decay), doneAction: 2);
out = Pan2.ar(
Blip.ar(LFNoise0.ar(rate, min(100, offset), offset),
(env)*12 + 1, 0.3), pan)*env;
Out.ar(0, out)
}).send(s)
)
Here's SCPlayer:
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 404 60 103 196617 pack target 1000 16;
#P newex 247 333 70 196617 pack target 0;
#P newex 247 287 62 196617 prepend set;
#P outlet 397 277 15 0;
#P newex 397 233 96 196617 +;
#P newex 506 112 27 196617 - 1;
#N counter 0 15;
#X flags 0 0;
#P newobj 398 207 68 196617 counter 0 15;
#P newex 404 86 113 196617 unpack target 1000 16;
#P newex 508 178 332 196617 t b b b l b b b;
#P newex 247 369 148 196617 sprintf set s_new %s %ld 1 0;
#P newex 77 77 123 196617 route target parameters;
#P window setfont "Fixedwidth Serif" 10.;
#P window linecount 3;
#P message 753 329 122 1441802 set script new cycle newex 32 250 128 196617
cycle;
#P window setfont "Sans Serif" 9.;
#P message 785 279 102 196617 set script new Label newex 32 300 128 196617
Label;
#P window linecount 2;
#P message 901 244 104 196617 script delete cycle \, script delete Label;
#P outlet 187 597 15 0;
#P window linecount 3;
#P message 365 473 125 196617 script connect Label 0 prepender 0 \, script
connect trigger 1 cycle 0;
#P window linecount 4;
#P message 512 512 57 196617 script connect cycle \$1 Label \$1;
#P window linecount 1;
#P newex 512 485 27 196617 - 1;
#P newex 440 415 80 196617 uzi 8;
#P message 585 354 64 196617 append \$1 1;
#P window setfont "Fixedwidth Serif" 10.;
#P window linecount 0;
#P message 585 483 303 1441802;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 667 240 80 196617 prepend append;
#P newex 585 323 34 196617 zl len;
#P window setfont "Fixedwidth Serif" 10.;
#P window linecount 0;
#P message 667 416 219 1441802;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 187 112 53 196617 t b l b b;
#P objectname trigger;
#N thispatcher;
#Q end;
#P newobj 512 603 61 196617 thispatcher;
#P inlet 77 49 15 0;
#P newex 534 140 89 196617 route parameters;
#P newex 404 32 140 196617 patcherargs;
#P newex 248 476 78 196617 prepend append;
#P objectname prepender;
#P window linecount 0;
#P message 187 515 143 196617;
#P window linecount 2;
#P comment 561 34 421 196617 args: arg1 is name of SC3 synthdef that has
been loaded into DSP. arg2 is starting nodeID for a series of s_new
messages. arg3 is the maximum number of instances (like poly~);
#P window linecount 1;
#P comment 639 142 373 196617 atrributes: @parameters specify the names of
parameters in the target synthdef;
#P window linecount 2;
#P comment 98 48 273 196617 attributes can be sent through inlet. Lists
members are distribute across nsythdef parameters;
#P fasten 25 6 20 0 831 204 906 204;
#P fasten 25 5 21 0 778 211 790 211;
#P fasten 25 4 22 0 725 225 758 225;
#P fasten 25 2 10 0 619 285 672 285;
#P fasten 21 0 10 0 790 304 672 304;
#P fasten 12 0 10 0 672 268 672 268;
#P fasten 25 3 11 0 672 223 590 223;
#P connect 25 3 12 0;
#P fasten 25 1 13 0 566 377 590 377;
#P fasten 22 0 13 0 758 403 590 403;
#P fasten 14 0 13 0 590 409 590 409;
#P fasten 11 0 15 1 590 348 515 348;
#P fasten 11 0 14 0 590 347 590 347;
#P connect 5 1 6 0;
#P fasten 20 0 8 0 906 585 517 585;
#P fasten 18 0 8 0 370 602 517 602;
#P fasten 10 0 8 0 672 578 517 578;
#P fasten 13 0 8 0 590 571 517 571;
#P connect 17 0 8 0;
#P connect 16 0 17 0;
#P connect 15 2 16 0;
#P fasten 23 1 25 0 138 145 513 145;
#P connect 6 0 25 0;
#P connect 26 2 28 0;
#P fasten 26 1 29 1 460 161 488 161;
#P fasten 28 0 27 4 511 136 459 136;
#P fasten 25 0 15 0 513 305 445 305;
#P connect 33 0 26 0;
#P connect 5 0 33 0;
#P fasten 9 3 27 0 234 137 403 137;
#P fasten 29 0 32 1 402 265 312 265;
#P connect 29 0 30 0;
#P connect 27 0 29 0;
#P fasten 15 1 18 0 480 452 370 452;
#P connect 32 0 24 0;
#P fasten 9 2 32 0 220 321 252 321;
#P connect 31 0 32 0;
#P fasten 23 0 31 0 82 153 252 153;
#P fasten 26 0 31 0 409 120 252 120;
#P connect 3 0 19 0;
#P fasten 24 0 3 0 252 450 192 450;
#P fasten 4 0 3 0 253 502 192 502;
#P connect 9 0 3 0;
#P connect 23 2 9 0;
#P connect 7 0 23 0;
#P window clipboard copycount 34;
And here's SHmax2sc that uses it:
#P window setfont "Sans Serif" 9.;
#P number 319 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 62 343 126 196617 udpsend 127.0.0.1 57110;
#P newex 339 119 84 196617 RanAB 100 1000;
#P button 60 60 15 0;
#P newex 60 118 60 196617 Ranab 7 19;
#P newex 153 117 69 196617 RanAB 10 10;
#P newex 246 117 69 196617 RanAB 20 20;
#P newex 60 194 291 196617 pack 0. 0. 0. 0.;
#P window linecount 3;
#P message 96 283 156 196617 s_new SH 2004 1 0 rate 7.050488 att 10. decay
20. offset 999.454041;
#P window linecount 1;
#P newex 96 256 62 196617 prepend set;
#P newex 61 224 268 196617 SCplayer SH 2000 32 @parameters rate att decay
offset;
#P window setfont "Sans Serif" 18.;
#P comment 97 51 282 196626 SH uses sh.rtf synthdef;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 360 250 100 196617 nodeID assigned to synthdef instance;
#P comment 430 119 204 196617 get my random number generators at
www.timara.oberlin.edu/garyleenelson;
#P connect 11 0 6 3;
#P connect 10 0 9 0;
#P connect 10 0 8 0;
#P connect 10 0 7 0;
#P connect 10 0 11 0;
#P connect 3 1 13 0;
#P fasten 7 0 6 2 251 170 251 170;
#P connect 8 0 6 1;
#P connect 4 0 5 0;
#P connect 3 0 4 0;
#P connect 3 0 12 0;
#P connect 6 0 3 0;
#P connect 9 0 6 0;
#P window clipboard copycount 14;
On 7/12/07 5:54 AM, "Kasper T Toeplitz" <kasper at club-internet.fr> wrote:
>
>
> hi
>
> following my message(s) in the "Multi-language Max/MSP (B Garton)"
> thread (yesterday), I am still searching for a way to control synth
> params of SuperCollider3 from max
>
> it is still not clear for me hox to do it (using OSC)
>
> the max part of it seems clear (sending osc , on address 127.0.0.1,
> port 157120)
>
> if anyone had a simple exemple of how to receive it in SC3, that would be
> great
>
> many thanks
>
> kasper
Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson
- Previous message: [maxmsp] [OT]SuperCollider from max
- Next message: [maxmsp] [OT]SuperCollider from max
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
