Csaba:
Check out the mrpeach-to-vanilla-osc.pad here: https://github.com/danomatika/BangYourHead/tree/master/6.Communication https://github.com/danomatika/BangYourHead/tree/master/6.Communication
It has a basic overview on sending/receiving OSC in Pd vanilla as well as a small cheatsheet when coming from the mrpeach objects.
In my usage, I have not run into any major issues with Pd's vanilla OSC handling but a couple of come to mind:
ie. (pseudo code)
msg = newOSCMessage("/some/address") msg.addFloat(123)
Avoid encoding numeral indices in the address, if possible. I prefer to make indices the first argument, so:
/trigger0/0 could be /trigger 0 0 where the "0" index is the first argument and the second argument would be the state
The issue is that when [oscparse] parses the message, it breaks it into a list. Any parts of the address are sent as symbols so matching to "0" index in "/trigger0/0" address has to be matched as a symbol and not a float in pd.
Example, parsing /trigger0/0 -> results in a list:
symbol: "trigger0" symbol: "0"
Whereas parsing /trigger0 0 -> results in a list
symbol: "trigger0" float: 0
On Feb 9, 2021, at 11:47 AM, pd-list-request@lists.iem.at wrote:
hi Csaba - i have done a fair amount of work with OSC in Unity and i highly recommend the extOSC plugin for this (it's free). https://github.com/Iam1337/extOSC https://github.com/Iam1337/extOSC
I agree. Don't roll your own unless you're familiar with OSC and fiddling with networking bytes.
Scott:
homemade OSC sounds cool but there are a lot of flavors and not all of them play well with PD. i tried a number of options and what worked on receive in PD was the following:
[iemnet/udpreceive] (with the port set at loadbang) -> [oscparse] - [list trim] and then [route] to send it places.
I'd be curious to know why [netreceive] didn't work for you in your case. We recently did an overhaul of all the networking, so I imagine the vanilla [netreceive] may work for you now. If there is a bug, it would be good to know about it...
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/