OSC functionality review


I have just started working with the new OSC APIs in JUCE Grapefruit.

There is a  questions I have on the API, maybe you can help: there seems to be no way to know who sent the message (Impl calls DatagramSocket::read overload that does not return sender). I think I could implement that rather easily, any reason why it should not be that way?

I would probably also need multicast join..

Hi there. Interesting. So you want to get the IP address and port number of the sender? Yes, the functionality is easy, but then that stuff would need to be passed through to the OSCReceiver::Listener... callbacks. I left it out to keep the API clean, I thought it may not be that interesting since you get the OSC address anyway and in OSC that's your main way of identifying messages. But yeah, maybe that info is more interesting than I thought? How would it be useful in your setup, and would you suggest to add that to the existing API?

Regarding multicast: we don't have that at the moment. Should be fairly easy to add though, I'll add that to our backlog. For now, you can use the native OS-specific APIs to join and leave multicast, and then it should just work. 

Hi Timur,

thanks for taking the time to reply.

I have a bunch of microcontrollers that want to talk to the workstation and I would like to slowly move away from a proprietary protocol to OSC. There is some logic associated with who sends the data in the plugin, so knowing which one sent the data is important to my use case.

I guess this could be handled on OSC address level, but the microcontrollers would need to scope OSC addresses it to their IP or some other identifier, for example /myip/my/param instead of just /my/param but it seems somewhat redundant since the UDP packet already carries this information effectively.

Looking at DatagramSocket::joinMulticast, a getter getSocket is probably all that is needed to get multicast to work, so that joinMulticast can be called on it.

Hi, was anything done to support this? I’m working on some projects at the moment that would like to be able to get the IP of the originator of an OSC message…

1 Like