Forums > MaxMSP

Tidying up your patchers

November 3, 2006 | 1:43 pm

does anyone have any bits of help for tidying up your patchers and making them a little more user friendly. or is it just a matter of hiding objects on lock, using send/receives and sub patchers and a bit of elbow grease?

Also any help with the more graphical side of max will be helpful too. how do i make my patchers look pretty?


November 3, 2006 | 3:08 pm

I’ve been taking lessons at harvestworks and was surprised to find
out that even people of max seniority have patchers that look like
max’s splash screen. one of the things I have been taking away from
the lessons, is that theres something to be said for just not
worrying about tidyness in order to keep up with creative flow.

For me, as a conceptual person, the most important thing is that when
I open or glance at a patch, the order of operation / procedural
nature should be obvious. encapsulating long strings of procedural
objects helps this. when patching, I hardly let more than 2 or 3
patch chords cross eachother. if they cross at a right angle, I
color one.

Tim Place said he never trusted pvar once. He’s certainly more
learned than me but I can’t live with out it. If my interface
touches my code, it makes it impossible to organize especially in
large patches. I mean hopefully, your working towards something
reusable. pvar makes things easy to tuck away. who wants to be
creative in an environment 99 percent of the stuff on the screen, you
don’t want to think about.

below is a typical matt patch. it doesn’t do anything as its part of
a larger program but its a good example of tidyness. it could have
been a mess if not for segmented patch chords, pvar, and encapsulation

