subpatches all doing the same thing?

snackd's icon

Hi. I have a situation where I send some info into a subpatch that picks a random video clip and then it sends that file (actually a message that says "read ") into another patch that applies a random video effect to the clip. I've actually got several instances of this whole scenario, one for each screen. Like so:

[random clip picker] -> [random fx] -> [jit.pwindow #1]
[random clip picker] -> [random fx] -> [jit.pwindow #2]
[random clip picker] -> [random fx] -> [jit.pwindow #3]

This is all inside of a larger patch, and the subpatches are abstractions, saved as external files. When I run it however, all 3 screens have the same video on them -- same files, with same effects. I've been up late & I'm getting pretty sleepy, but .... it's not supposed to do this, is it? It doesn't seem like I should need to resort to poly~ or some such craziness for this, right?

I'm a brand new user, so this is the first time I've ever tried this.

Max Patch
Copy patch and select New From Clipboard in Max.

In case you want a more visual explanation of what I'm doing, here's the relavant selection:

This is pure ignorance on my part, so I thank you in advance for enlightening me.

Chris Muir's icon

Without the abstractions it's impossible to say.

snackd's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Aha, okay. Well here's the main patch:

Max Patch
Copy patch and select New From Clipboard in Max.

And then here's video-picker.maxpat ...

Max Patch
Copy patch and select New From Clipboard in Max.

... and video-effect-plexor.maxpat .....

I know there's some other buggy stuff in there, and you can feel free to give me feedback. I'm a long way from even having a finished architectural framework. But right now I'm just wondering why I can't have three different vids playing.

Thanks.

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Send and receive are global, so you need to make sure that the names are unique. If you prefix your destinations with #0, it will be unique per instance. Heres your video-effect-plexor.maxpat with the s & r prefixed w/ #0

snackd's icon

Ah, so stupid of me! It makes perfect sense. Thanks for teaching me how to do that.

I notice, however, that even with that fixed, all subpatches still cose the same video effects to apply. This in spite of the fact that each one is supposedly using [random] to route through the fx.

Any idea what's going on here? Is there yet another glaring thing that I'm overlooking?

snackd's icon

Oh, I realize that not much happens if you don't have viceo, so I should explain what video it's expecting. First, there's a rootpath that is set in the Config Variables section. Inside of that, it expects to see these folders, each associated with an ethernet event:

escalation/        (e event)
deescalation/    (d event)
annihilation/ (f event)
fill/ (tilt event)

So you can test what I'm talking about above, if you have one folder with videos & use the appropriate trigger.

E.g. this folder
/escalation/
and trigger with the "e" event.

Chris Muir's icon

I don't have time to look into it further today, but I would look for more things that use send & receive that might want to have their scope limited by using #0

snackd's icon

Yep. You were totally right. I'm blind.

I was really excited when I figured out that I didn't need wires going everywhere..... But it does stand to reason that there would be a catch. :-) Definitely a fun learning process getting into the Max Mind.....

Thanks a lot for your help.
josh