@esaruoho said:
I could try again, but it looked like UDP required me to know the IP address of both the laptop and the iPad, and that really threw me (i don't know how to figure out what the IP address of the iPad is, or how to make sure it's always the same, same for macOS).
Ah right, for bidirectional communication.
Actually in the netreceive help file, there is a flag for this: "optional -f flag for from address & port outlet (0.51+)".
Help file example prints from: list ::ffff:127.0.0.1 57120
where ::ffff:127.0.0.1
is an IPv6 address.
So...
... should configure the [netsend] to send to the first address from which messages were received (and I did a quick test, which worked). If you enable "Ping" in TouchOSC, then it will automatically send a message to the computer, which will trigger the "connect" logic right away.
Incidentally, I didn't know about this feature (never used the "from" address in Pd). My thought process was, "Well... this is a very common requirement, so let me have a look at the [netreceive] help patch and see if there's anything about 'from'" -- and toward the lower right, there's a [print from] box. Hm. Then, what's different about the [netreceive] feeding it is that it isn't only "-u -b xxxx" but rather "-u -b -f xxxx"... what's that "-f"? Then, looking up from there a little bit, there's a list of object creation flags, where "-f" is explained.
So the solution exists, and documentation for that solution is actually reasonably clear.
i have maybe an hour every 2-3 days to try and get something going, and also feel a bit like there's no "TouchOSC with PureData for idiots" blog-post for iPad / macOS going on, or at least i haven't been able to find it.
This I fully understand.
Pd OSC sending, like this. It won't send anything until after you push a connect ip.ad.dr.ess port
message into the netsend inlet -- as noted above, you can get the parameters for the connect message from [netreceive].
... producing messages like /1/toggle1 1.0
or /1/toggle2 0.0
. This type of message format is what you need to change a control's value on the tablet.
It's also possible to "set" the OSC command path before providing the arguments -- but try the simple way first.
hjh