Hey, your script could just terminate the old recording process and start a new one, to the new file. That can be done by either keeping the PID of the recording process in a temporary file in /tmp, or simply doing killall jack_capture, but it could interfere if you’re or something is running jack_capture manually while the button is being triggered.
Feel free to show what you have so far in your script, so we can provide accurate suggestions.
Basically does what I want, but wonder if its as easy to specify the pisound button config in the py script above, or will this likely conflict with the pisound button functionality built into patchbox os?
Then the other important thing in the linked project are the ‘start’ and ‘stop’ messages. It’s possible to send them using a shell command too:
sudo apt install liblo-utils # First get the 'oscsend' utility installed
oscsend localhost 7777 /jack_capture/tm/start
oscsend localhost 7777 /jack_capture/tm/stop
So having these pieces, what’s remaining is to get jack_capture started in the background, possibly, and then writing 2 simple scripts to start and stop recording using oscsend and map the scripts to Pisound’s button.
Thanks @Giedrius will give that all a try, was having permissions issues when starting jack _capture with anything other than root before but will try the above. Assume 7777 after Jack _capture will resolve this though…
I’m really interested to see what can be done with this.
I’m currently planning out a tiny pedalboard with a Pi4 equipped with a Pisound and a second Pi with 7" touchscreen to run Reaper or another DAW to give me a portable recording platform with effects.
It’ll be awesome if I can also capture audio reliably on the Pisound, then I can perhaps adjust the setup to allow transferring those sound files to DAW.
I could also perhaps change my audio signal chain too.