Forums > MaxMSP

vst chain

September 25, 2006 | 6:38 pm

I’m trying to build a sort of vst matrix in which the vst can be chained dinamically on request. Like: vst~ A –> vst~ B ; or vst~ B –> vst~ A.

gate~1 –> vst~ A, B –> selector~2 –> gate~2 –> vst~ A, B.

The problem is that the vst object stops working when I connect its inlet to the gate~2.

It would be normal if the inlets and outlets would be closed in loop. But instead the vst object gets crazy just connecting it in such a way, and not when I really route them.

I need to route them like this:

How can I do?

here’s the patch example.
thanks…

max v2;
#N vpatcher 15 55 1209 940;
#P origin 0 48;
#P window setfont "Sans Serif" 14.;
#P user number~ 545 521 600 540 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 511 353 567 372 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 552 324 608 343 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 550 255 606 274 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 827 428 35 9109518 plug;
#P user number~ 814 522 880 541 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#N vst~ loaduniqueid 0;
#P newobj 801 482 79 9109518 vst~;
#P message 431 513 16 9109518 2;
#P message 427 334 16 9109518 2;
#P message 825 575 35 9109518 plug;
#P user number~ 807 659 873 678 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#N vst~ loaduniqueid 0;
#P newobj 801 621 79 9109518 vst~;
#P message 406 513 16 9109518 1;
#P user number~ 478 436 517 455 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 407 334 16 9109518 1;
#P user number~ 481 599 536 618 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 482 520 537 539 14 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 469 569 78 9109518 selector~ 2;
#B color 12;
#P newex 481 483 56 9109518 gate~ 2;
#B color 12;
#P newex 477 403 78 9109518 selector~ 2;
#B color 6;
#P newex 491 324 56 9109518 gate~ 2;
#B color 6;
#P user ezdac~ 468 692 512 725 0;
#P window setfont "Sans Serif" 20.;
#P message 522 175 19 9109524 0;
#P message 447 175 51 9109524 open;
#P toggle 547 134 33 0;
#P window setfont "Sans Serif" 9.;
#P message 547 175 41 9109513 loop $1;
#P window setfont "Sans Serif" 20.;
#P message 501 175 19 9109524 1;
#N sfplay~ 1 120960 0 ;
#P newobj 536 213 72 9109524 sfplay~;
#P connect 10 0 6 0;
#P connect 20 0 10 0;
#P connect 15 0 10 0;
#P connect 19 0 8 0;
#P connect 13 0 8 0;
#P connect 8 0 14 0;
#P connect 20 0 9 0;
#P connect 15 0 9 0;
#P connect 10 0 12 0;
#P connect 9 0 11 0;
#P connect 19 0 7 0;
#P connect 13 0 7 0;
#P connect 16 0 10 1;
#P connect 7 0 26 0;
#P connect 16 0 8 1;
#P connect 8 0 9 1;
#P fasten 5 0 0 0 527 208 541 208;
#P fasten 4 0 0 0 452 208 541 208;
#P fasten 2 0 0 0 552 208 541 208;
#P fasten 1 0 0 0 506 208 541 208;
#P connect 0 0 7 1;
#P connect 21 0 10 2;
#P connect 21 0 8 2;
#P connect 9 1 27 0;
#P connect 3 0 2 0;
#P connect 0 0 24 0;
#P connect 7 1 25 0;
#P connect 9 1 21 0;
#P connect 7 1 21 0;
#P connect 23 0 21 0;
#P connect 9 0 16 0;
#P connect 7 0 16 0;
#P connect 18 0 16 0;
#P connect 16 0 17 0;
#P connect 21 0 22 0;
#P pop;


September 25, 2006 | 6:53 pm

Just a quick guess, as I don’t have time to look at your patch, but
have you used send~ /receive~ pairs on one end of each loop?

ie vst~ -> gate~ -> send~ X …… receive X… -> selector~ -> vst~

Why not use matrix~/matrixctl ? It’s a much neater way of doing this.
(You’ll still need the send~/receive~ pairs though)

David

On 25 Sep 2006, at 19:38, Fabio wrote:

>
> I’m trying to build a sort of vst matrix in which the vst can be
> chained dinamically on request. Like: vst~ A –> vst~ B ; or vst~
> B –> vst~ A.
>
> gate~1 –> vst~ A, B –> selector~2 –> gate~2 –> vst~ A, B.
>
> The problem is that the vst object stops working when I connect its
> inlet to the gate~2.
>
> It would be normal if the inlets and outlets would be closed in
> loop. But instead the vst object gets crazy just connecting it in
> such a way, and not when I really route them.
>
> I need to route them like this:
>


September 25, 2006 | 8:29 pm

like this ? the loadbanged disable message to matrixctl prevents
sending the output of a plugin back to itself.

