Networking computers wirelessly
Hi,
I am trying to figure out how to send messages from Max to another computer wirelessly. My ultimate goal is to send messages from Max to another computer and into Touchdesigner or into Max on another computer.
Right now I am using the [udpsend] object to send OSC messages into Touchdesigner on one computer and it works great. Does anyone have any experience doing this on more than one computer? Or any suggestions. Are there firewall restrictions that need to be addressed? Let's assume both computers are in the same room and on the same wifi network.
Thank you for any suggestions or insight.
I have found that udpsend is not all that clever when it comes to handling OSC, even though it should. Might I suggest you try using the Sadam and ODOT libraries? They work much better. I have attached a screenshot of my configuration to give you some ideas.
.png)
Essentially, you configure udpsend and udprecieve to connect to Sadam's udpReceiver and udpSender respectively. You can chose whatever port numbers you like for this. Localhost is the default internal networking address for your host machine - 127.0.0.1 - this bypasses the external network altogether. The Sadam udpClient is then configured for the external client you wish to communicate with. You will see that the send and receive ports are the same in my example as this is a peculiarity of the X-Air mixer that I'm using. Normally you will need to configure the port numbers to match the client configuration.
I have used message boxes to display the incoming and outgoing OSC messages for debugging purposes - don't forget to use the right-hand inlet otherwise you won't see the messages.
I've used ODOT o.route objects to filter the message addresses although the ordinary route object should work as well for most things. However, ODOT is OSC specific and has lots of other options.
You'll notice that the outgoing OSC message is sent through a send/receive link. I use sprintf to format the OSC messages as you can insert variables with fixed formatting.
.png)
In this example, sprintf will construct the OSC message "/-snap/01/name".
@Andrew Maskell, thank you very much for this very detailed answer. I will set this up with Sadam and ODOT libraries and see what happens.
thanks!
I should have mentioned that you don’t need the metro and /xremote objects in there for this to work - they are another peculiarity of the X-Air mixers that require polling every 5 to 10 secs to keep them sending out OSC responses to MIDI inputs.
use broadcasting and forget complications.
I tried that and it didn't work for me. I had no problems sending the OSC messages out with udpsend but there was no way that I could get udpreceive to "listen" to what was coming back; and yet I could see all the activity going on with OSC monitor software running on the host PC or a remote device. Using the Sadam library fixed it instantly. I've simplified the code here:-
.png)
I have attached the displayed code here for pasting into your own patch. You'll need to edit the port numbers and client network address to suit your own purposes.
Topic here has nothing to do with behringer XR stuff.
It is simple question how to send OSC messages
to different computers.
Answer is simple - either set several udpsend objects with dedicated
IP addesses and ports, or use broadcasting to reach all computers on the
network.
No furthert complications needed.
udpsend 255.255.255.255
will work in 99.99% cases
Yes, as I said, I had no problems at all with udpsend. It was udpreceive that didn't work, and I tried all manner of solutions suggested here and elsewhere over a period of four months before I stumbled on this solution. It's a problem that appears to have been plaguing plenty of users trying to interface to all manner of devices over time and my suggestion works! It's also why the Sadam module was written. The ONLY reason I mention the X-Air is to explain why the Sadam send and receive ports are the same in my application when for most other applications they would be different. The other point to make here is that udpsend and udpreceive appear to exclusively hog the ports for themselves and can't bind to the same port number simultaneously or when other apllications on the same host computer are using them, whilst Sadam will happily share them with other applications. This solution is valuable for all sorts of applications so please don't shoot it down. Don't forget, the OP was because the user couldn't get udpreceive to work on his remote computer accessing the same port with two applications (Max and Touchdesigner) either - or at least, that's how I read it.
3 different Max versions + Processing on same port at same time.
I could add more ...
Only troublemaker I heard off is Ableton Live

Hmmm, you’re on a Mac! I’m on Windows, so maybe that’s where the problem lies? It has to be said that Windows networking is rubbish in comparison.
Hey everybody thanks for all these replies. I tried using the Sadam method and couldn't get it to work. But udpsend is already working for me anyway, on my computer between Max and other applications like Processing and Touchdesigner.
Source Audio, I don't know about broadcasting. In the example you gave, with udpsend 255.255.255.255. is the 255 number the IP address of another computer? Or is that how you can send to multiple locations?
I haven't been able to meet with my group yet to try the multiple computers set up, but I should be able to do so soon.
Udpsend works - it’s udpreceive I had all the problems with. Even though I had OSC monitor software which showed traffic on the relevant port, udpreceive stubbornly refused to pick it up. It communicated with software on a single computer but not with software running on another machine or another device.
With Sadam, don’t forget to change the port numbers and the address to match your remote computer. You will need to have a corresponding set up at the other end too if you want to talk to Max remotely. I posted a snippet above that you could copy and paste into Max at both ends. If you let me know the addresses of your two computers I’d be happy to post modified snippets for you to try.
There may be a block in your firewall but it depends on what software you are using and how it is configured. However, programs like Max usually create the required firewall exceptions when they are installed.
Broadcasting uses the 255 addresses to send to the whole network segment rather than a specific machine. For example, if your computers have addresses like 192.168.0.xxx then broadcasting on 192.168.0.255 will send the data to all computers in that network segment. This can be handy if you don’t have static addresses set up on your computers as they will use DHCP to ask the router to allocate addresses dynamically. This means the addresses could change every time you connect your computer to the network, especially via Wi-Fi.
If you have two network segments on 192.168.0.xxx and 192.168.1.xxx then broadcasting on 192.168.255.255 should cover both network segments. Broadcasting on 255.255.255.255 should broadcast absolutely everywhere but it does potentially create a security risk.
It took me four months of struggling to get this to work but once I cracked it the dividends really paid off So do keep plugging away at it.
255.255.255.255 is broadcasting to all connected devices
on local network.
If your firewall blocks broadcasting, it would also
block limited range like 192.168.xxx.xxx.
So why bother using that ...
If you can't use broadcasting for whatever reason, you will have to create udpsend object
for each computer to be able to send messages,
or change IP every time you need to send a message to specific computer.
But the whole structure depends on the communication needs
and without knowing the details it makes no sense to post advices.
Broadcasting is best choice for master -> slaves configuration
where maste talks to all, but clients reply only to master using
master's IP address.