i think roman made an error report about this [netreceive -u -b] beahviour already.
https://github.com/pure-data/pure-data/issues/373
Gesendet: Sonntag, 10. Februar 2019 um 15:36 Uhr Von: "michael strohmann" itsnotfair9@gmail.com An: "Scott R. Looney" scottrlooney@gmail.com Cc: PD-List pd-list@lists.iem.at Betreff: Re: [PD] trying to set up OSC between Unity and PD via [netreceive] or [iemnet/udpreceive]
HI Scott, i do a similar thing - send OSC from the LEMUR app to pd and vice versa. Lemur sends osc and to receive it in pd works fine with [netreceive -u -b] | [oscparse] | [list trim] | [route whatever the message]
there seem to be a odd behaviour with [netsend -u -b] though. according the UDP protocol a message should be broadcast to an IP adress regardless if the receiving end is actually listening. this bi-directionality is redarded only with TCP.
however, in [netsend -u -b] once the receive leaves the network the connection is closed, and you need to reconnect to the device in order to send messages. so i connect to the device every second, to make sure that it receives messages upon re-entry to the wlan-network (i also need to send the status of the patch on a regular basis, so that all devices are up to date…)
my patch (quite simple file playback in response to sensor input) worked fine, but i had occasional crashes / freezes with “watchdog singaling pd” (i run pd-0.48 on RaspberryPi B+) since pd writes “connecting to port “ to the console everytime i connect - which is every second - after a couple of hours/days is filled the RAM and caused some misbeavior.
the solution - and i hope it really fixes the freezes also in the long run - was to send the standard error to dev/null like so: puredata -stderr 2>/dev/null path/to/patch.pd
i think roman made an error report about this [netreceive -u -b] beahviour already.
i actually also wanted to use UNITY for sending OSC, but could not find time to work it out, so pls let me know it you found how to do it…
Cheers! Michael
On 10 Feb 2019, at 10:56, Scott R. Looney scottrlooney@gmail.com wrote:
OK thanks Christof! [oscparse] seems to do the trick, and formats it as a list that i can break up. and it seems i have [netreceive] working properly after all, so that was my error thinking it was broken. it is a bit picky and seems to work better if i send it a message as to what port to listen to rather than defining it as an argument initially.
On Sun, Feb 10, 2019 at 1:03 AM Christof Ressi <christof.ressi@gmx.at mailto:christof.ressi@gmx.at> wrote:
patch with their [udpreceive] which worked fine. trying that same patch in PD however, made all the data print out as integer ASCII values rather than Unicode text characters. i tried two other Unity OSC projects and they behaved the same way.
so, at the least, i need a convenient way to change all the ASCII integer numbers in a data stream to ASCII characters.
IIRC, in max, updreceive outputs osc messages while in the Pd objects iemnet/udpreceive or [netreceive -u -b] output the raw udp packet as a list of bytes. You need another object to parse the data. Pd vanilla has [oscparse], but personally i prefer the mrpeach/unpackOSC resp. osc/unpackOSC externals.
Gesendet: Sonntag, 10. Februar 2019 um 09:39 Uhr Von: "Scott R. Looney" <scottrlooney@gmail.com mailto:scottrlooney@gmail.com> An: pd-list <pd-list@lists.iem.at mailto:pd-list@lists.iem.at> Betreff: Re: [PD] trying to set up OSC between Unity and PD via [netreceive] or [iemnet/udpreceive]
nope - doesn't work. absolutely no output at all from [netreceive -u -b] whereas i do get results from [iemnet/udpreceive]. i'm pretty convinced that on the Mac anyway the UDP functionality of [netreceive] is basically broken, at least in regards to responding to .Net's Sockets UDP sending methods anyway.
On Sun, Feb 10, 2019 at 12:20 AM Roman Haefeli <reduzent@gmail.com mailto:reduzent@gmail.com> wrote:
The equivalent to [iemnet/udpreceive] is [netreceive -u -b].
Roman
On Sat, 2019-02-09 at 23:40 -0800, Scott R. Looney wrote:
hey folks, i'm trying to set up a OSC communication between Unity and PD. the eventual goal is that an iOS app will be sending data to PD to control various parameters. this isn't a libpd issue as i do not want to run a PD patch in Unity. i only want the remote communication.
so far i've tried Kalimba which works perfectly with [netreceive] in the Unity Editor. it looks like this is because it uses TCP and not UDP for its connection. however due to its age (6 years or so) the resulting Xcode project does not build correctly. i'm assuming it's likely an old libpd issue, but not sure.
so, i've tried a few other OSC Unity based projects and none of them work with [netreceive] in any way (including in UDP mode). i did find a few that work with [iemnet/udpreceive]. one of them had a demo Max patch with their [udpreceive] which worked fine. trying that same patch in PD however, made all the data print out as integer ASCII values rather than Unicode text characters. i tried two other Unity OSC projects and they behaved the same way.
so, at the least, i need a convenient way to change all the ASCII integer numbers in a data stream to ASCII characters. ideally i'd love to have a Unity OSC demo that can send data to PD reliably, using TCP or UDP. any help appreciated! _______________________________________________ Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list https://lists.puredata.info/listinfo/pd-list _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list