Is it possible to send data from one city to another over a UDP?
My friend and I are trying to control each others synths in different cities, to play music together across space. I live in New York and he lives in San Francisco, we’re trying to use the UDPSend & Receive objects to send the midi data from one place to another but can’t seem to get it to work. But if I want to send the to multiple devices in my home it works fine.
Is it even possible to send this data across cities, to computers on different networks?
Does anybody have an example?
Thank you for the help in advance.
on different networks, no. :)
but over the internet it works, of course, and it is basically the same than using it locally.
for a more specific answer pls post an example patcher.
I don’t think it is that easy,
You need to set up your router to let Unicast go through it , and set both sending and receiving PC with public IPs so that they aren’t hidden behind the router .
I don’t know if UDPsend it sending multicast or Unicast mesages though
Mutlicast address type is like 225.x.x.x and can be received by any device, and Unicast ( target IP in a regular IP address) can only be received by one person, this should work over the internet.
You may have packet lost or arriving in wrong order so it may not be reliable , unless you encapsulate it into RTP and use a FEC :)
You will also have delays depending on if you are using FEC, the quality of the network in between you two and the congestion of the traffic.. (1sec max I’d say)
I wish you good luck and I’d be happy to help you out .
but maybe there is an external somewhere able to encapsulate the messages into TCP packets, which would allow you to get rid of the burden above , it is probable yes..
I made a couple of externals for sending/receiving raw data using TCP and UDP, available in The sadam Library: http://www.sadam.hu/software . However, as clement-montreal already pointed it out, the trickier part usually is not Max, but the correct setup of the routers. If you’re both at home, having super-user rights on your routers (which are directly connecting to your ISP), then the task is actually, quite easy (as long as you are familiar with your own router, so that you know how to open ports, forward them to a specific address etc), but if you’re at an institution (university, student dorm etc) where you can’t reach the Internet directly, then you might need to contact your network admin in order to have things set up for you.
Hope that helps,
good one !
I think you should try TCP instead of UDP , getting UDP through the multiple routers over the internet may not be possible or very hard.
to add another comment regarding TCP/UDP: there’s practically no difference in setting up monodirectional TCP or UDP connections; in either case, you should open the required ports on all routers and set up the appropriate port forwardings. In most practical cases, you’d want to use both protocols in a live scenario: you’ll send all control data by TCP and all stream data by UDP (for example: MIDI key commands -> TCP; MIDI control fader values -> UDP). The point is, that where data loss or data ordering is important, you’ll use TCP and for all other cases UDP is usually enough.
BTW, you may check out http://quintet.net for a complex Max-based software for networked audiovisual performances; our ensemble has been using it since 2005 and the last few versions are now quite reliable and professional. However, for a simple MIDI transmission, it’s more than an overkill.
Hope that helps,