Forums > MaxMSP

Visually preventing feedback with matrixctrl

March 15, 2006 | 7:46 am

Hi there. I’m still a little new at this.

What I want to do is to come up with a way to use matrixctrl to visually create random signal chains all while preventing feedback from occuring. I want to use this on a very large scale to get really complex routing but again without the feedback. I’ve included a primitive example of what I want to do. This patch tells matrixctrl not to allow single feedback connections. But obviously this method doesn’t work for chains of signals. How would I do this on a larger scale though. Say…if the connection was A-C-B-D preventing C-A, B-A, B-C, D-A, D-C, D-B from connecting. I hope this makes sense. Maybe there is a better way to do this without Matrixctrl??? Thanks for your help guys.

max v2;
#N vpatcher 0 0 1280 944;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 228 727 14 9109513 0;
#P newex 228 703 28 9109513 del 2;
#P newex 319 654 28 9109513 sel 1;
#P newex 234 327 28 9109513 del 2;
#P newex 217 406 43 9109513 deferlow;
#P toggle 193 407 15 0;
#P newex 228 754 34 9109513 gate 1;
#P button 280 291 15 0;
#P message 235 358 14 9109513 0;
#P message 264 354 14 9109513 1;
#P newex 193 435 34 9109513 gate 1;
#P toggle 322 602 15 0;
#P newex 322 573 27 9109513 ==;
#P message 311 723 69 9109513 0 0 0;
#P message 204 570 55 9109513 set $1 $2 0;
#P newex 204 545 52 9109513 pack 0 0 0;
#P number 264 498 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 219 498 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 177 498 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 192 469 65 9109513 unpack 0 0 0;
#P comment 261 167 13 9109513 3;
#P comment 261 152 13 9109513 2;
#P comment 262 134 13 9109513 1;
#P comment 262 115 13 9109513 0;
#P comment 239 96 13 9109513 3;
#P comment 224 96 13 9109513 2;
#P comment 209 96 13 9109513 1;
#P user matrixctrl 191 117 66 66 MatrixDefaultCell.pct MatrixDefaultBkgnd.pct 66 66 16 16 4 4 16 16 1 1 48 2 5120 0;
#P comment 194 96 13 9109513 0;
#P connect 9 0 10 0;
#P fasten 22 0 1 0 233 803 161 803 161 69 196 69;
#P connect 18 0 9 0;
#P connect 20 0 23 0;
#P connect 19 0 23 0;
#P connect 23 0 18 0;
#P connect 10 0 13 0;
#P connect 13 0 14 0;
#P connect 1 0 24 0;
#P connect 24 0 18 1;
#P connect 9 1 11 0;
#P connect 11 0 13 1;
#P connect 26 0 27 0;
#P connect 27 0 28 0;
#P connect 17 0 22 0;
#P connect 28 0 22 0;
#P connect 21 0 25 0;
#P connect 25 0 20 0;
#P connect 12 0 13 2;
#P connect 15 0 22 1;
#P connect 21 0 19 0;
#P connect 9 2 12 0;
#P connect 1 0 21 0;
#P connect 26 0 15 0;
#P connect 14 0 15 0;
#P connect 17 0 26 0;
#P connect 10 0 16 0;
#P connect 16 0 17 0;
#P connect 11 0 16 1;
#P pop;


March 15, 2006 | 7:54 am

WHOOPS!

That patch was missing a bang in there somewhere. This one should work:

