strange s/r message order in max

dreamug's icon

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.

andrea agostini's icon

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

goodparleyandorfing's icon

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.

dreamug's icon

Thanks for all reply.

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

thx!

Emmanuel Jourdan's icon

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

goodparleyandorfing's icon

Hi Dreamug,

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

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...)