Forums > MaxMSP

two max app communicating

July 4, 2012 | 1:55 pm

Hi all,

I need two Max *applications* to communicate with each other.
Messages are bangs, or integers, so I don’t need any audio routing through Jack or Soundflower or the like…
So far the only solution i had is to use UDP, but it seems not to work.
Here’s the code.
Any tip highly welcomed!
Thanks!

– Pasted Max Patch, click to expand. –

July 4, 2012 | 2:05 pm

i forgot to say… the two applications are within the very same computer! ;-)


July 4, 2012 | 2:26 pm

works fine here…
MacBook Pro 10.7.4 – max5 and max6
Which platform are you on? Mac or PC?


July 4, 2012 | 2:49 pm

really? interesting… I’m on a Mac max5 Lion btw
i use the localhost settings. And as said, trying to communicate from one application to another, made with Max with no results…
Are you using port 7400?


July 4, 2012 | 3:07 pm

Did you check the Max window?
You should find an error message (such as "bind to port 7400 unsuccessful"), if it did not work as expected.

You have to be careful not to use two [udpreceive] objects with same port number.


July 4, 2012 | 3:32 pm

There was a promising project by Nao Tokui for OSX years ago (2006), but unfortunately it doesn’t seem to be maintained. I never tried those objects between 2 standalones.

http://www.sonasphere.com/2002/01/maxmsp-objects-2002〜/

p


July 4, 2012 | 3:51 pm

very naive from me… i had the same port set on the sending app as well, so as a result on the receiving app that port was already taken!
and yes, Nao project seems very interesting, I’ll tinker with it a bit asap i think
thanks everyone!


July 4, 2012 | 7:05 pm

Along those lines, sort of, [send] and [receive] between patches works as expected (the same names will communicate to any active patch), BUT, between two standalones, same-named [send] and [receive] objects will NOT communicate with each other, only within their own standalone. The each have their own namespace, if I remember the terminology right.

So, don’t know if it applies in your case, but something to keep in mind if you have multiple standalones with s/r objects in them and they’re not doing what you might expect. That’s where the UDP comes in :)


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