rant ended.
-matt

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 418 413 82 196617 r enablemodules;
#P hidden newex 375 444 38 196617 gate 1;
#P hidden newex 581 148 64 196617 route $1 all;
#P hidden newex 581 127 70 196617 r connections;
#P hidden newex 333 181 78 196617 r findmidiports;
#N vpatcher 20 74 620 474;
#P outlet 19 299 15 0;
#P inlet 76 29 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 64 145 67 196617 unpack 0 0 0;
#P message 106 72 58 196617 200 200 0;
#P message 87 107 58 196617 200 0 200;
#P message 72 88 58 196617 0 200 200;
#P message 55 230 88 196617 lin frgb $1 $1 $1;
#P message 56 202 96 196617 thru frgb $1 $1 $1;
#P message 50 267 95 196617 bez frgb $1 $1 $1;
#P newex 72 50 64 196617 select 0 1 2;
#P connect 2 0 9 0;
#P connect 3 0 9 0;
#P connect 1 0 9 0;
#P connect 7 2 1 0;
#P connect 7 1 3 0;
#P connect 7 0 2 0;
#P connect 6 0 7 0;
#P connect 4 0 7 0;
#P connect 5 0 7 0;
#P connect 8 0 0 0;
#P connect 0 0 4 0;
#P connect 0 1 5 0;
#P connect 0 2 6 0;
#P pop;
#P hidden newobj 554 252 30 196617 p;
#P window setfont "Sans Serif" 10.;
#P user com 101 131 37 196618 3;
#K set 0 25189 31337 25970;
#K end;
#B frgb 200 200 200;
#P objectname bez;
#P user com 101 117 37 196618 3;
#K set 0 27753 28261 24946;
#K end;
#B frgb 200 200 200;
#P objectname lin;
#P window setfont "Sans Serif" 9.;
#P hidden newex 50 263 68 196617 autopattr $1;
#X prestore incc 1 0 127;
#X prestore inchannel 1 0 16;
#X prestore inport 1 0 "CME UF MIDI Device (v1.1)";
#X prestore intype 1 0 Controller;
#X prestore max 1 0 1.;
#X prestore mid 1 0 0.426667;
#X prestore min 1 0 0.;
#X prestore outcc 1 0 1;
#X prestore outchannel 1 0 1;
#X prestore outport 1 0 "from Max/MSP 2";
#X prestore outtype 1 0 Controller;
#X prestore scaletype 1 0 0;
#X prestore slope 1 0 -0.6;
#P objectname $1;
#P hidden newex 615 215 98 196617 prepend script send;
#N thispatcher;
#Q end;
#P hidden newobj 615 236 61 196617 thispatcher;
#P hidden newex 517 174 81 196617 route find reset;
#N vpatcher 20 74 620 474;
#P window setfont "Sans Serif" 9.;
#P hidden newex 50 164 40 196617 unpack;
#P hidden newex 95 84 48 196617 pack 0 0;
#P hidden message 76 85 14 196617 1;
#P hidden newex 76 137 29 196617 t l 0;
#P hidden newex 76 106 29 196617 gate;
#P hidden newex 74 50 40 196617 ctlin;
#P inlet 76 65 15 0;
#P inlet 74 30 15 0;
#P outlet 80 186 15 0;
#P outlet 50 186 15 0;
#P connect 6 0 9 0;
#P connect 9 0 0 0;
#P connect 2 0 4 0;
#P connect 3 0 7 0;
#P hidden connect 7 0 5 0;
#P hidden fasten 6 1 5 0 100 161 134 161 134 103 81 103;
#P hidden connect 5 0 6 0;
#P connect 9 1 1 0;
#P connect 4 1 8 0;
#P connect 8 0 5 1;
#P connect 4 2 8 1;
#P pop;
#P hidden newobj 414 331 60 196617 p midilearn;
#P hidden newex 419 288 57 196617 pvar learn;
#P button 175 83 15 0;
#P objectname learn;
#P user lcd 53 100 50 50 0 1 0 0 0;
#P objectname lcd;
#P hidden newex 517 308 56 196617 pvar lcd 4;
#P hidden newex 666 465 62 196617 prepend set;
#P hidden newex 645 484 62 196617 prepend set;
#P hidden newex 624 503 62 196617 prepend set;
#P hidden newex 603 522 62 196617 prepend set;
#N vpatcher 526 44 1220 786;
#P window setfont "Sans Serif" 9.;
#P newex 178 402 84 196617 loadmess local 0;
#N comlet tolcd;
#P outlet 153 429 15 0;
#N comlet clicked;
#P inlet 331 85 15 0;
#N comlet coordinates;
#P inlet 286 85 15 0;
#N comlet max;
#P outlet 329 357 15 0;
#N comlet slope;
#P outlet 303 357 15 0;
#N comlet mid;
#P outlet 279 357 15 0;
#N comlet min;
#P outlet 258 357 15 0;
#N comlet type;
#P inlet 52 294 15 0;
#N comlet max;
#P inlet 427 248 15 0;
#N comlet slope;
#P inlet 401 248 15 0;
#N comlet mid;
#P inlet 380 248 15 0;
#N comlet min;
#P inlet 356 248 15 0;
#N vpatcher 20 74 620 474;
#P window setfont "Sans Serif" 9.;
#P hidden newex 180 351 109 196617 sprintf lineto %ld %ld;
#P message 340 108 14 196617 1;
#P newex 65 324 29 196617 t l 2;
#P newex 65 302 38 196617 gate 2;
#P newex 290 334 46 196617 tap.thru;
#P hidden newex 50 353 117 196617 sprintf moveto %ld %ld;
#P message 371 101 33 196617 clear;
#P button 360 71 15 0;
#P hidden newex 106 227 79 196617 scale 0 1 1 0.;
#P hidden newex 57 266 71 196617 Lmult 50. 50.;
#P hidden newex 57 242 54 196617 pack 0. 0.;
#P newex 160 84 88 196617 unpack 0. 0. 0. 0.;
#P button 79 67 15 0;
#P hidden newex 79 115 79 196617 scale 1 20 0 1.;
#P hidden newex 79 90 40 196617 uzi 20;
#P newex 148 50 73 196617 pak 0. 0. 0. 0.;
#N vpatcher 30 89 630 489;
#P window setfont "Sans Serif" 9.;
#P newex 191 106 63 196617 select dump;
#P outlet 374 336 15 0;
#P newex 330 299 51 196617 zl slice 1;
#P newex 330 279 96 196617 pack 0 0 0. 0. 0. 0.;
#P inlet 390 156 15 0;
#P inlet 356 157 15 0;
#P inlet 321 157 15 0;
#P inlet 286 158 15 0;
#N comlet type;
#P inlet 191 84 15 0;
#P inlet 100 48 15 0;
#P outlet 82 325 15 0;
#P newex 146 159 27 196617 + 1;
#N vpatcher 645 207 1245 607;
#P outlet 348 240 15 0;
#P outlet 5 238 15 0;
#P outlet 107 289 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 138 158 27 196617 + 0.;
#P newex 161 132 27 196617 / 6.;
#P newex 161 101 30 196617 !- 0.;
#P inlet 27 32 15 0;
#P inlet 268 29 15 0;
#P newex 99 73 53 196617 bondo 4;
#P newex 48 187 71 196617 expr $f1-$f2;
#P newex 128 187 72 196617 expr $f1+$f2;
#P inlet 113 30 15 0;
#P inlet 138 30 15 0;
#P outlet 48 289 15 0;
#P connect 7 0 12 0;
#P connect 5 0 4 0;
#P connect 4 0 0 0;
#P connect 2 0 5 0;
#P connect 3 0 11 0;
#P connect 10 0 4 1;
#P connect 1 0 5 1;
#P connect 7 0 5 2;
#P fasten 5 0 3 0 102 90;
#P connect 5 1 10 0;
#P connect 6 0 5 3;
#P connect 9 0 10 1;
#P connect 5 2 8 0;
#P connect 8 0 9 0;
#P connect 5 3 8 1;
#P connect 10 0 3 1;
#P connect 6 0 13 0;
#P pop;
#P newobj 136 212 60 196617 p;
#P newex 100 278 79 196617 scale 0 1 0. 1.;
#P window setfont "Sans Serif" 14.;
#N vpatcher 10 59 608 518;
#P inlet 508 150 15 0;
#P inlet 467 152 15 0;
#P inlet 442 149 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P user com 399 102 117 196617 12;
#K set 0 10345 28192 28532 26725 29216 30575 29284 29486 11822 8311
29798 16169;
#K end;
#P comment 399 88 98 196617 b , c = control points;
#P comment 399 74 78 196617 a , d = endpoints;
#P comment 399 60 89 196617 p = percent (0-1);
#P user com 241 46 303 196617 32;
#K set 0 24874 28766 13088 8224 11040 8224 25130 13098 28766 12842
10289 11632 10528 8224 8235 8224 25386 13098 28714 10289 11632 10590
12832 8224 8235 8224 8224 25642 10289 11632 10590 13056;
#K end;
#P window linecount 0;
#P newex 334 67 30 196617 !- 1.;
#P window linecount 1;
#P newex 402 217 29 196617 * 3.;
#P newex 370 216 29 196617 * 3.;
#P newex 137 321 208 196617 expr $f7*$f2+$f5*$f4+$f3*$f6+$f1*$f8;
#P newex 195 144 92 196617 expr pow($f2\,3);
#P newex 133 176 115 196617 expr $f1*pow($f2\,2);
#P newex 86 214 115 196617 expr pow($f1\,2)*$f2;
#P window linecount 0;
#P newex 37 229 40 196617 pow 3.;
#P outlet 137 346 15 0;
#P inlet 424 148 15 0;
#P inlet 165 43 15 0;
#P connect 0 0 3 0;
#P connect 0 0 4 0;
#P connect 0 0 5 0;
#P connect 3 0 7 0;
#P connect 7 0 2 0;
#P connect 1 0 7 1;
#P fasten 10 0 4 1 339 206 196 206;
#P connect 4 0 7 2;
#P connect 0 0 6 0;
#P connect 8 0 7 3;
#P fasten 10 0 5 1 339 164 243 164;
#P connect 5 0 7 4;
#P fasten 10 0 6 1 339 110 282 110;
#P connect 9 0 7 5;
#P connect 6 0 7 6;
#P connect 18 0 7 7;
#P connect 0 0 10 0;
#P connect 16 0 8 0;
#P connect 17 0 9 0;
#P pop;
#P newobj 115 238 68 196622 p bezier;
#P window setfont "Sans Serif" 9.;
#P newex 85 210 40 196617 gate 3;
#P connect 1 0 5 0;
#P connect 2 0 5 0;
#P connect 0 0 5 0;
#P connect 4 0 0 0;
#P connect 0 1 2 0;
#P connect 6 0 0 1;
#P connect 0 2 1 0;
#P connect 3 0 1 1;
#P fasten 8 0 3 0 291 191 141 191;
#P fasten 8 0 2 3 291 267 144 267;
#P connect 3 1 1 2;
#P connect 15 1 4 0;
#P fasten 9 0 3 1 326 199 157 199;
#P fasten 11 0 2 4 395 269 157 269;
#P connect 3 2 1 3;
#P fasten 10 0 3 2 361 205 173 205;
#P connect 3 3 1 4;
#P fasten 11 0 3 3 395 207 189 207;
#P connect 7 0 15 0;
#P hidden fasten 15 0 12 0 196 274 335 274;
#P hidden fasten 15 1 12 0 249 274 335 274;
#P connect 12 0 13 0;
#P connect 8 0 12 2;
#P connect 13 1 14 0;
#P connect 9 0 12 3;
#P connect 10 0 12 4;
#P connect 11 0 12 5;
#P pop;
#P hidden newobj 110 203 79 196617 p bezier;
#P inlet 148 30 15 0;
#P inlet 122 151 15 0;
#P inlet 211 30 15 0;
#P inlet 190 30 15 0;
#P inlet 169 30 15 0;
#P outlet 290 356 15 0;
#P button 80 187 15 0;
#P connect 21 0 18 0;
#P connect 10 0 13 0;
#P connect 13 0 14 0;
#P connect 22 0 20 0;
#P fasten 21 1 20 0 89 347 128 347 128 295 70 295;
#P connect 20 0 21 0;
#P connect 8 0 11 0;
#P connect 11 0 9 0;
#P connect 9 2 10 0;
#P connect 5 0 0 0;
#P connect 14 0 20 1;
#P connect 15 0 13 1;
#P connect 7 0 15 0;
#P connect 10 0 7 0;
#P connect 5 0 7 1;
#P connect 12 0 7 2;
#P fasten 0 0 8 0 85 218 23 218 23 46 153 46;
#P connect 6 0 8 0;
#P connect 12 1 7 3;
#P connect 8 0 12 0;
#P connect 12 2 7 4;
#P connect 2 0 8 1;
#P connect 12 3 7 5;
#P connect 20 1 23 0;
#P connect 3 0 8 2;
#P connect 4 0 8 3;
#P connect 17 0 19 0;
#P connect 18 0 19 0;
#P connect 23 0 19 0;
#P connect 19 0 1 0;
#P connect 16 0 22 0;
#P connect 8 0 16 0;
#P connect 16 0 17 0;
#P pop;
#P newobj 118 356 88 196617 p;
#N vpatcher 20 74 620 474;
#P origin 0 -23;
#P window setfont "Sans Serif" 9.;
#P newex 50 190 56 196617 lmult 1 -1;
#P newex 87 135 47 196617 lmult -1;
#P newex 52 165 27 196617 ladd;
#P newex 168 196 27 196617 + 1;
#P newex 137 171 31 196617 / 16;
#P hidden newex 137 133 40 196617 unpack;
#P newex 137 95 29 196617 t l 0;
#P newex 137 73 29 196617 gate;
#P inlet 137 53 15 0;
#P inlet 53 21 15 0;
#N comlet clicked3rd;
#P outlet 168 218 15 0;
#P objectname clicke;
#N comlet deltaxy;
#P outlet 50 212 15 0;
#P objectname relative;
#P connect 9 0 11 0;
#P connect 11 0 0 0;
#P connect 2 0 9 0;
#P connect 10 0 9 1;
#P fasten 5 0 10 0 142 122 114 122 92 122;
#P fasten 5 1 4 0 161 117 177 117 177 56 142 56;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P fasten 2 0 4 1 58 49 161 49;
#P connect 7 0 8 0;
#P connect 8 0 1 0;
#P pop;
#P newobj 217 133 90 196617 p;
#P button 303 220 15 0;
#P newex 327 133 46 196617 select 1;
#P newex 190 226 37 196617 zl rev;
#P newex 190 251 39 196617 unpack;
#N vpatcher 20 74 620 474;
#P inlet 97 31 15 0;
#P inlet 170 46 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 86 180 73 196617 clip -100 100;
#P newex 53 99 40 196617 / 100.;
#P newex 85 145 27 196617 + 0.;
#P newex 101 100 31 196617 float;
#P inlet 50 30 15 0;
#P outlet 86 202 15 0;
#P connect 1 0 4 0;
#P connect 4 0 3 0;
#P connect 6 0 5 0;
#P connect 3 0 5 0;
#P connect 5 0 0 0;
#P connect 7 0 2 0;
#P connect 2 0 3 1;
#P fasten 5 0 2 1 91 210 145 210 145 91 127 91;
#P pop;
#P newobj 229 303 41 196617 p slope;
#N vpatcher 20 74 620 474;
#P inlet 117 25 15 0;
#P inlet 170 46 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 86 180 61 196617 clip -10 10;
#P newex 53 99 40 196617 / 300.;
#P newex 85 145 27 196617 + 0.;
#P newex 101 100 31 196617 float;
#P inlet 50 30 15 0;
#P outlet 86 202 15 0;
#P connect 1 0 4 0;
#P connect 4 0 3 0;
#P connect 6 0 5 0;
#P connect 3 0 5 0;
#P connect 5 0 0 0;
#P connect 7 0 2 0;
#P connect 2 0 3 1;
#P fasten 5 0 2 1 91 210 145 210 145 91 127 91;
#P pop;
#P newobj 183 303 34 196617 p mid;
#N vpatcher 20 74 620 474;
#P inlet 141 41 15 0;
#P inlet 170 46 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 86 180 47 196617 clip 0 1.;
#P newex 53 99 40 196617 / 300.;
#P newex 85 145 27 196617 + 0.;
#P newex 101 100 31 196617 float;
#P newex 50 50 58 196617 unpack 0 0;
#P inlet 50 30 15 0;
#P outlet 86 202 15 0;
#P connect 1 0 2 0;
#P connect 2 1 5 0;
#P connect 5 0 4 0;
#P connect 7 0 6 0;
#P connect 4 0 6 0;
#P connect 6 0 0 0;
#P connect 8 0 3 0;
#P connect 3 0 4 1;
#P fasten 6 0 3 1 91 210 145 210 145 91 127 91;
#P pop;
#P newobj 275 303 37 196617 p max;
#N vpatcher 5 135 605 535;
#P inlet 120 49 15 0;
#P window setfont "Sans Serif" 9.;
#P flonum 115 154 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 43 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P inlet 163 39 15 0;
#P newex 86 180 47 196617 clip 0 1.;
#P newex 53 99 40 196617 / 300.;
#P newex 85 145 27 196617 + 0.;
#P newex 101 100 31 196617 float;
#P newex 50 50 58 196617 unpack 0 0;
#P inlet 50 30 15 0;
#P outlet 66 240 15 0;
#P connect 5 0 8 0;
#P connect 1 0 2 0;
#P connect 2 1 5 0;
#P connect 6 0 0 0;
#P connect 5 0 4 0;
#P connect 7 0 6 0;
#P connect 4 0 6 0;
#P connect 10 0 3 0;
#P connect 3 0 4 1;
#P connect 3 0 9 0;
#P fasten 6 0 3 1 91 210 145 210 145 91 127 91;
#P pop;
#P newobj 137 303 34 196617 p min;
#P newex 187 199 40 196617 gate 3;
#P number 368 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 16 0 11 0;
#P connect 1 0 2 0;
#P connect 2 0 11 1;
#P connect 9 0 2 1;
#P connect 24 0 23 0;
#P connect 11 0 23 0;
#P connect 4 0 11 2;
#P connect 12 0 2 2;
#P connect 5 0 11 3;
#P connect 6 0 4 0;
#P connect 10 1 1 0;
#P connect 1 1 7 0;
#P connect 7 0 6 0;
#P connect 3 0 11 4;
#P connect 9 0 4 1;
#P connect 13 0 4 2;
#P connect 21 0 10 0;
#P connect 10 0 1 1;
#P connect 6 1 5 0;
#P connect 9 0 5 1;
#P connect 2 0 17 0;
#P connect 14 0 5 2;
#P connect 1 2 3 0;
#P connect 4 0 18 0;
#P connect 9 0 3 1;
#P connect 22 0 10 1;
#P connect 15 0 3 2;
#P connect 8 0 9 0;
#P connect 5 0 19 0;
#P connect 22 0 8 0;
#P connect 3 0 20 0;
#P pop;
#P hidden newobj 521 419 92 196617 p LCDCONTROL;
#P hidden newex 586 373 57 196617 pvar slope;
#P hidden newex 573 353 50 196617 pvar mid;
#P hidden newex 599 395 53 196617 pvar max;
#P hidden newex 560 333 50 196617 pvar min;
#P hidden newex 501 219 77 196617 pvar scaletype;
#N vpatcher 244 153 957 828;
#P origin -8 2;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 157 52 53 196617 enable $1;
#P newex 158 30 82 196617 r enablemodules;
#P window linecount 0;
#P newex 196 102 44 196617 zl rot 1;
#P newex 124 343 40 196617 / 127.;
#P newex 31 105 40 196617 / 128.;
#P newex 31 77 44 196617 xbendin;
#P newex 104 137 46 196617 select 0;
#N comlet port;
#P inlet 15 22 15 0;
#P newex 124 287 27 196617 + 1;
#N comlet type;
#P inlet 124 260 15 0;
#N comlet control signal;
#P outlet 265 403 15 0;
#N comlet channel;
#P inlet 307 318 15 0;
#P newex 265 379 29 196617 gate;
#P newex 290 345 27 196617 ==;
#P newex 15 46 37 196617 midiin;
#B color 5;
#N comlet control change;
#P inlet 243 117 15 0;
#N comlet input;
#P inlet 319 144 15 0;
#P newex 196 169 29 196617 gate;
#P newex 222 144 27 196617 ==;
#P newex 124 316 162 196617 switch 6;
#P newex 86 105 40 196617 unpack;
#P newex 197 123 40 196617 unpack;
#P newex 86 77 340 196617 midiparse;
#B color 5;
#P connect 15 0 8 0;
#P connect 22 0 8 0;
#P fasten 8 0 17 0 20 71 36 71;
#P connect 17 0 18 0;
#P fasten 8 0 0 0 20 70 91 70;
#P connect 0 0 2 0;
#P connect 2 1 16 0;
#P connect 13 0 14 0;
#P connect 14 0 3 0;
#P connect 3 0 19 0;
#P fasten 0 4 3 1 311 224 154 224;
#P lcolor 4;
#P connect 21 0 22 0;
#P fasten 16 1 3 2 145 196 179 196;
#P connect 0 2 20 0;
#P connect 4 0 5 0;
#P connect 20 0 1 0;
#P fasten 5 0 3 3 201 188 204 188;
#P connect 1 0 5 1;
#P connect 1 1 4 0;
#P fasten 18 0 3 4 36 216 229 216;
#P connect 7 0 4 1;
#P fasten 2 0 3 5 91 210 254 210;
#P connect 9 0 10 0;
#P connect 10 0 12 0;
#P fasten 6 0 3 6 324 228 279 228;
#P fasten 19 0 10 1 129 369 289 369;
#P fasten 0 6 9 0 421 239 295 239;
#P connect 11 0 9 1;
#P pop;
#P hidden newobj 333 415 66 196617 p inselector;
#N vpatcher 592 136 1192 536;
#P origin -20 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden message 42 301 53 196617 enable $1;
#P hidden newex 43 279 82 196617 r enablemodules;
#P number 229 140 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 54 24 30 196617 type;
#P comment 7 41 100 196617 port;
#P window linecount 0;
#P newex 36 53 27 196617 + 1;
#P newex 35 73 53 196617 gate 4;
#P newex 146 107 41 196617 * 127.;
#P newex 79 108 62 196617 prepend set;
#P newex 35 149 54 196617 prepend 1;
#P newex 35 108 41 196617 * 127.;
#P newex 229 107 53 196617 * 16383.;
#P newex 39 177 92 196617 midiformat;
#N comlet out;
#P outlet 308 204 15 0;
#P hidden newex 15 325 43 196617 midiout;
#N comlet control signal;
#P inlet 280 27 15 0;
#N comlet channel;
#P inlet 188 141 15 0;
#P comment 131 73 55 196617 controller;
#N comlet controller;
#P inlet 114 72 13 0;
#P newex 229 187 50 196617 xbendout;
#P comment 183 155 100 196617 channel;
#N comlet port;
#P inlet 0 24 15 0;
#N comlet type;
#P inlet 38 24 15 0;
#P comment 295 30 100 196617 input;
#P fasten 2 0 9 0 5 216 20 216;
#P fasten 11 0 9 0 44 216 20 216;
#P fasten 4 0 9 0 234 216 20 216;
#P connect 23 0 9 0;
#P connect 18 0 17 0;
#P connect 17 0 13 0;
#P fasten 15 0 14 0 84 144 40 144;
#P connect 13 0 14 0;
#P connect 1 0 18 0;
#P hidden connect 22 0 23 0;
#P connect 14 0 11 2;
#P fasten 8 0 17 1 285 53 83 53;
#P connect 5 0 15 0;
#P connect 16 0 11 4;
#P fasten 7 0 11 6 193 171 122 171;
#P lcolor 5;
#P fasten 17 1 16 0 54 98 151 98;
#P fasten 17 2 12 0 68 95 234 95;
#P connect 12 0 21 0;
#P connect 21 0 4 0;
#P fasten 7 0 4 1 193 171 274 171;
#P lcolor 5;
#P fasten 17 3 10 0 82 92 313 92;
#P pop;
#P hidden newobj 312 599 66 196617 p;
#P hidden newex 340 531 58 196617 pvar outcc;
#P hidden newex 361 353 52 196617 pvar incc;
#P hidden newex 375 376 75 196617 pvar inchannel;
#P hidden newex 347 331 62 196617 pvar intype;
#P hidden newex 312 462 45 196617 midiinfo;
#B color 5;
#P hidden newex 354 553 81 196617 pvar outchannel;
#P hidden newex 326 509 68 196617 pvar outtype;
#P hidden newex 312 487 76 196617 pvar outport 3;
#P hidden newex 333 304 70 196617 pvar inport 3;
#P hidden newex 333 273 45 196617 midiinfo;
#B color 5;
#P hidden message 333 253 59 196617 controllers;
#N vpatcher 30 89 630 489;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 80 300 47 196617 clip 0 1.;
#P window linecount 0;
#P newex 191 106 63 196617 select dump;
#P outlet 374 336 15 0;
#P newex 330 299 51 196617 zl slice 1;
#P newex 330 279 96 196617 pack 0 0 0. 0. 0. 0.;
#P inlet 390 156 15 0;
#P inlet 356 157 15 0;
#P inlet 321 157 15 0;
#P inlet 286 158 15 0;
#P inlet 191 84 15 0;
#P inlet 100 48 15 0;
#P outlet 82 325 15 0;
#P newex 146 159 27 196617 + 1;
#N vpatcher 645 207 1245 607;
#P outlet 348 240 15 0;
#P outlet 5 238 15 0;
#P outlet 107 289 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 138 158 27 196617 + 0.;
#P newex 161 132 27 196617 / 6.;
#P newex 161 101 30 196617 !- 0.;
#P inlet 27 32 15 0;
#P inlet 268 29 15 0;
#P newex 99 73 53 196617 bondo 4;
#P newex 48 187 71 196617 expr $f1-$f2;
#P newex 128 187 72 196617 expr $f1+$f2;
#P inlet 113 30 15 0;
#P inlet 138 30 15 0;
#P outlet 48 289 15 0;
#P connect 7 0 12 0;
#P connect 5 0 4 0;
#P connect 4 0 0 0;
#P connect 2 0 5 0;
#P connect 3 0 11 0;
#P connect 10 0 4 1;
#P connect 1 0 5 1;
#P connect 7 0 5 2;
#P fasten 5 0 3 0 102 90;
#P connect 5 1 10 0;
#P connect 6 0 5 3;
#P connect 9 0 10 1;
#P connect 5 2 8 0;
#P connect 8 0 9 0;
#P connect 5 3 8 1;
#P connect 10 0 3 1;
#P connect 6 0 13 0;
#P pop;
#P newobj 136 212 60 196617 p;
#P newex 100 278 79 196617 scale 0 1 0. 1.;
#P window setfont "Sans Serif" 14.;
#N vpatcher 10 59 608 518;
#P inlet 508 150 15 0;
#P inlet 467 152 15 0;
#P inlet 442 149 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P user com 399 102 117 196617 12;
#K set 0 10345 28192 28532 26725 29216 30575 29284 29486 11822 8311
29798 16169;
#K end;
#P comment 399 88 98 196617 b , c = control points;
#P comment 399 74 78 196617 a , d = endpoints;
#P comment 399 60 89 196617 p = percent (0-1);
#P user com 241 46 303 196617 32;
#K set 0 24874 28766 13088 8224 11040 8224 25130 13098 28766 12842
10289 11632 10528 8224 8235 8224 25386 13098 28714 10289 11632 10590
12832 8224 8235 8224 8224 25642 10289 11632 10590 13056;
#K end;
#P window linecount 0;
#P newex 334 67 30 196617 !- 1.;
#P window linecount 1;
#P newex 402 217 29 196617 * 3.;
#P newex 370 216 29 196617 * 3.;
#P newex 137 321 208 196617 expr $f7*$f2+$f5*$f4+$f3*$f6+$f1*$f8;
#P newex 195 144 92 196617 expr pow($f2\,3);
#P newex 133 176 115 196617 expr $f1*pow($f2\,2);
#P newex 86 214 115 196617 expr pow($f1\,2)*$f2;
#P window linecount 0;
#P newex 37 229 40 196617 pow 3.;
#P outlet 137 346 15 0;
#P inlet 424 148 15 0;
#P inlet 165 43 15 0;
#P connect 0 0 3 0;
#P connect 0 0 4 0;
#P connect 0 0 5 0;
#P connect 3 0 7 0;
#P connect 7 0 2 0;
#P connect 1 0 7 1;
#P fasten 10 0 4 1 339 206 196 206;
#P connect 4 0 7 2;
#P connect 0 0 6 0;
#P connect 8 0 7 3;
#P fasten 10 0 5 1 339 164 243 164;
#P connect 5 0 7 4;
#P fasten 10 0 6 1 339 110 282 110;
#P connect 9 0 7 5;
#P connect 6 0 7 6;
#P connect 18 0 7 7;
#P connect 0 0 10 0;
#P connect 16 0 8 0;
#P connect 17 0 9 0;
#P pop;
#P newobj 115 238 68 196622 p bezier;
#P window setfont "Sans Serif" 9.;
#P newex 85 210 40 196617 gate 3;
#P connect 2 0 16 0;
#P connect 1 0 16 0;
#P connect 0 0 16 0;
#P connect 16 0 5 0;
#P connect 4 0 0 0;
#P connect 0 1 2 0;
#P connect 6 0 0 1;
#P connect 0 2 1 0;
#P connect 3 0 1 1;
#P fasten 8 0 3 0 291 191 141 191;
#P fasten 8 0 2 3 291 267 144 267;
#P connect 3 1 1 2;
#P connect 15 1 4 0;
#P fasten 9 0 3 1 326 199 157 199;
#P fasten 11 0 2 4 395 269 157 269;
#P connect 3 2 1 3;
#P fasten 10 0 3 2 361 205 173 205;
#P connect 3 3 1 4;
#P fasten 11 0 3 3 395 207 189 207;
#P connect 7 0 15 0;
#P hidden fasten 15 0 12 0 196 274 335 274;
#P hidden fasten 15 1 12 0 249 274 335 274;
#P connect 12 0 13 0;
#P connect 8 0 12 2;
#P connect 13 1 14 0;
#P connect 9 0 12 3;
#P connect 10 0 12 4;
#P connect 11 0 12 5;
#P pop;
#P hidden newobj 488 563 79 196617 p bezier;
#P window setfont "Sans Serif" 10.;
#P user com 102 104 37 196618 2;
#K set 0 29800 29301;
#K end;
#P objectname thru;
#P window setfont "Sans Serif" 9.;
#P comment 163 140 24 196617 max;
#B frgb 50 50 50;
#P flonum 136 100 28 9 0. 1. 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname min;
#P comment 163 102 24 196617 min;
#B frgb 50 50 50;
#P comment 163 127 33 196617 slope;
#B frgb 50 50 50;
#P comment 163 115 24 196617 mid;
#B frgb 50 50 50;
#P flonum 136 113 28 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname mid;
#P flonum 136 126 28 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname slope;
#P flonum 136 139 28 9 0. 1. 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname max;
#P user radiogroup 88 103 50 44;
#X size 3;
#X offset 14;
#X inactive 0;
#X itemtype 0;
#X flagmode 0;
#X set 0;
#X done;
#P objectname scaletype;
#P message 50 50 80 196617 $1;
#P number 152 67 29 9 0 127 3 3 0 0 0 200 150 150 222 222 222 0 0 0;
#P objectname incc;
#P number 152 83 24 9 1 16 3 3 0 0 0 200 150 150 222 222 222 0 0 0;
#P objectname inchannel;
#P user ubumenu 53 82 100 196617 0 1 1 0;
#X setrgb 31 31 31 200 150 150 234 234 234 4 4 4 141 141 141 112 112
112;
#X add "CME UF MIDI Device (v1.1)";
#X add "from sendmidi 1";
#X add "from sendmidi 2";
#X add "to Max/MSP 1";
#X add "to Max/MSP 2";
#X prefix_set 0 0 0;
#X pattrmode 1;
#P objectname inport;
#P number 152 156 29 9 0 127 3 3 0 0 0 150 200 150 222 222 222 0 0 0;
#P objectname outcc;
#P number 152 172 29 9 1 16 3 3 0 0 0 150 200 150 222 222 222 0 0 0;
#P objectname outchannel;
#P user ubumenu 53 171 100 196617 0 1 1 0;
#X setrgb 31 31 31 150 200 150 234 234 234 4 4 4 141 141 141 112 112
112;
#X add "AU DLS Synth 1";
#X add "CME UF MIDI Device (v1.1)";
#X add "to sendmidi 1";
#X add "to sendmidi 2";
#X add "from Max/MSP 1";
#X add "from Max/MSP 2";
#X prefix_set 0 0
0;
#X pattrmode 1;
#P objectname outport;
#P user ubumenu 53 156 100 196617 0 1 1 0;
#X setrgb 31 31 31 150 200 150 234 234 234 4 4 4 141 141 141 112 112
112;
#X add Controller;
#X add A.Touch;
#X add PitchBend;
#X add Output;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P objectname outtype;
#P user ubumenu 53 67 100 196617 0 1 1 0;
#X setrgb 31 31 31 200 150 150 234 234 234 4 4 4 141 141 141 112 112
112;
#X add A.Touch;
#X add Velocity;
#X add Controller;
#X add PitchBend;
#X add NoteNumber;
#X add Input;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P objectname intype;
#P user panel 50 64 143 127;
#X brgb 255 250 223;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden newex 333 228 83 196617 pvar midisearch;
#P hidden inlet 389 395 15 0;
#P hidden inlet 517 154 15 0;
#P hidden outlet 312 621 15 0;
#P hidden fasten 27 1 37 0 368 328 338 328;
#P hidden fasten 27 1 52 0 368 326 419 326;
#P hidden connect 55 0 54 0;
#P hidden connect 62 0 53 0;
#P hidden connect 53 2 55 0;
#P hidden connect 59 0 55 0;
#P hidden fasten 40 0 43 6 604 407 604 407;
#P hidden fasten 47 0 40 0 671 542 751 542 751 392 604 392;
#P hidden fasten 42 0 43 5 591 392 591 392;
#P hidden fasten 46 0 42 0 650 547 777 547 777 371 591 371;
#P hidden connect 61 0 62 0;
#P hidden fasten 41 0 43 4 578 398 578 398;
#P hidden fasten 45 0 41 0 629 551 788 551 788 351 578 351;
#P hidden fasten 39 0 43 3 565 402 565 402;
#P hidden fasten 44 0 39 0 608 556 803 556 803 330 565 330;
#P hidden connect 48 2 43 2;
#P hidden fasten 48 0 43 1 522 386 539 386;
#P hidden fasten 43 0 48 0 526 559 810 559 810 297 522 297;
#P lcolor 5;
#P hidden connect 62 1 53 0;
#P hidden connect 63 0 24 0;
#P hidden connect 51 0 52 1;
#P hidden connect 37 0 63 1;
#P hidden connect 64 0 63 0;
#P hidden connect 33 0 37 3;
#P hidden fasten 52 1 33 0 469 373 380 373;
#P hidden fasten 24 0 36 4 493 588 373 588;
#P lcolor 11;
#P hidden connect 34 0 37 2;
#P hidden fasten 52 0 34 0 419 350 366 350;
#P hidden connect 30 0 36 3;
#P hidden connect 32 0 37 1;
#P hidden connect 35 0 36 2;
#P hidden connect 26 0 27 0;
#P hidden connect 25 0 26 0;
#P hidden connect 53 0 3 0;
#P hidden connect 60 0 3 0;
#P hidden connect 29 0 36 1;
#P hidden fasten 28 1 36 0 350 506 317 506;
#P hidden connect 31 0 28 0;
#P hidden connect 3 0 25 0;
#P hidden fasten 3 0 31 0 338 247 317 247;
#P hidden connect 38 0 59 0;
#P hidden fasten 38 0 43 0 506 393 526 393;
#P hidden connect 38 0 24 1;
#P hidden connect 43 1 44 0;
#P hidden fasten 43 1 24 2 546 443 519 443;
#P hidden connect 43 2 45 0;
#P hidden fasten 43 2 24 3 566 447 532 447;
#P hidden connect 43 3 46 0;
#P hidden fasten 43 3 24 4 586 450 545 450;
#P hidden connect 43 4 47 0;
#P hidden fasten 43 4 24 5 606 456 558 456;
#P hidden connect 2 0 37 4;
#P hidden connect 1 0 53 0;
#P hidden connect 36 0 0 0;
#P window clipboard copycount 65;


