@esaruoho This being a new thread I had forgotten that you were using a wired USB connection.
Yes, that means that you are limited to midi only.
Is that really true? I used to use TouchOSC on an Android tablet. I could connect USB to the computer, and then on the tablet, open a tethered network connection, and this would assign a new IP address to the computer. Then I could use the IP address in TouchOSC and it 100% worked for OSC.
Unfortunately that feature has been removed from the Android versions on my current devices (but these are skinned Android forks, not "real" Android, so the feature might still exist). For iOS: https://support.apple.com/en-gb/guide/iphone/iph45447ca6/ios
Connect a Mac or PC to your Personal Hotspot
You can use Wi-Fi, a USB cable, or Bluetooth to connect a Mac or PC to your Personal Hotspot. Do one of the following:
Use USB: Connect iPhone and your computer with a cable. If you receive an alert that says Trust this Computer?, tap Trust. In your computer’s network preferences, choose iPhone, then configure the network settings.
After that, the Mac should have an IP address that directly connected to the mobile, through the cable. There's no reason at this point TouchOSC would be prevented from sending and receiving OSC messages (while allowing MIDI...? that doesn't make any sense).
"just not sure how to get PD and TouchOSC to talk to eachother so that this would work."
The first thing I teach in my class about getting data from an external device is: print out the data so that you understand what's coming in.
This goes for MIDI, OSC, Arduino, computer vision packages -- you can't do much of anything without knowing the format of the messages coming in.
You should get print outs something like:
print: list 1 fader1 0.777236
The specific keyword and number of arguments will be different for the multi-slider, but you can find that out by reading the console window.
The real message coming from TouchOSC is like
/1/fader1 0.777236. [oscparse] splits the command path
/1/fader1 into separate symbols. ([mrpeach/unpackOSC] doesn't do that -- from this object, you would get
print: /1/fader1 0.777236.)
At this point, with [oscparse], you will run into the problem whale-av mentioned:
1 in the printed message is a symbol, but if you try to match it using [route 1], it will fail because [route] will be looking for a number. That's the workaround I posted: [oscparse] --> [fudiformat] --> [fudiparse] --> ...
Then the other detail is that you need to drop the
list type tag before routing.
And [route] will give you the argument values, now split into one dataflow pathway per control.