max v2;
#N vpatcher 136 101 943 648;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P newex 17 30 51 196618 loadbang;
#P message 16 56 107 196618 disable 0 0 1 1 2 2;
#P newex 704 171 85 196618 receive~ vst3R;
#P newex 614 171 84 196618 receive~ vst3L;
#P newex 583 331 70 196618 send~ vst3R;
#P newex 264 335 69 196618 send~ vst3L;
#N vst~ loaduniqueid 0 none;
#P newobj 527 238 79 196618 vst~ none;
#P user matrixctrl 125 100 52 51 MatrixDefaultCell.pct
MatrixDefaultBkgnd.pct 52 51 16 16 3 3 16 16 1 1 48 2 5120 0;
#P newex 522 171 85 196618 receive~ vst2R;
#P newex 432 171 84 196618 receive~ vst2L;
#P newex 314 171 85 196618 receive~ vst1R;
#P newex 224 171 84 196618 receive~ vst1L;
#P newex 503 330 70 196618 send~ vst2R;
#P newex 188 335 69 196618 send~ vst2L;
#P newex 422 330 70 196618 send~ vst1R;
#P newex 111 335 69 196618 send~ vst1L;
#N vst~ loaduniqueid 0 none;
#P newobj 345 238 79 196618 vst~ none;
#P newex 349 286 84 196618 matrix~ 3 3 1.;
#P newex 202 286 84 196618 matrix~ 3 3 1.;
#N vst~ loaduniqueid 0 none;
#P newobj 191 238 79 196618 vst~ none;
#P connect 19 0 18 0;
#P fasten 1 0 4 0 207 317 116 317;
#P fasten 18 0 12 0 21 84 130 84;
#P fasten 1 1 6 0 231 317 193 317;
#P fasten 8 0 0 0 229 213 196 213;
#P fasten 12 0 1 0 130 280 207 280;
#P fasten 0 0 1 0 196 269 207 269;
#P fasten 3 0 1 1 350 269 244 269;
#P fasten 9 0 0 1 319 213 265 213;
#P fasten 1 2 14 0 255 317 269 317;
#P fasten 13 0 1 2 532 269 281 269;
#P fasten 10 0 3 0 437 213 350 213;
#P fasten 12 0 2 0 130 280 354 280;
#P fasten 0 1 2 0 209 269 354 269;
#P fasten 3 1 2 1 363 269 391 269;
#P fasten 11 0 3 1 527 213 419 213;
#P fasten 2 0 5 0 354 315 427 315;
#P fasten 13 1 2 2 545 269 428 269;
#P fasten 2 1 7 0 378 315 508 315;
#P fasten 16 0 13 0 619 212 532 212;
#P fasten 2 2 15 0 402 315 588 315;
#P fasten 17 0 13 1 709 212 601 212;
#P pop;


September 25, 2006 | 8:37 pm


October 1, 2006 | 9:43 pm

David Stevens wrote:
> Why not use matrix~/matrixctl ? It’s a much neater way of doing this.
> (You’ll still need the send~/receive~ pairs though)

like this:

#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P newex 285 351 91 196622 send~ vst2;
#P newex 191 351 91 196622 send~ vst1;
#P newex 355 212 107 196622 receive~ vst2;
#P newex 246 212 107 196622 receive~ vst1;
#P user matrixctrl 64 238 50 50 MatrixDefaultCell.pct
MatrixDefaultBkgnd.pct 50 50 16 16 3 3 16 16 1 1 48 2 5120 0;
#P user ezdac~ 145 404 189 437 0;
#P window setfont "Sans Serif" 20.;
#P message 131 102 30 196628 0;
#P message 35 102 62 196628 open;
#P toggle 164 60 44 0;
#P window setfont "Sans Serif" 9.;
#P message 164 114 52 196617 loop $1;
#P window setfont "Sans Serif" 20.;
#P message 99 102 30 196628 1;
#N sfplay~ 1 120960 0 ;
#P newobj 145 140 83 196628 sfplay~;
#P window setfont "Sans Serif" 14.;
#P newex 145 316 212 196622 matrix~ 3 3 1.;
#P message 240 140 46 196622 plug;
#P user number~ 260 276 337 297 14 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221
221 222 222 222 0 0 0;
#N vst~ loaduniqueid 0;
#P newobj 246 239 90 196622 vst~;
#P message 332 148 46 196622 plug;
#P user number~ 368 275 445 296 14 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221
221 222 222 222 0 0 0;
#N vst~ loaduniqueid 0;
#P newobj 355 239 90 196622 vst~;
#P connect 3 0 6 1;
#P connect 3 0 4 0;
#P connect 0 0 6 2;
#P connect 0 0 1 0;
#P connect 6 0 13 0;
#P connect 6 2 18 0;
#P connect 6 1 17 0;
#P connect 16 0 0 0;
#P connect 15 0 3 0;
#P connect 14 0 6 0;
#P connect 7 0 6 0;
#P fasten 12 0 7 0 136 135 150 135;
#P fasten 11 0 7 0 40 135 150 135;
#P fasten 9 0 7 0 169 135 150 135;
#P fasten 8 0 7 0 104 135 150 135;
#P connect 10 0 9 0;
#P connect 5 0 3 0;
#P connect 2 0 0 0;
#P window clipboard copycount 19;


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


October 4, 2006 | 6:38 pm

thanks for help!

I’ve been with no internet connection for while…
however I’m going to check that part of the patch…

Indeed I wanted to aviod any send receive to delay the signal by one vector (as I found in the forums).

I’ll post it later! :)


October 6, 2006 | 8:24 pm

Fabio wrote:
> Indeed I wanted to aviod any send receive to delay the signal by one
> vector (as I found in the forums).

Don’t worry, it will only delay it if there is feedback. Its just a tiny
bit more heavy on the CPU than s/r (without tilde~).

Stefan


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


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