November 3, 2006 | 3:47 pm

My style:

1) as soon as 5 or more objects perform one task together, encapsulate them.
1a) name the subpatchers according to their tasks (don’t be afraid of names that consist of multiple words)
1b) describe all inlets and outlets of subpatchers
1c) color all subpatchers yellow.

2) do all naming according to java naming conventions (sends/receives: ‘lfoSpeed’, subpatchers: ‘calcAvarage’, abstractions: ‘FreqModulationControl’)

3) subpatchers should all have the right-to-left output sequence (if the outlets are related) and the left-most inlet triggers output.

4) if you make an abstraction, make sure it does what its name suggests, also in situations you didn’t anticipate.

5) if there are a lot of cables that have a similar and obvious task, color them gray.

6) get rid of the happy feeling the ooh’s and aah’s give you when other people stand behind your laptop and admire the obvious complexity (max spaghetti) of your software. A patch with only 5 subpatchers looks much less difficult to ‘the crowd’ (but much better to me if that helps ;)

If you want to make a good interface you have the problem of at least sends and receives standing in your way. I would love the reaktor-approach, where interface objects create their interface part in a different window. Btw the rest of reaktor is bad, don’t use it.

I begin to see max more and more as an object-oriented programming language, but in that aspect it misses some basic functionality, most importantly (as I see it now, may change tomorrow) a real variable that incorporates the concept of ‘scope’.

