Dear all!
I’ve tried to set up TouchOSC on my iPhone to send data to Pd on the Pisound with no success.
I read all the posts related to this topic before posting, and my hope is to compile my findings in a step-by-step guide for new Pisound users.
So I checked the following:
entering touchousc2midi --version provides me with the version number 0.0.10 (so I assume it’s installed)
opening the aconnectgui shows the TouchOSC Bridge entry connected to pisound-ctl (so I assume it’s working)
the hotspot “Patchbox” is running
the IP of the hotspot is 172.24.1.1
I’ve connected my iPhone to to “Patchbox”
I’m running TouchOSC on the iPhone
Inside the TouchOSC settings menu there are three entries related to connections: “MIDI”, “OSC” and “Bridge”
according to the information on hexler.net I need to select the “OSC” option
this provides three entries, “UDP”, “TCP Client”, and “TCP Server”. Browsing the UDP and TCP Client doesn’t find anything on the network
Entering 172.24.1.1 in the “Host” field and “12101” in the “Send Port” field and picking a preset such as “Touch Keys” doesn’t generate any Midi data within Pd on the Pisound, both using the “midiin” object and the “Test Audio and Midi” option
Am I overlooking anything in the above? Your help is much appreciated!
When I enter the command I receive the following error, any idea what might be going wrong here?
patch@patchbox:~ $ /usr/bin/touchosc2midi -v
Options from cmdline are {‘–help’: False,
‘–ip’: None,
‘–midi-in’: None,
‘–midi-out’: None,
‘–verbose’: True,
‘backends’: False,
‘list’: False,
‘ports’: False}
MIDO_BACKEND from env: None
Using backend <backend mido.backends.rtmidi/LINUX_ALSA (loaded)>.
Backend for midi is <backend mido.backends.rtmidi/LINUX_ALSA (loaded)>.
Inport is <open input ‘TouchOSC Bridge’ (RtMidi/LINUX_ALSA)>
Outport is <open output ‘RtMidiIn Client:TouchOSC Bridge 131:0’ (RtMidi/LINUX_ALSA)>
found ‘wlan0:172.24.1.1’ as default route.
Registered patchbox._touchoscbridge._udp.local. on 172.24.1.1:12101
Waiting for first package from touchOSC in order to setup target address…
Traceback (most recent call last):
File “/usr/bin/touchosc2midi”, line 11, in
load_entry_point(‘touchosc2midi==0.0.10’, ‘console_scripts’, ‘touchosc2midi’)()
File “/usr/lib/python3/dist-packages/touchosc2midi/touchosc2midi.py”, line 165, in main
target_address = wait_for_target_address(psa.ip)
File “/usr/lib/python3/dist-packages/touchosc2midi/touchosc2midi.py”, line 135, in wait_for_target_address
s.bind((‘’, PORT)) # ‘’ represents INADDR_ANY
OSError: [Errno 98] Address already in use
touchosc2midi is already running, or something else is already listening on port 12101. First turn off any other touchosc2midi instances or software using 12101.
Great success, many thanks for providing this clue. I will update my first post with the correct settings in TouchOSC for anybody else running into a similar issue
Here is the complete process that worked for me in case this is helpful for anybody in the future:
check that touchosc2midi is installed by entering touchousc2midi --version in terminal (current version number is 0.0.10)
open aconnectgui and check that the TouchOSC Bridge entry connected to pisound-ctl
make sure that the hotspot “Patchbox” is running (if not start it by entering sudo pisound-config or patchbox in terminal)
connect the device running TouchOSC to to the “Patchbox” Wifi network
launch TouchOSC
within the TouchOSC settings menu, access the option Bridge, browse for Pisound and activate “Connection 1”
within the TouchOSC settings menu, access the option “Midi”, set “Send Port” and “Receive Port” to “Bridge1” and activate “Connection 1”
In order to receive the midi data within Pd it’s important to make sure that the number of Midi input devices is matching the Midi input devices visible within aconnectgui. Otherwise you won’t be receiving anything, also within the Audio and Midi test page.
As the buttons are remappable, single click may be doing something else for other users, the hotspot can be controlled through sudo pisound-config or patchbox utilities.
Hi I am having a different issue regarding this topic:
I can not seem to get the touchoscmidi to work, nor can I find it in aconnect -l.
First of all, I am not using Patchbox OS, but Raspberry Pi OS (came with RNBO Max MSP).
Any ideas to check and figure out what the issue is?
// touchousc2midi --version is not working as an ssh command
Hi, I have installed and updated the touchoscmidi software through the sudo pisound-config.
Then I do not see the touchosc mentioned in the aconnect -l.
When I do: “touchosc2midi” I get:
Traceback (most recent call last):
File “/usr/bin/touchosc2midi”, line 33, in
sys.exit(load_entry_point(‘touchosc2midi==0.0.10’, ‘console_scripts’, ‘touchosc2midi’)())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/touchosc2midi/touchosc2midi.py”, line 162, in main
psa = Advertisement(ip=options.get(‘–ip’))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/touchosc2midi/advertise.py”, line 64, in init
self.info = build_service_info(ip=ip or default_route_interface())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/touchosc2midi/advertise.py”, line 46, in build_service_info
return ServiceInfo(type_=TOUCHOSC_BRIDGE,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ServiceInfo.init() got an unexpected keyword argument ‘address’
Then, when I do " touchousc2midi --version "
I get:
-bash: touchousc2midi: command not found
I don’t get any respons if I do the journalctl -u touchosc2midi > touchosc2midi.log command. systemctl status touchosc2midi.service again results in Failed with result ‘exit-code’
Or maybe I miss the point, is te command not enough for ‘saving the log and attaching it’ ?
It should produce a file called touchosc2midi.log, the command itself prints no output, as all of it goes to the file. Please attach it here for us to take a look.