max v2;
#N vpatcher 32 87 466 920;
#P button 225 658 15 0;
#P button 314 682 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 229 740 14 9109513 0;
#P newex 229 716 28 9109513 del 2;
#P newex 319 654 28 9109513 sel 1;
#P newex 234 327 28 9109513 del 2;
#P newex 217 406 43 9109513 deferlow;
#P toggle 193 407 15 0;
#P newex 229 767 34 9109513 gate 1;
#P button 280 291 15 0;
#P message 235 358 14 9109513 0;
#P message 264 354 14 9109513 1;
#P newex 193 435 34 9109513 gate 1;
#P toggle 322 602 15 0;
#P newex 322 573 27 9109513 ==;
#P message 292 726 69 9109513 1 2 0;
#P message 204 570 55 9109513 set $1 $2 0;
#P newex 204 545 52 9109513 pack 0 0 0;
#P number 264 498 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 219 498 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 177 498 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 192 469 65 9109513 unpack 0 0 0;
#P comment 261 167 13 9109513 3;
#P comment 261 152 13 9109513 2;
#P comment 262 134 13 9109513 1;
#P comment 262 115 13 9109513 0;
#P comment 239 96 13 9109513 3;
#P comment 224 96 13 9109513 2;
#P comment 209 96 13 9109513 1;
#P user matrixctrl 191 117 66 66 MatrixDefaultCell.pct MatrixDefaultBkgnd.pct 66 66 16 16 4 4 16 16 1 1 48 2 5120 0;
#P comment 194 96 13 9109513 0;
#P connect 9 0 10 0;
#P fasten 22 0 1 0 234 803 161 803 161 69 196 69;
#P connect 18 0 9 0;
#P connect 20 0 23 0;
#P connect 19 0 23 0;
#P connect 23 0 18 0;
#P connect 10 0 13 0;
#P connect 13 0 14 0;
#P connect 1 0 24 0;
#P connect 24 0 18 1;
#P connect 9 1 11 0;
#P connect 11 0 13 1;
#P connect 14 0 30 0;
#P connect 29 0 27 0;
#P connect 27 0 28 0;
#P connect 17 0 22 0;
#P connect 28 0 22 0;
#P connect 21 0 25 0;
#P connect 25 0 20 0;
#P connect 12 0 13 2;
#P connect 15 0 22 1;
#P connect 21 0 19 0;
#P connect 9 2 12 0;
#P connect 1 0 21 0;
#P connect 30 0 15 0;
#P connect 14 0 15 0;
#P connect 26 0 29 0;
#P connect 17 0 26 0;
#P connect 10 0 16 0;
#P connect 16 0 17 0;
#P connect 11 0 16 1;


March 15, 2006 | 9:09 am

Can’t do the maths on it right now, but, assuming a situation where
there is no 1st, 2nd, etc. level feedback, this may be possible:

Assuming a square matrix, the negative of the displacement of any one
component cannot be equal to the sum of the displacement between the
remaining components. At least it seems to be working, but that could
just be insomnia talking…

For instance

0 1 2 3

0 - - X -

1 - - - -

2 - - - X

3 X - - -

0 to 3 = -3 (*-1) = 3

3 – 2 = 1
2 – 0 = 2
+____________
= 3
Therefore, illegal.

3 to 1, and 1 to 2 would be legal

3 – 1 = 2
1 – 2 = -1
+_____________
= 1

but 3 to 1, and 1 to 0 would not.

3-1 = 2
1-0 = 1
+____________
=3

Scaling it up:

0 1 2 3 4 5
0

1 X

2 X

3 X

4 X

5 X

2 to 5 = -3 (*-1) = 3

5 to 4 = 1
4 to 3 = 1
3 to 1 = 2
1 to 2 = -1

Sum = 3, therefore illegal.

but:

5 to 4 = 1
4 to 3 = 1
3 to 0 = 3
0 to 1 = -1

sum = 4, therefore legal.

I think this works because there is one connection per row/column.
I’d bet there’s a proper mathematic name for this. (and Euler was
probably involved)

Peter McCulloch


March 15, 2006 | 10:56 am

On 15-Mar-2006, at 8:46, Christopher wrote:
> What I want to do is to come up with a way to use matrixctrl to
> visually create random signal chains all while preventing feedback
> from occuring.
[schnipp]

Not completely "random", but you could build a coll with lots and
lots of different matrixctrl configurations that you know do not
cause feedback, and trigger them however you like.

If you want "really" random, you should take a look at the Litter
Power bundles. URI below.

Best,
Peter

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine | +–> Litter Power & Litter Bundle for Jitter
|…………………………………………….
p@castine.de | iCE: Sequencing, Recording, and Interface Building
pcastine@gmx.net | for Max/MSP
pcastine@bek.no | http://www.dspaudio.com/ Extremely cool
4-15@kagi.com |…………………………………………….
| home|chez nous|wir|i nostri http://www.castine.de/


March 15, 2006 | 11:08 am

You know, I wonder if we should offer a "Salespersons’ Forum", where all
you entrepreneurs could hawk your wares, and leave this sort of
unnecessary product placement off of the main list.

We are extremely proud of our developer community, and think that all of
the things people are making, whether for free or for dough, are
wonderful expressions of the power of the Max-Way.

Nevertheless, and this could just be a grey Berlin morning talking, this
gets old after a while. I don’t mean to single you out, Peter.

jb


March 15, 2006 | 2:44 pm

For all the help these guys give everyone in the forums (oh old
mailing list how I miss you… *sheds tear+seething rage*), I really
dont think its inappropriate. Not that I have a say in the matter,
but as a 3rd party maxer it doesnt get annoying or feel ..
overbearing to me.

just butting in and giving my 2 cents.

v a d e //

http://www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!


March 15, 2006 | 3:08 pm

If it’s just me, then pitch away. As I mentioned, the love we feel for
those users sufficiently interested to spend their valuable time making
the system bigger and better cannot be expressed in mere words.