Cheers,
Mattijs


November 5, 2006 | 7:02 am

Dave Mcwayne wrote:
> does anyone have any bits of help for tidying up your patchers and
> making them a little more user friendly. or is it just a matter of
> hiding objects on lock, using send/receives and sub patchers and a
> bit of elbow grease?

Yes it is…

But best is a good design in the beginning. For example you can use the
pattr family of objects to seperate UI and functionality. But its hard
to do it later if it isn’t planned in the beginning.

tidying up is just "just a matter of hiding objects on lock, using
send/receives and sub patchers and a bit of elbow grease"…

encapsulate-encapsulate-encapsulate…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


November 5, 2006 | 10:01 am

Quote: keithmanlove wrote on Fri, 03 November 2006 08:54

> It seems boring and more trouble than it’s
> worth, but it’s good proof reading; I usually
> find errors and ways to
> simplify processes.

thats true, the more you rebuild stuff the more you
find better ways, thinking in "modules" and "interfaces"
is not only about finding interfaces, it is also about
creating modules (and making them better).


November 6, 2006 | 7:13 pm

Not to mention the use of colorized objects and patch cords… though it may seem like extra work, it really helps in the long run. Keeping to perhaps the first 3 or 4 standard Max colors for all your groups of objects — like "color 3 for storage stuff", "color 4 for interactive stuff", "color 5 for mtr recordings", etc. That way users (or yourself) can choose new color sets if they want a different look, and the objects will respond accordingly. (For that matter, bgcolor and a swatch with saturation bar is a must for every patch… except bpatcher where you need a panel for this.)

