Forums > MaxMSP

Efficiency – inputs versus s/r objects

March 19, 2011 | 10:21 pm

I did and search and came up empty. Couldn’t find anything in the pdf’s either. I’m just curious about the efficiency/error rates of using [send]/[receive] objects (and using it as [s #]/[r #] versus using input and outputs in Max 4.6 in OS X (iOS also if you’ve experience).

I’m finding my recovering brain to start blaming [s #]/[r #] for having bugs because some bugs just aren’t getting solved.

Thanks for any help you can offer.

ps – I’m using a lot of [s #]/[r #] objects right now….


March 19, 2011 | 11:13 pm

As far as I know the right-to-left message order doesn’t work with s-r. You can never say which receive objects gets the message first. If you need to syncronize messages after s-r, you can use the objects buddy and bondo.

I’m not sure, but I find the trigger object also more reliable than just the right to left message order. Lets say you have an object with one outlet and you wanna have two different calculations (which means several objects) from that output. You could either put the objects for the first calculation at the right and the second calculation at the left. Hopefully the right calculation will finish first. Or you put a trigger in between which will fire the output twice – one for the first and one for the second calculation. I think that way is safer. BUT I’M NOT SURE!


March 20, 2011 | 2:03 am

A few weeks ago, I had a problem with a patch I was working on, and I was surprised to find that was a right-to-left thing, This is the first RtL thing I had encountered in years. I am so used to using t(rigger) that it hardly ever comes up.

As far as the order of send and receive, I believe that it is essentially undefined. As far as efficiency goes, the two methods are pretty close, but direct connection has a slight edge.

– Pasted Max Patch, click to expand. –

March 20, 2011 | 4:30 pm

thanks for the patch post, but I’m still in the 4.6 bandwagon =,(

And I use [t] pretty often when I have to orchestrate a number of things in a certain progression. I don’t think it’s a RtL order issue, just strange communication (or non existant…) that is giving me problems. I’d rather not waste hours going through and putting up/labeling all the in outs required to replace the s/r objects I planned on using to test the theory. I’m starting to remember my undergrad professor telling me about issues with s/r…but it’s all fuzzzy. I’m gonna mail him.


March 20, 2011 | 6:15 pm

FWIW, I’ve never know S and R to fail.


March 20, 2011 | 9:41 pm

well…at least that’s something =/ if a bit discouraging. Are you using 4.6?


March 20, 2011 | 11:07 pm

I’m exclusively on 5.x, but I used earlier versions extensively. Never noticed a s/r problem.


March 21, 2011 | 1:07 am

Ok, thanks Chris. I guess I’m losing my mind =/ I’m going through having some luck changing r to receive….don’t know why. Trying to use even more trigger’s. Seems counterintuitive to fix problems by making more objects…. I think I have a fundamental flaw in my Max approach….


March 22, 2011 | 2:55 pm

hmmm, this is interesting to me. I looked over the pdf’s and have a vague sense of what priorities are given to what in Max, but..vague isn’t good enough =/ Do you know where I could read up on it more?


March 24, 2011 | 8:13 pm

thank you for the link!!! I wish I could give you rep on this forum =)

I haven’t read it in it’s entirety and am taking it in chunks, but would this problem be explained in there?

__________

#P button 0 142 15 0;
#P button 137 142 15 0;
#N comlet start;
#P inlet 134 21 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 16 117 132 196617 sprintf 0.1 \, %f %i 500;
#P message 16 164 132 196617 0.1 , 0.04907 736 500;
#P newex 16 95 111 196617 scale 0. 14999. 0. 0.5;
#P newex 16 74 76 196617 random 15000;
#P newex 16 142 62 196617 prepend set;
#P newex 16 183 50 196617 line 0. 1.;
#P newex 158 114 132 196617 sprintf 0.1 \, %f %i 500;
#P message 158 161 132 196617 0.1 , 0.04827 724 500;
#P newex 158 92 111 196617 scale 0. 14999. 0. 0.5;
#P newex 158 71 76 196617 random 15000;
#P newex 158 139 62 196617 prepend set;
#P newex 158 180 50 196617 line 0. 1.;
#P flonum 16 207 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 158 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P outlet 46 295 15 0;
#P newex 46 250 40 196617 clip~;
#P inlet 46 225 15 0;
#P connect 13 0 14 0;
#P fasten 13 0 16 1 21 93 129 93;
#P connect 14 0 16 0;
#P connect 7 0 8 0;
#P fasten 7 0 10 1 163 90 271 90;
#P connect 8 0 10 0;
#P connect 5 0 3 0;
#P connect 9 0 5 0;
#P connect 18 0 9 0;
#P connect 6 0 18 0;
#P connect 6 0 9 0;
#P connect 10 0 6 0;
#P connect 17 0 13 0;
#P connect 17 0 7 0;
#P fasten 5 1 7 0 203 205 298 205 298 61 163 61;
#P fasten 3 0 1 2 163 238 81 238;
#P fasten 4 0 1 1 21 243 66 243;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P connect 11 0 4 0;
#P connect 15 0 11 0;
#P connect 19 0 15 0;
#P connect 12 0 19 0;
#P connect 12 0 15 0;
#P connect 16 0 12 0;
#P fasten 11 1 13 0 61 208 156 208 156 64 21 64;
#P window clipboard copycount 20;
____________

Just send a bang into the two [random] objects and watch, for some reason when it gets to a real low number like .02 or so, it stops. I know not related to the s/r query before, but i think it might fit along what you’re talking about in the article I haven’t read yet (apologies…i’m recovering)


March 31, 2011 | 8:33 pm

thank you VERY VERY much for your help. I noticed that even at 100 I was having problems so I dropped it to 10 and haven’t noticed any hiccuprs….yet =)

quick question – could you explain this to me?

——

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 684 218 87 196617 print doesntwork;
#P newex 599 218 81 196617 print alsoworks;
#P message 599 145 46 196617 5. 3333;
#P newex 599 190 59 196617 line 2. 100;
#P message 512 145 40 196617 33333;
#P message 512 168 34 196617 5. $1;
#P newex 512 218 63 196617 print works;
#P message 684 145 40 196617 33333;
#P message 684 168 34 196617 5. $1;
#P newex 684 190 59 196617 line 2. 100;
#P connect 0 0 9 0;
#P connect 6 0 8 0;
#P connect 4 0 3 0;
#P connect 7 0 6 0;
#P connect 5 0 4 0;
#P connect 1 0 0 0;
#P connect 2 0 1 0;
#P window clipboard copycount 10;
______

it has stretched my mind to it’s limits. I realize solutions I could implement, but I’m dying to know why THIS doesn’t work.



MIB
March 31, 2011 | 9:24 pm

your patch works for me. all three instances print to the max window…


March 31, 2011 | 11:18 pm

thank you sur, you just kick started my brain. It works the first time, but once it gets to 5 it stays there. Which is very strange to me because I remember just reading that having the 2. there means it will always start at that number. Now I read it again and it says it starts at the ‘stored #’ which is obviously the 5.

< ---dumb

Thanks for that.


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