Linux: Easy user experience by routing JACK through PulseAudio #3165
Replies: 8 comments
-
I've been having a p[lay with your script on the latest raspberry pi OS which now uses pulseaudio. When I run it, it sets things up apart from connecting the SuperCollider:out_1 and SuperCollider:out_2 ports to JACK to PulseAudio :front-left and :front-right ports. There is an error in the script window saying |
Beta Was this translation helpful? Give feedback.
-
Did you try increasing the I used my script on a PC but since a Pi would likely be slower i suspect that it probably takes longer until supercollider is up so the script would try wiring up things a little too early. Generally speaking you can adjust the The script could use some additional logic to wait until supercollider is launched but i figured that just waiting was simple enough :D If the JACK-over-PulseAudio concept was to be implemented as an option within sonic-pi itself, these things could of course be properly timed in a stable way. |
Beta Was this translation helpful? Give feedback.
-
I'd tried 10 seconds but looks like I needed to go even higher on the Pi (currently Ive set it to 20). Thanks. |
Beta Was this translation helpful? Give feedback.
-
I have added a sleeping loop to the script The zero-conf bluetooth devices perk only applies if you configured them to work with PulseAudio of course, which has already been the case for me so that was nice. I'd be curious if applying this method on a Raspberry Pi or any other device with a little less computing power causes issues, especially since PulseAudio does resample loopback devices. |
Beta Was this translation helpful? Give feedback.
-
I have incorporated your script into Sonic Pi with a modified scsynthexternal.rb file. Details are at I am not explicitly unloading the modules on exit, but it seems to work anyway. On a Pi 400 and on a Pi4 performace seems OK, but I think that keen users would still launch QjackCtl and set up jack directly for better performance. However for average/beginners use it looks OK. I would be interested in your comments if you have a Pi to try it on. It can even working with my bluetooth speaker which is a plus, also fine with HDMI or external usb card. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much!!! I have been searching for solution of this problem the whole day, and now it works! I'm using Sonic Pi 3.2.2 on Raspberry Pi 4 |
Beta Was this translation helpful? Give feedback.
-
@SebiderSushi I have run your script and no sounds are playing even though the application has been able to start |
Beta Was this translation helpful? Give feedback.
-
It still works on my end (Manjaro Linux, PulseAudio 14.0, jack 0.125.0 & sonic-pi 3.2.2) Tell me whatever did not look as expected. Edit: I added this guide to the README |
Beta Was this translation helpful? Give feedback.
-
Hello. I've always had trouble making my first steps with Sonic Pi because i constantly ran into issues of JACK clashing with PulseAudio.
Today i wrote a script that launches sonic pi and routes its audio through PulseAudio using the
pulseaudio-module-jack
:https://github.com/SebiderSushi/sonic-pi-via-pulseaudio/blob/main/sonic-pi-via-pulseaudio
I find that this helps deliver an easy and quick user experience, and most importantly to me it also allows using sonic-pi via bluetooth headphones without additional configuration.
For me this seems like a useful setup that allows trying out sonic-pi and making first steps with it on many linux distributions without knowledge about sound servers.
I can see how this setup is far from optimal, that it can produce audio issues and how users who know what they're doing will prefer running JACK directly for minimum latencies.
All in all this concept is just an idea, feel free do with it whatever seems useful to you.
Beta Was this translation helpful? Give feedback.
All reactions