First time here? Check out the FAQ!
x

How do I change the sending port for OSC?

0 votes
1,374 views
I've used the OSCHelper to set the sending port of my OSC source. However no matter what I configure, I'm going to receive OSC messages only when my source sends to port 8000. Is this the intended behaviour or am I doing something wrong?

Thanks!
asked Nov 10, 2016 in Controllers, OSC & MIDI by kymaguy (Virtuoso) (10,580 points)

2 Answers

0 votes
 
Best answer

There are actually 4 ports involved in bi-directional OSC messaging:

  1. Paca(rana) listening (receiving) port, which listens for OSC messages from any device on the network. This is always 8000.
  2. Paca(rana) sending (transmitting) port, which sends OSC responses to IP addresses from which it has received OSC messages. This port number is randomly assigned at Paca(rana) start up.
  3. The OSC device/software listening (receiving) port, which listens for OSC messages from any device on the network. This is usually 8000, but may be random or user-defined, depending on the device/software.
  4. The OSC device/software sending (transmitting) port, which sends OSC messages. This port number may be random or user-defined, depending on the device/software.

OSC messages are sent from a sending port on one device to the receiving port on another device.

This means that to send a message to the Paca(rana), you need to send it to the Paca(rana)'s IP address and port 8000, the Paca(rana)'s receiving port. And to receive a message from the Paca(rana), your OSC device/software should send an "/osc/respond_to" message to the Paca(rana) with your OSC device/software's receiving port. (See the Kyma Open Sound Control Protocol).

If your device/software is not capable of sending the "/osc/respond_to" message to the Paca(rana), you can use the OSCHelper tool to provide the same information the "/osc/respond_to" message provides; namely, the IP address, sending port and receiving port of the OSC device/software, with which you want to establish bi-directional communication, along with the list of messages that you would like Kyma to be able to send to that OSC device/software.

You can open the OSCHelper tool from the Tools menu. (If it is not in your Tools menu, choose Check for software updates from the Help menu in Kyma.)

The IP address of the OSC device/software (either external hardware or software running on the same or a different computer) must be on the same network as the Paca(rana). For example, if the Para(rana)'s subnet mask is 255.255.255.0, then the first three numbers of the OSC device/software's IP address have to be the same as the first three numbers of the Paca(rana)'s IP address.

The sending and receiving port numbers can be found in the documentation for your OSC device/software.

answered Nov 10, 2016 by ssc (Savant) (127,060 points)
selected Nov 11, 2016 by kymaguy
Very good explanation! Thanks for making things clear!
+1 vote
The Paca-family have a fixed port assignment of 8000 for OSC reception. In the OSC world this is commonly refered to as the "Listen Port". This is not currently user changeable. However OSC "best practices" mean that you should use Bonjour to discover the Paca(rana), and then use the information obtain through Bonjour to determine the Paca(rana)'s listen port.

I mention this because if you are doing OSC communication through KymaConnect to a Paca(rana) KymaConnect's "PacaProxy" OSC listen port is variable; it changes every time KymaConnect runs. So using Bonjour to discover the port number is mandatory when sending OSC through KymaConnect unless you set up KymaConnect to always use 8000 (the "Force Port To 8000" setting).

Your application's OSC listen port, where you receive Paca(rana) OSC messages, is determined by how you set up your application's OSC server function. A lot of people use 8000 for this but it need not be. Any port will work provided it is not reserved or already in use for other functions on your computer or device. The Paca-family OSC implementation has a number of ways to determine where to send OSC messages but the most flexible way is to inform the Paca(rana) which port it should send to. This is the purpose of the /respond-to message.
answered Nov 10, 2016 by delora-software (Master) (5,660 points)
nice and clear! thanks for that!!
while we are at it: What about sending OSC via Paca Proxy? Let's say I want to send an OSC message to a device connected to my laptop's wifi while the Pacarana is connected to the ethernet port. Can I just use the IP and port of the device and Kyma Connect will handle it?
If you mean manually set up a response port using the OSCHelper tool then no. However, the PacaProxy does understand the Pacarana's respond_to family of OSC messages and does what you'd expect. So those can be sent by the device to the PacaProxy to establish proper bi-directional communications.
...