I rarely use send and receive personally, but when I do, I try to always use the #1 arguments in there. I mean, heck, if you have a great patch that does something cool (like act as a synth with some cool effects), it only takes a bit of time to make 16 iterations of it, each on their own MIDI channel, etc… etc… so you obviously don’t want to deal with renaming those send and receive objects. Only the global messages are fair game for non-argumented sends/receives (like key events that can then be filtered).

–CJ


November 8, 2006 | 9:53 am

Use align. I’m left handed and have it remapped via macro to control + home. Also use fix width.


November 8, 2006 | 9:53 am

oh and the max toolbox for UI stuff or whatever really. keys x and y are all you need.


November 9, 2006 | 4:30 pm

Quote: seejayjames wrote on Mon, 06 November 2006 20:13
—————————————————-

> I rarely use send and receive personally, but when I do, I try to always use the #1 arguments in there.

Hey seejayjames, I do stuff like this too, a lot. I’m interested in the way you do it. Would it be possible for you to post an example of this that illustrates the idea?

Thanks,
Mattijs


November 11, 2006 | 11:06 pm

Hey Mattijs, thanks for the interest. I put together a patch that shows some of how I use the arguments. I’m sure you’ve probably got all this figured out by now, but maybe there’s some elements that will give you ideas. I commented it pretty fully because I’m going to use it in a tutorial for a Max class I’m assisting in.

