TouchOSC and Pisound - Setup Question

You should upload the touschosc2midi.log here. First retrieve it from the Raspberry Pi, probably the easiest way is to copy the file into a USB thumb drive and get it to your main computer. Or search the Internet for alternative ways how to do that, my personal favorite is using ssh and scp.

how can I get the log through ssh?

Look through some tutorials, like this one: Transfer files to the Raspberry Pi without FTP with SSH. – Howto Raspberry Pi

touchosc2midi.log (22.3 KB)

Got it !

Thank you for your help so far Giedrius, this means a lot to me! I hope you find something in the log file attached above that can give some light on the situation.

@Giedrius any help?

Try fully purging and reinstalling the package:

sudo apt purge touchosc2midi
sudo apt install touchosc2midi

Btw, what output do you get from this command?

apt show touchosc2midi

pi@ewoudpi:~ $ apt show touchosc2midi

Package: touchosc2midi

Version: 0.11.0-2~blokas

Priority: optional

Section: sound

Maintainer: Blokas hello@blokas.io

Installed-Size: 52.2 kB

Depends: python3-docopt, python3-liblo, python3-mido, python3-netifaces, python3-rtmidi, python3-zeroconf, python3:any (>= 3.2~)

Homepage: GitHub - BlokasLabs/touchosc2midi: a (linux compatible) TouchOSC Midi Bridge written in python

Download-Size: 10.8 kB

APT-Manual-Installed: yes

APT-Sources: apt.blokas.io bookworm/main armhf Packages

Description: TouchOSC 2 MIDI bridge, see GitHub - velolala/touchosc2midi: a (linux compatible) TouchOSC Midi Bridge written in python for more details.

Then when I try to look for the TouchOSC bridge in my midi ins and outs, I don’t find anything?

touchosc2midi list ports
Midi in-ports:
0: Midi Through:Midi Through Port-0 14:0
… (left some out here)
6: pisound:pisound MIDI PS-3GKRMYM 48:0
7: pisound-ctl:pisound-ctl 129:0
8: Midi Through:Midi Through Port-0 14:0
… (left some out here)
13: pisound:pisound MIDI PS-3GKRMYM 48:0
14: pisound-ctl:pisound-ctl 129:0
Midi out-ports:
0: Midi Through:Midi Through Port-0 14:0
… (left some out here)
5: pisound:pisound MIDI PS-3GKRMYM 48:0
6: pisound-ctl:pisound-ctl 129:0
7: Midi Through:Midi Through Port-0 14:0
… (left some out here)
12: pisound:pisound MIDI PS-3GKRMYM 48:0
13: pisound-ctl:pisound-ctl 129:0

@Giedrius any feedback?

Now I am bypassing the osc2midi with using just using OSC in and out on the raspberry pi, but internally (through RNBO patches) translating it to midi when I need to. Yet, I want to configure the button I get stuck…

I want to send an internal OSC msg: “/rnbo/inst/control/sets/load initial” on port 1234.
I have added ‘liblo’ for the use of OSC, should be fine I think. What did I do:

ADD .SH TO PISOUND-BTN
cd /usr/local/pisound/scripts/pisound-btn
sudo touch load_graphset_rnbo.sh && sudo chmod +x load_graphset_rnbo.sh

THEN CODE:
target = OSC.Address(1234)
OSC.send(target, “/rnbo/inst/control/sets/load”, f"def")

THEN LOG:
pisound-btn[610]: script = ‘/usr/local/pisound/scripts/pisound-btn/system/down.sh’, args = ‘’
pisound-btn[610]: script = ‘/usr/local/pisound/scripts/pisound-btn/system/up.sh’, args = ‘’
pisound-btn[610]: script = ‘/usr/local/pisound/scripts/pisound-btn/load_graphset_rnbo.sh’, args = ‘’
pisound-btn[4445]: /usr/local/pisound/scripts/pisound-btn/load_graphset_rnbo.sh: 1: Syntax error: “(” unexpected

With every variation, I get the “Syntax error…” , any help/ideas?

If you’d run your script directly, it wouldn’t run either.

The .sh files are supposed to contain code in shell script language. You are using some other language, either your script should have an appropriate #! ‘shebang’, or invoke the appropriate interpeter yourself form the load_graphset_rnbo.sh script.

Excuse me, yes! I have tried the ‘shebang’ also in this configuration

#!/bin/sh
. /usr/local/pisound/scripts/common/common.sh
    target = OSC.Address(1234)
OSC.send(target, "/rnbo/inst/control/sets/load", f"def")

and

#!/bin/sh
. /usr/local/pisound/scripts/common/common.sh
    target = OSC.Address(1234)
except OSC.AddressError as err:
    print(err)
    sys.exit()
OSC.send(target, "/rnbo/inst/control/sets/load", f"def")

same result:
/usr/local/pisound/scripts/pisound-btn/load_graphset_rnbo.sh: 3: Syntax error: “(” unexpected

You are mixing shell scripting language and python in a shell script - you should put your Python code in a .py file, and start it from the .sh file using the python3 command.

The usual #! for Python scripts is #!/usr/bin/env python3