My next crusade will be against .sigs which are longer than the messages
they are attached to. Who’s with me?

jb


March 15, 2006 | 4:10 pm

heh. was about to update my .sig to epic proportions


March 15, 2006 | 4:38 pm

Would you prefer an animated manga gif banner and obnoxious goatse
icon in the forum.. cause I can go there ;)

v a d e //

http://www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!


March 15, 2006 | 4:41 pm

On 15-Mar-2006, at 16:08, Jeremy Bernstein wrote:
> My next crusade will be against .sigs which are longer than the
> messages they are attached to. Who’s with me?

I’m with you on this!

My dilemma is just whether to trim my .sig when the message is short
or to pad the message to get it up to the requisite char count.

Decisions, decisions… -)

– P.

————– http://www.bek.no/~pcastine/Lit^Z


March 15, 2006 | 4:51 pm

This looks like a solution. Can’t do the maths on it right now, but,
assuming a situation where there is no 1st, 2nd, etc. level feedback,
this seems to hold true:

Assuming a square matrix, the negative of the displacement of any one
component cannot be equal to the sum of the displacement between the
remaining components. At least it seems to be working, but that could
just be insomnia talking…

For instance

0 1 2 3

0 - - X -

1 - - - -

2 - - - X

3 X - - -

0 to 3 = -3 (*-1) = 3

3 – 2 = 1
2 – 0 = 2
+____________
= 3
Therefore, illegal.

3 to 1, and 1 to 2 would be legal

3 – 1 = 2
1 – 2 = -1
+_____________
= 1

but 3 to 1, and 1 to 0 would not.

3-1 = 2
1-0 = 1
+____________
=3

Scaling it up:

0 1 2 3 4 5
0

1 X

2 X

3 X

4 X

5 X

2 to 5 = -3 (*-1) = 3

5 to 4 = 1
4 to 3 = 1
3 to 1 = 2
1 to 2 = -1

Sum = 3, therefore illegal.

but:

5 to 4 = 1
4 to 3 = 1
3 to 0 = 3
0 to 1 = -1

sum = 4, therefore legal.

I think this works because there is one connection per row/column.
I’d bet there’s a proper mathematic name for this. (and Euler was
probably involved)

Peter McCulloch


March 15, 2006 | 5:28 pm

Here’s a solution in Max code. If you wanted to have multiple paths,
use coll in conjunction with urn, and a shorter bang/group section.

Peter McCulloch

max v2;
#N vpatcher 10 59 352 513;
#P window setfont "Sans Serif" 9.;
#P newex 211 107 52 196617 r $0.size;
#P newex 58 218 52 196617 r $0.size;
#P newex 136 34 52 196617 r $0.size;
#P newex 211 71 87 196617 s $0.size;
#P number 211 46 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 129 354 32 196617 print;
#P newex 42 55 56 196617 t b b clear;
#P newex 112 384 118 196617 matrix~ 8 8 0.;
#P newex 112 329 51 196617 pack i i 1;
#P newex 42 276 46 196617 t b b;
#P newex 42 254 46 196617 Uzi 8;
#P newex 173 305 46 196617 zl queue;
#P newex 112 304 46 196617 zl queue;
#P newex 173 251 51 196617 zl ecils 1;
#P newex 112 252 51 196617 zl ecils 1;
#P newex 173 225 49 196617 zl rot -1;
#P button 42 26 15 0;
#P newex 151 108 40 196617 t clear;
#P newex 112 81 34 196617 Uzi 8;
#P newex 112 192 71 196617 t l l;
#P newex 112 164 55 196617 zl group 8;
#P newex 112 134 34 196617 urn 8;
#P window linecount 2;
#P comment 227 225 100 196617 rotating prevents feedback.;
#P connect 6 0 16 0;
#P connect 16 0 12 0;
#P connect 12 0 13 0;
#P connect 21 0 12 1;
#P connect 16 1 4 0;
#P connect 5 0 1 0;
#P connect 4 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 8 0;
#P connect 13 0 10 0;
#P connect 8 0 10 0;
#P connect 10 0 14 0;
#P fasten 16 2 15 0 93 378 117 378;
#P connect 14 0 15 0;
#P connect 14 0 17 0;
#P connect 11 0 14 1;
#P connect 20 0 4 1;
#P connect 22 0 1 1;
#P fasten 1 1 5 0 141 157 201 157 201 104 156 104;
#P connect 22 0 2 1;
#P connect 3 1 7 0;
#P connect 7 0 9 0;
#P connect 13 1 11 0;
#P connect 9 0 11 0;
#P connect 18 0 19 0;
#P pop;


March 16, 2006 | 3:03 am

Thanks for the help so far guys. Still trying to wrap my head around this.. I am making progress.


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