Sending OSC Message over the Internet, plz help.

Giuseppe's icon

I've been looking around on this forum to find a useful solution to my problem.

In about a week I'm supposed to play a gig in Rome while being in the Netherlands and I was all like YEAH OF COUURSE I'm gonna be able to send all my OSC control data to another computer in Rome running the same patch, receiving the control data and firing it to the sound part of the patch playing it.
(the reason why i wanted to send just the control data it's to reduce latency, so i can tell the sound part "do this" and it will, in Rome, saving me a lot of dataflow)

What I did until now, i made a control patch resembling the Novation Launch Control XL based on a patch for the Korg Nano Kontrol i found on the internet, then I made this AM/FM synth which is directly controlled with all the knobs and faders of the controller.

Now i need this controls to arrive to the same patch in Rome, in order to do that I read this thread.
https://cycling74.com/forums/osc-over-the-internet-outside-networks/

I'm gonna use UDPSEND and UDPRECEIVE to transfer data but since my ip is dynamic i'm using this utility i found on the internet called www.noip.com making a host that should basically mirror my data, like i fire them to the internet on this ip and it will fire it back to the other part of Europe.
So i got a static IP to use which is 62.195.130.XX and i need to select the port which is 60XX.
The port I'm going to use for this is supposed to be set firewall free... I don't really know how to do it, but i followed some howto's on the internet and it should now be free.

Now, about sending, things seem pretty easy. UDPSEND then the IP then the port, right. the object bonds to the port and hasta la vista, I think the issue is with the receiving... the UDPRECEIVE i will have on the other computer (now on the other side of my room, but soon on the other side of the continent) allows as an argument just the port, and it's of course going to use local network.
How should i tell to the UDPRECEIVE to fetch the data exactly from that IP???

Another thing is then... From each DIAL, FADER or BUTTON I've got basicly a CC-IN with the number its MIDI number that goes in a number box that i can route to the audio part trough sends and receives... basically each n-box has it's output in a S ADDRESS [for instance S DIALTOP1] and a generic out trough a subpatch called S OUT.
This S OUT is supposed to be the object sending the OSC values. But I've been looking at the subpatch without understanding how, if anybody could explain me that i'd be super thankful!!
Be nice, it's my first [well actually my second/third] patch.

I'll attach my patch and the two subpatches to this thread so you can have a look yourself.

THANK YOU IN ADVANCE, if you ever come to Napoli I'll get you the best pizza ever.

Am-Ear-Tearer.maxpat
Max Patch
EARTEARERbutton.maxpat
Max Patch
EARTEARERDialSlider.maxpat
Max Patch
Jan M's icon

For your sending-OSC-part of the question:
The [udpreceive] object is not fetching the date from a specific IP. It doesn't matter if the sending computer has a fixed IP or not. The receiving computer needs a fixed IP. That't why you can't specify an ip in [udpreceive]. It is not necessary.
But the receiving computer will not be connected to the internet directly. It will be behind a router and probably behind a firewall. So the receiver-computer's internal IP address will be not the same as its public one and the receiver will not be reachable directly from the outside. You will have to configure the router on the receiver's. Part one of this configuration is NAT (Network Address Translation) together with part two: Port forwarding. Basically it means you will tell the router if he receives UPD data on a specific port it shall send them to a internal IP-address (the internal IP of the receiver) on a specific port. the receiver has to listen to the port the router is using, not the one you are sending them to the router (they may be identically, though). Well and if there is a firewall you must open the ports you are using. In regard of the firewall a fixed IP of the sender can be helpful: You could open those ports only for your senders IP. That will make the whole system more secure.

If you need feedback messages from Rome sent back to Holland, yes, you'll need a fixed IP at your place as well and the NAT/Port forwarding you'll need to setup on your side as well.
It is very hard to give more specific advice as router configurations differ a lot. Are you performing at place that has a network admin (something museum-esky)? If yes ask him to set that up if you can - and test it extensively before the gig ;) . Anyhow you wont't have access to the router in Rome from the Netherlands (unless it's a really insecure setup there...)

Giuseppe's icon

Uhm well... i see,
So basically it means that once i create this account that provides me an IP I should make sure that the UDPSEND has this IP as an argument and the the port 60xx is portforwarded, while the patch on the computer in rome as to be on a computer connected to a router who's IP is the same as the one i set in the UDPSEND (well, how do i do that?) and the 60xx port is portforwarded as well?
I'm not actually very good with networking...

Jan M's icon

Yes, the setup will look like this:

SENDER (Holland):
* Your Computer and your router: IPs do not matter

RECEIVER (Rome):
* THE ROUTER NEEDS A FIXED IP - the public IP address: Lets assume 11.11.11.11 (Public IP)
* YOUR COMPUTER needs a fixed ip within the local network (has to be set in the router in Rome, or - if possible change your computer network settings(the Rome computer) to "DHCP with fixed address". If the latter works depends on the router in Rome ) Lets assume your local IP is (192.168.1.20)
* THE ROUTER needs to forward all UPD data on one port to your computer.
Let's assume you are using port 6060. Router will receive on port 6060 and forward all data to 192.168.1.20 on port 6060.

The data flow will be for Sending from Holland to Rome
{Holland-Sender [udpsend 11.11.11.11 6060]} --->
-----------{Internet} ----------->
------------{Router in Rome: Fixed IP: 11.11.11.11 (listening to port 6060 and forwarding to IP 192.168.1.20 on port 6060} --------->
------------{Rome-Receiver (IP address 192.168.1.20) [udpreceive 6060] }

What you need:

+ Access to the router/network infrastructure in ROME
+ get a fix public IP for the router in ROME
+ Configure the router in Rome to give your computer there a fixed local IP
+ Configure router in ROME to forward all data send to a specific pot to your computer's local IP.

It no witchcraft, but it's not trivial either. Especially if the place in rome has (like larger or institutional venues usually have) a more complex internal network structure. You definitely need someone in Rome who has the knowledge and access to set up the configurations.

I wrote a Java class/external a long time ago that will make it a lot easier: https://cycling74.com/tools/jm-pubnub. It should still work. It spares you all the configuration. But you'll need an account at the used "push service" and latency is quite high and unpredictable (up to 200ms to my experience).