Forums > MaxMSP

append

October 4, 2007 | 12:03 pm

Hi
I am working on a patch controlling three params of a vst~
and it work well except a message error "$1" variable out of range(1)
it is because I use an object "append $1" it work well but print message error
Is it a better solution to append a parameter name and $1 for sending to vst a control change (with beakpoint)?
excuse my bad english
I send the provisory patch for explain
max v2;
#N vpatcher 279 46 1578 722;
#P origin 11 0;
#P window setfont "Sans Serif" 9.;
#P flonum 29 186 44 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 85 185 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 29 133 15 0;
#P newex 29 109 58 196617 metro 500;
#P toggle 29 90 15 0;
#P newex 29 67 54 196617 dspstate~;
#P newex 29 157 66 196617 adstatus cpu;
#P newex 698 512 74 196617 receive~ vstD;
#P newex 664 486 74 196617 receive~ vstG;
#P hidden newex 786 510 52 196617 send~ sig;
#P window setfont "Sans Serif" 18.;
#N vpatcher 512 54 1152 762;
#P origin -25 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 161 63 46 196617 ouvrir pluggin;
#P window linecount 1;
#P message 50 565 99 196617 DelayRight $1;
#P number 114 504 35 9 0 8 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden flonum 343 610 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden number 343 459 86 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 343 482 70 196617 setdomain $1;
#P user function 343 515 543 600 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0.9 0;
#X add 5138.45752 0.416667 0;
#X add 8300.584961 0.733333 0;
#X add 14862. 0. 0;
#X domain 14862.;
#X range 0. 1.;
#X done;
#N vpatcher 51 141 651 541;
#P outlet 272 286 15 0;
#P inlet 168 75 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 272 246 33 196617 show;
#P newex 272 200 55 196617 append $1;
#P window linecount 0;
#P newex 46 133 27 196617 nth;
#P inlet 63 79 15 0;
#P fasten 4 0 1 0 173 111 51 111;
#P connect 0 0 1 1;
#P fasten 1 0 2 0 51 161 277 161;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P pop;
#P newobj 50 531 74 196617 p plugcontrol2;
#P window linecount 0;
#P message 46 348 99 196617 FreqSpread $1;
#P number 110 289 35 9 0 8 2 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden flonum 339 395 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden number 339 244 86 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P hidden message 339 267 70 196617 setdomain $1;
#P user function 339 300 539 385 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 1660.116943 0.933333 0;
#X add 2766.861084 0.566667 0;
#X add 4585.087402 0.366667 0;
#X add 7431. 0.783333 0;
#X add 14862. 0. 0;
#X domain 14862.;
#X range 0. 1.;
#X done;
#P window linecount 0;
#N vpatcher 51 141 651 541;
#P outlet 272 286 15 0;
#P inlet 168 75 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 272 246 33 196617 show;
#P newex 272 200 55 196617 append $1;
#P window linecount 0;
#P newex 46 133 27 196617 nth;
#P inlet 63 79 15 0;
#P fasten 4 0 1 0 173 111 51 111;
#P connect 0 0 1 1;
#P fasten 1 0 2 0 51 161 277 161;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P pop;
#P newobj 46 316 74 196617 p plugcontrol2;
#P button 165 94 28 0;
#P hidden newex 207 28 26 196617 r go;
#P hidden button 245 46 15 0;
#P hidden newex 244 73 27 196617 i;
#P hidden message 244 99 47 196617 0 , $1 $1;
#P hidden newex 244 129 40 196617 line 0;
#P message 106 171 110 196617 MasterFreq $1;
#P number 48 171 43 9 0 8 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 48 94 29 0;
#N vpatcher 139 79 1220 728;
#P origin 53 0;
#P outlet 556 422 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 673 232 60 196617 send~ vstD;
#P newex 595 232 60 196617 send~ vstG;
#P inlet 868 74 15 0;
#P inlet 774 139 15 0;
#N comlet plugparam;
#P inlet 623 132 15 0;
#P outlet 409 444 15 0;
#P outlet 47 252 15 0;
#P inlet 329 31 15 0;
#P newex 635 51 50 196617 del 1000;
#P newex 636 30 48 196617 loadbang;
#P newex 680 140 66 196617 receive~ sig;
#P newex 420 42 50 196617 del 5000;
#P button 329 60 15 0;
#P message 652 116 30 196617 open;
#P button 171 246 15 0;
#P window linecount 1;
#P newex 594 101 44 196617 del 100;
#P newex 409 414 33 196617 show;
#P newex 389 362 55 196617 append $1;
#P button 492 63 15 0;
#P newex 492 84 30 196617 t b b;
#P number 1 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 53 178 27 196617 – 1;
#P button 305 170 15 0;
#P newex 53 154 38 196617 listlen;
#P message 47 214 44 196617 max $1;
#P newex 60 298 62 196617 nth;
#P newex 144 220 40 196617 collect;
#P message 166 269 1443 196617 Gain FeedforwardGain FeedbackGain FeedforwardDelay FFModFreq FFModDepth FeedbackDelay FBModFreq FBModDepth;
#P message 498 132 43 196617 params;
#P message 460 95 26 196617 plug;
#N vst~ loaduniqueid 0 "Generic Effect";
#P newobj 623 184 108 196617 vst~ "Generic Effect";
#P connect 9 0 10 0;
#P connect 9 0 6 0;
#P connect 6 0 24 0;
#P connect 3 0 7 0;
#P connect 7 0 9 0;
#P fasten 27 0 5 0 779 260 234 260 234 195 111 195 111 282 65 282;
#P connect 3 0 5 1;
#P connect 0 2 4 0;
#P connect 16 0 3 0;
#P connect 4 0 3 0;
#P fasten 15 0 16 0 599 161 385 167 363 248 211 241;
#P connect 8 0 4 1;
#P connect 11 1 8 0;
#P connect 23 0 18 0;
#P connect 5 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 25 0;
#P connect 18 0 19 0;
#P connect 18 0 1 0;
#P fasten 19 0 12 0 425 68 484 68 484 55 497 55;
#P fasten 22 0 12 0 640 77 615 77 615 57 497 57;
#P connect 12 0 11 0;
#P connect 11 0 2 0;
#P fasten 3 0 31 0 171 305 561 305;
#P fasten 11 0 15 0 497 111 556 111 556 85 599 85;
#P connect 0 0 29 0;
#P connect 2 0 0 0;
#P connect 1 0 0 0;
#P connect 17 0 0 0;
#P fasten 20 0 0 0 685 169 628 169;
#P connect 26 0 0 0;
#P connect 21 0 22 0;
#P fasten 28 0 17 0 873 107 657 107;
#P connect 0 1 30 0;
#P pop;
#P newobj 48 138 129 196617 p plugcontrol1;
#P window linecount 1;
#P hidden newex 333 25 33 196617 r dur;
#P hidden flonum 334 209 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden number 244 164 70 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden number 333 51 86 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P hidden message 333 74 70 196617 setdomain $1;
#P user function 334 108 534 193 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0.133333 0;
#X add 12727.563477 0.933333 0;
#X add 14862. 0. 0;
#X domain 14862.;
#X range 0. 1.;
#X done;
#P comment 42 63 46 196617 choisir pluggin;
#P hidden fasten 7 2 17 0 171 160 41 160 41 258 51 258;
#P hidden fasten 21 0 23 0 344 418 330 418 330 340 51 340;
#P connect 17 0 23 0;
#P connect 8 0 7 0;
#P hidden connect 7 0 9 0;
#P hidden fasten 7 2 24 0 171 163 22 163 22 508 55 508;
#P connect 24 0 30 0;
#P hidden fasten 28 0 30 0 348 633 334 633 334 555 55 555;
#P hidden fasten 23 0 7 1 51 374 27 374 27 134 92 134;
#P hidden fasten 10 0 7 1 111 196 102 196 102 163 181 163 181 135 92 135;
#P hidden fasten 30 0 7 1 55 589 32 589 32 134 92 134;
#P hidden connect 7 1 10 0;
#P hidden fasten 5 0 10 0 339 231 226 231 226 161 111 161;
#P hidden fasten 7 0 22 0 53 161 41 161 41 256 115 256;
#P connect 22 0 17 1;
#P hidden fasten 7 0 29 0 53 165 22 165 22 462 119 462;
#P connect 29 0 24 1;
#P hidden fasten 9 0 7 2 53 191 98 191 98 163 180 163 180 134 131 134;
#P connect 16 0 7 3;
#P hidden connect 14 0 13 0;
#P hidden connect 13 0 12 0;
#P hidden connect 12 0 11 0;
#P hidden connect 11 0 4 0;
#P hidden fasten 15 0 14 0 212 51 236 51 236 42 250 42;
#P hidden fasten 3 0 13 1 338 70 274 70 274 64 266 64;
#P hidden connect 6 0 3 0;
#P hidden connect 3 0 2 0;
#P hidden fasten 4 0 1 0 249 189 326 189 326 93 339 93;
#P hidden connect 2 0 1 0;
#P hidden connect 1 0 5 0;
#P hidden fasten 6 0 20 0 338 47 323 47 323 238 344 238;
#P hidden connect 20 0 19 0;
#P hidden fasten 4 0 18 0 249 294 344 294;
#P hidden connect 19 0 18 0;
#P hidden connect 18 0 21 0;
#P hidden fasten 6 0 27 0 338 45 320 45 320 453 348 453;
#P hidden connect 27 0 26 0;
#P hidden connect 26 0 25 0;
#P hidden fasten 4 0 25 0 249 510 348 510;
#P hidden connect 25 0 28 0;
#P pop;
#P newobj 363 407 117 196626 p vst;
#B color 5;
#P toggle 806 455 15 0;
#P window setfont "Sans Serif" 9.;
#P message 771 455 30 196617 open;
#P newex 771 481 64 196617 sfrecord~ 2;
#P newex 843 271 26 196617 r go;
#P user meter~ 642 453 656 527 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P newex 661 456 41 196617 *~ 0.5;
#P newex 708 427 32 196617 line~;
#P message 765 273 70 196617 setdomain $1;
#P user function 765 316 1018 415 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 1171.721313 0.486486 0;
#X add 4686.880371 0.554054 0;
#X add 10483.825195 0.878378 0;
#X add 14122.329102 1. 0;
#X add 14800.692383 0. 0;
#X domain 14862.359375;
#X range 0. 1.;
#X done;
#P newex 324 43 100 196617 bgcolor 115 48 220;
#P button 206 213 23 0;
#P newex 206 249 26 196617 s go;
#N vpatcher 129 150 851 556;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 447 239 33 196617 s dur;
#P outlet 421 194 15 0;
#P outlet 322 295 15 0;
#P message 322 261 53 196617 $1 , $2 $3;
#P newex 134 95 26 196617 r go;
#P inlet 367 83 15 0;
#P inlet 279 85 15 0;
#P window linecount 1;
#P newex 134 153 40 196617 t b b b;
#P button 134 131 15 0;
#P newex 322 222 65 196617 pack 0. 0. 0.;
#P newex 376 193 27 196617 f;
#P flonum 394 153 76 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 394 130 77 196617 expr $f2 – $f1;
#P newex 350 166 27 196617 f;
#P newex 262 165 27 196617 f;
#P connect 10 0 6 0;
#P connect 6 0 7 0;
#P fasten 7 0 0 0 139 190 213 190 213 156 267 156;
#P connect 8 0 0 1;
#P fasten 0 0 5 0 267 198 327 198;
#P connect 5 0 11 0;
#P connect 11 0 12 0;
#P connect 1 0 5 1;
#P fasten 7 1 1 0 154 182 333 190 333 155 355 155;
#P connect 9 0 1 1;
#P fasten 7 2 4 0 169 184 372 184 372 186;
#P connect 4 0 5 2;
#P connect 3 0 4 1;
#P fasten 8 0 2 0 284 118 399 118;
#P connect 2 0 3 0;
#P fasten 3 0 13 0 399 179 426 179;
#P fasten 3 0 14 0 399 180 452 180;
#P fasten 9 0 2 1 372 108 466 108;
#P pop;
#P newobj 661 261 65 196617 p mesure;
#P newex 661 285 32 196617 line~;
#P user ezdac~ 664 536 708 569 0;
#P flonum 540 231 62 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 716 231 82 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 628 231 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 661 318 68 196617 play~ hugues;
#P message 452 113 57 196617 set hugues;
#P message 365 157 43 196617 replace;
#P newex 365 200 77 196617 buffer~ hugues;
#P user waveform~ 452 137 454 82 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P connect 28 0 29 0;
#P connect 29 0 30 0;
#P connect 30 0 31 0;
#P connect 31 0 27 0;
#P connect 27 0 33 0;
#P connect 27 1 32 0;
#P connect 12 0 11 0;
#P connect 2 0 1 0;
#P connect 3 0 0 0;
#P connect 0 1 7 0;
#P connect 0 2 5 0;
#P fasten 17 0 18 0 666 479 658 479 658 451 647 451;
#P fasten 5 0 10 0 633 253 666 253;
#P connect 10 0 9 0;
#P connect 9 0 4 0;
#P connect 4 0 17 0;
#P connect 25 0 8 0;
#P fasten 16 0 17 1 713 449 697 449;
#P connect 26 0 8 1;
#P fasten 14 1 16 0 851 421 713 421;
#P connect 0 3 6 0;
#P connect 6 0 10 1;
#P fasten 10 1 15 0 721 285 739 285 739 262 770 262;
#P connect 15 0 14 0;
#P fasten 19 0 14 0 848 298 770 298;
#P fasten 25 0 20 0 669 509 751 509 751 474 776 474;
#P fasten 22 0 20 0 811 475 776 475;
#P connect 21 0 20 0;
#P hidden fasten 17 0 24 0 666 481 740 481 740 504 791 504;
#P fasten 26 0 20 1 703 532 779 532 779 503 761 503 761 477 830 477;
#P pop;

thanks


October 4, 2007 | 1:22 pm

The "$" is a special character.
You need to put a backslash before $ so it looses its special function
within your append object and it’s treated as a symbol.

#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P newex 186 121 64 9109514 prepend set;
#P message 186 151 72 9109514;
#P message 186 91 43 9109514 bla \$1;
#P message 98 92 40 9109514 bla $1;
#P newex 98 124 64 9109514 prepend set;
#P message 98 154 72 9109514;
#P connect 5 0 4 0;
#P connect 3 0 5 0;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P window clipboard copycount 6;


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