Forums > MaxMSP

Best way to pass-through a list based on last-entry match

Jun 29 2014 | 9:16 pm

I’m sending a list from one plugin to another, consisting of a value and an ID. I want to pass through the value, as long as the ID is a match. What’s the most efficient way to do this? Currently it’s like this (attached)

It works, the only problem is that sometimes I’m sending a bunch of these out rapidfire, and it keeps confusing values.. as in, plugins with one ID are reacting to values meant for another ID. I’ve tried to think of a way to use zl for this but I’m drawing a blank.

What do you guys think?

  • This topic was modified 2 years by  ryan7585.
  1. id.maxpat
Jun 29 2014 | 9:52 pm

I’d reverse the list and route it by id.

-- Pasted Max Patch, click to expand. --

Jul 01 2014 | 10:39 am

It seems that yhe route object doesnt accept "set" messages to change the argument.. the ID is user-assigned so I need that.. are there any other options you can think of?

Jul 01 2014 | 11:00 am

This will work with a list of any length, or really any message for that matter, that ends with the specified ID.

-- Pasted Max Patch, click to expand. --

Jul 01 2014 | 11:22 am

You don’t need a set message to change the message selector of route.

-- Pasted Max Patch, click to expand. --

Jul 02 2014 | 7:54 am

Chris– That’s essentially how I have it already, except you’re using zl instead of unpack. The problem here is that the operation of approving the ID, with this configuration, takes too long and if i send 20 lists out rapidfire, it confuses them and lets through the wrong values. or does using zl help with that somehow?

Rick — I don’t see anything where you can change the route argument in that patch. I’m using max 5 though, btw

Jul 02 2014 | 10:44 am

The example patch you posted works for me, as does my patch, so if you’re experiencing problems with dropped messages in a more complex patch, I suspect the bug is elsewhere. If you want to test my patch, save it in the Max File Search Path with the name ‘IDapproval’, then use this test patch.

-- Pasted Max Patch, click to expand. --

Jul 02 2014 | 11:39 am

Yup, that’s where the rub is. In max 6 route has changeable arguments.

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

Forums > MaxMSP