Forums > MaxMSP

strange s/r message order in max

November 4, 2012 | 9:00 am

when make a Send object [call it sA], i can’t predict the order of the the rAs and it’s always jumping.

Firstly I found the order of the receive is the order you created it, but it changed after i close the file and open it again.
the order is totally reversed…..

I think this is a bug in Max, or I just didn’t get the right point.
Please Help me, Thanks a lot.


November 4, 2012 | 10:34 am

Hi.

this is no bug… that’s just how Max works. You can’t make any assumption on the order in which a message will be passed from one [send] to several [receive]s. Btw, this is why I generally don’t like send/receive!

hth
aa


November 4, 2012 | 11:29 am

I’ve never tried this (and it has ‘bad practice’ written all over it), but if the order can be predicted in the way you describe (i.e. by order of instantiation) then it would follow that the behaviour you want could be achieved via scripting with [thispatcher]. That way you could create the [receive]s dynamically, in a set sequence every time you open the patch.


November 4, 2012 | 12:40 pm

Thanks for all reply.

goodparleyandorfing, I don’t get your point of "make it dynamically", could you give me more details about it?

thx!


November 4, 2012 | 1:43 pm

As Andrea mentioned, send/receive order is not guaranteed, you should never rely on it. What does it mean?

#1 they are cases where order doesn’t matter… so you might be fine.
#2 if order matters consider using trigger and multiple send/receives


November 4, 2012 | 4:21 pm

Hi Dreamug,

You should follow the other advice in this post: what I proposed was very much me thinking aloud, and a far from viable solution even if it works. (That said, this hastily cobbled together experiment does seem to substantiate my hypothesis…)

– Pasted Max Patch, click to expand. –

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