Modifying single_click.sh scripts

Hey, use 48000 for sampling rate, 44.1kHz is not supported natively by Pisound.

I think you should launch sclang in the background the same way as puredata is launched here:

https://github.com/BlokasLabs/pisound/blob/master/pisound-btn/single_click.sh#L91

The nohup should keep the launched application running even if pisound-btn terminates and & at the end makes the command run in the background, so the control is returned to the button.

After triggering the script with the button you may try checking whether the sclang process is running using ps -ef | grep sclang

Also it does get launched as root user, on Raspbian Stretch, these new lines had to be added to single_click.sh in order for the Pure Data GUI to appear for the user: [SOLVED] Not working anymore: single click to launch Pd patch from USB

You may try adding those lines to your single click script.