When I took the Max class originally we didn’t get to arguments that early, and we didn’t really *cover* them in the depth they needed … too bad, it’s one of the most powerful features of Max, I think. Being able to use patches as objects, with as many iterations as you want, is amazingly flexible, not to mention the use of bpatcher with all these concepts.

Hope there’s something there of interest, whether specifically related to the arguments or not. Enjoy!

-CJ

——————————————————

max v2;
#N vpatcher 13 49 1005 884;
#P window setfont "Sans Serif" 10.;
#P window linecount 2;
#P comment 13 779 132 9109514 Send out data or signals to master patch;
#B color 2;
#P comment 17 75 132 9109514 Usable for controls from master patch;
#B color 2;
#P hidden button 104 175 21 1;
#P window linecount 1;
#P comment 398 153 132 9109514 Reset loop points;
#B color 2;
#P window setfont "Sans Serif" 12.;
#P message 107 199 15 9109516 0;
#P button 397 178 28 1;
#P window setfont "Sans Serif" 18.;
#P newex 831 509 92 9109522 pgmout $1;
#P user uslider 863 355 32 131 128 1 0 1;
#P window setfont "Sans Serif" 10.;
#P comment 261 482 132 9109514 Settable speed resolution;
#B color 2;
#P window linecount 2;
#P comment 14 479 132 9109514 Preferable to selecting by ASCII number;
#B color 2;
#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P newex 179 133 190 9109518 receive $1_loop_restart;
#P newex 166 644 175 9109518 send $1_loop_restart;
#P button 181 622 15 1;
#P window setfont "Sans Serif" 12.;
#P message 822 105 32 9109516 0.01;
#P window setfont "Sans Serif" 18.;
#P flonum 219 504 62 18 0 0 0 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P outlet 9 738 27 0;
#P inlet 17 38 29 0;
#P window setfont "Sans Serif" 14.;
#P window linecount 5;
#P comment 178 24 539 9109518 More arguments can be used (up to $9 , I believe) , but just using $1 is all that’s needed here. (Most of) each patch will behave independently of the others (exception: keystrokes , which could be gated for each iteration). So , separate buffer~ , groove~ , table data , note routing , etc. Inlets and outlets can be used in the parent patch for master control of each iteration.;
#B color 2;
#P window linecount 1;
#P newex 366 276 138 9109518 prepend replace;
#P window setfont "Sans Serif" 12.;
#P message 784 105 29 9109516 100;
#P message 760 105 15 9109516 1;
#P button 733 70 21 1;
#P window setfont "Sans Serif" 14.;
#P newex 759 68 82 9109518 loadbang;
#P window setfont "Sans Serif" 12.;
#P message 222 479 28 9109516 dec;
#P message 189 479 24 9109516 inc;
#P window setfont "Sans Serif" 18.;
#P newex 164 541 55 9109522 * 0.01;
#P window setfont "Sans Serif" 14.;
#P window linecount 5;
#P comment 504 688 365 9109518 If you wanted a global send / receive (like for turning audio on and off) , just leave out the argument. Better yet , manage global keystrokes and other commands (like MIDI controller input) in a separate , "master" patch , then route to individual or groups of patches as desired.;
#B color 2;
#P comment 192 701 224 9109518 Just a couples simple sends / receives to illustrate the principle. Note that this will operate in each patch , but the sends / receives will actually be unique.;
#B color 2;
#P window linecount 8;
#P comment 651 351 194 9109518 $1 argument is handy for filtering and routing MIDI messages by channel — it’s easy to make 16 iterations of this patch , thereby using all the available MIDI channels , while keeping them separated.;
#B color 2;
#P window linecount 4;
#P comment 549 537 215 9109518 These "master" data sets are accessible by all iterations of the patcher , as they keep the same name in each.;
#B color 2;
#P window setfont "Sans Serif" 18.;
#P window linecount 1;
#N coll main_coll 1;
#P newobj 663 629 162 9109522 coll main_coll 1;
#N vtable 128 15 55 225 222 0 128 main_table;
#P newobj 482 629 171 9109522 table main_table;
#P window setfont "Sans Serif" 14.;
#P window linecount 3;
#P comment 573 153 323 9109518 Without $1 argument to table or coll , they would be shared among the multiple iterations of the patcher (as seen below).;
#B color 2;
#P user incdec 166 485 15 15 0 0;
#P window setfont "Sans Serif" 18.;
#P number 165 505 48 18 0 0 0 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P number 415 244 63 18 0 0 1 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P message 303 186 36 9109516 open;
#P window setfont "Sans Serif" 18.;
#P newex 303 211 203 9109522 sfinfo~;
#P number 202 196 63 18 0 0 1 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P number 131 196 63 18 0 7487 3 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P message 179 164 88 9109516 startloop;
#P window setfont "Sans Serif" 18.;
#P number 540 289 43 18 0 0 0 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 540 213 190 9109518 receive $1_table_bang;
#P newex 134 675 171 9109518 send $1_table_bang;
#P button 154 622 15 1;
#P button 100 622 15 1;
#P button 127 622 15 1;
#P button 46 622 15 1;
#P button 73 622 15 1;
#P window setfont "Sans Serif" 18.;
#P number 430 419 43 18 0 127 3 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 46 580 173 9109518 route a n i k r l;
#P newex 45 550 87 9109518 sprintf %c;
#P newex 46 519 40 9109518 key;
#P toggle 42 415 30 0;
#P window setfont "Sans Serif" 18.;
#P newex 429 455 178 9109522 makenote 80 200;
#P newex 429 490 146 9109522 noteout $1;
#P number 590 420 43 18 0 0 0 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P number 518 419 43 18 0 0 0 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P newex 518 380 114 9109522 notein $1;
#N coll $1_coll 1;
#P newobj 755 213 144 9109522 coll $1_coll 1;
#N vtable 128 805 51 1015 218 16 128 $1_table;
#T set 0 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 2;
#P newobj 543 252 153 9109522 table $1_table;
#P toggle 107 112 24 0;
#P window setfont "Sans Serif" 12.;
#P message 107 144 65 9109516 loop $1;
#P window setfont "Sans Serif" 18.;
#P newex 81 416 48 9109522 dac~;
#P user gain~ 133 273 24 100 158 1 1.071519 7.94321 10.;
#P user gain~ 53 272 24 100 158 1 1.071519 7.94321 10.;
#P user number~ 213 268 274 293 18 139 3 2 0. 0. 0 0. 250 0. 0 0 0 23 159 38 222 222 222 0 0 0;
#P flonum 54 147 47 18 0 0 0 139 0 0 0 23 159 38 222 222 222 0 0 0;
#P newex 54 183 42 9109522 sig~;
#P window setfont "Sans Serif" 12.;
#P message 310 281 35 9109516 clear;
#P window setfont "Sans Serif" 18.;
#P newex 54 226 202 9109522 groove~ $1_buffer 2;
#P newex 311 311 193 9109522 buffer~ $1_buffer 2;
#P window setfont "Sans Serif" 14.;
#P window linecount 4;
#P comment 252 535 226 9109518 a = audio … n = play note … i = speed up … k = slow down … r = bang random value from table , which plays note … l = loop restart;
#B color 2;
#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P hidden message 221 190 48 9109516 max $1;
#P hidden message 152 190 46 9109516 min $1;
#P connect 24 0 21 0;
#P lcolor 2;
#P connect 22 0 23 0;
#P lcolor 2;
#P connect 23 0 24 0;
#P lcolor 2;
#P connect 24 0 27 0;
#P lcolor 2;
#P connect 4 0 9 0;
#P lcolor 2;
#P connect 49 0 7 0;
#P lcolor 2;
#P connect 7 0 6 0;
#P lcolor 2;
#P connect 34 0 4 0;
#P lcolor 2;
#P connect 12 0 4 0;
#P lcolor 2;
#P connect 6 0 4 0;
#P connect 24 1 26 0;
#P lcolor 2;
#P connect 21 0 11 0;
#P lcolor 2;
#P connect 9 0 11 0;
#P lcolor 2;
#P connect 24 2 29 0;
#P lcolor 2;
#P connect 39 0 72 0;
#P lcolor 2;
#P connect 54 0 13 0;
#P lcolor 2;
#P connect 13 0 12 0;
#P lcolor 2;
#P connect 72 0 70 0;
#P lcolor 2;
#P connect 69 0 70 0;
#P lcolor 2;
#P connect 10 0 11 1;
#P lcolor 2;
#P connect 24 3 28 0;
#P lcolor 2;
#P connect 70 0 35 0;
#P lcolor 2;
#P connect 1 0 35 0;
#P lcolor 2;
#P connect 4 1 10 0;
#P lcolor 2;
#P connect 30 0 31 0;
#P lcolor 2;
#P connect 35 0 4 1;
#P lcolor 2;
#P connect 35 0 0 0;
#P lcolor 2;
#P connect 24 4 30 0;
#P lcolor 2;
#P connect 40 0 49 0;
#P lcolor 2;
#P connect 55 0 40 0;
#P lcolor 2;
#P connect 41 0 40 0;
#P lcolor 2;
#P connect 40 0 41 0;
#P lcolor 2;
#P connect 50 0 41 0;
#P lcolor 2;
#P connect 51 0 41 0;
#P lcolor 2;
#P connect 62 0 63 0;
#P lcolor 2;
#P connect 64 0 34 0;
#P lcolor 2;
#P connect 24 5 62 0;
#P lcolor 2;
#P connect 24 2 50 0;
#P lcolor 2;
#P connect 39 0 36 0;
#P lcolor 2;
#P connect 0 0 36 0;
#P lcolor 2;
#P connect 60 0 49 1;
#P lcolor 2;
#P connect 4 2 8 0;
#P lcolor 2;
#P connect 61 0 60 0;
#P lcolor 2;
#P connect 36 0 1 0;
#P lcolor 2;
#P connect 24 3 51 0;
#P lcolor 2;
#P connect 36 0 4 2;
#P lcolor 2;
#P connect 38 0 37 0;
#P lcolor 2;
#P connect 56 0 3 0;
#P lcolor 2;
#P connect 5 0 3 0;
#P connect 37 5 56 0;
#P lcolor 2;
#P connect 69 0 39 0;
#P lcolor 2;
#P connect 37 3 39 0;
#P lcolor 2;
#P connect 33 0 20 0;
#P lcolor 2;
#P connect 25 0 20 0;
#P lcolor 2;
#P connect 20 0 19 0;
#P lcolor 2;
#P connect 24 1 25 0;
#P lcolor 2;
#P connect 20 1 19 1;
#P lcolor 2;
#P connect 16 0 17 0;
#P lcolor 2;
#P connect 14 0 33 0;
#P lcolor 2;
#P connect 32 0 14 0;
#P lcolor 2;
#P connect 16 1 18 0;
#P lcolor 2;
#P connect 53 0 52 0;
#P lcolor 2;
#P connect 52 0 54 0;
#P lcolor 2;
#P connect 52 0 55 0;
#P lcolor 2;
#P connect 52 0 61 0;
#P lcolor 2;
#P connect 67 0 68 0;
#P lcolor 2;
#P pop;


November 12, 2006 | 12:45 am

Hi CJ,

Thanks a lot for sharing! I see we’re on the same track when it comes to using patchers as objects without having to bother about stuff that’s inside.

I used to utilize the same system as you display in your patch. This idea evolved and lately I have been working on a more general way to make multiple instances of the same patch without having to rename sends and receives. I call it the ‘var’ system since it incorporates the idea of a variable with a clearly defined scope.

Here is a link to the current version (it’s not finished yet). Maybe I should add some comments but you’ll probably get the idea. Adjust the numboxes and note how the two instances are completely similar and still not interfering, without using arguments.

http://www.oli.tudelft.nl/avdl1064/TS_var_20061211.zip

Let’s have some cross-inspiration ;)

Regards,
Mattijs


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