Today I installed Sonic Pi 3.3.1 on my Raspberry Pi. I’ve been using QJackCtl to start my jackd to run audio to a USB card, which worked well with SPi 3.2.
But now I get no sound. I’ve tried commenting out the code to look for/start jackd in…
…and start my own with QJackCtl before running SPi but still no sound. If however I switch to use the USB card in the Rpi top-right widget, then I do get sound. Problem is though that I’ve tuned my jackd settings for latency so that the sound from SPi is in sync with the sound from external midi devices.
Having embraced QJackCtl I’m keen to keep using it, as it gives the right level of control. So I don’t really want to go back to the default.
Can you help? Thanks!
It’s OK, I hacked the above file in the ‘Start on Raspberry Pi’ section with code from 3.2. Back in business. No idea what I’m doing, but I’m not above pasting in code that looks likely.
The changes have been made to make SP work seamlessly with pulse-audio which is the default sound system in the new OS. We hope to add config settings to allow users to alter the configuration easily, as has been done for the scsynth startup parameters.
In the meantime I am finalising a script which will enable you to do so without having to alter Sonic Pi at all. Will publish tomorrow.
Thanks Robin, I guessed that was the case and I see that making it work with pulse-audio was the right thing to do for most people.
I found that, using the default script and once SPi has started, I can hook up the SuperCollier outputs to the system using QJackCtl, which then shows the same out_1/2 and system_caputure_1/2 nodes. Which is also a viable alternative.
But I’d welcome a script, thank you!
Here is a video showing how to use the script with a link to the script in the notes.
The script repository is at GitHub - rbnpi/sonicpi-rpi-audioselect
Thank you so much @robin.newman that’s a great video - with all the bases covered. I’ll try the script, I’m also rather liking using QJackCtl ‘raw’ so to speak.
On that point, last week or so I’ve been looking again at PatchBox OS. I’ve bought a pisound, and although I’m wasn’t planning to use it for Sonic Pi particularly, I did want to try it so armed with this new jack power I’ve got SPi 3.3.1 running happily on that.
The latency reported is 5.3mS - if that number is true then that’s very satisfactory.
Hope the script worked for you. I’ve experimented further and find it is a good iead to unload the pulseaudio ports from QjackCtl before quitting it. This can be done by adding the commands below to the Execute script on Shutdown slot on the Options tab of the Setup window.
pactl list short modules |grep "client_name=PulseAudio_to_JACK"| cut -f1 | xargs -L1 pactl unload-module;pactl list short modules |grep "client_name=JACK_to_PulseAudio" | cut -f1 | xargs -L1 pactl unload-module
This basically uses pactl list short mdules to display hemounted modules and you grep for the ones you want, extract theiir iindex number and use that to unoad the module.
Thanks Robin. Is this the same as disconnecting them from within QJackCtl’s ‘Connecttions’ form?
No, because using disconnect on the connect window still leave the ports there as you can see. This will actually remove the ports entirely.