Jackd/ALSA (Linux) best practices for SP?

Keen on getting SP midi working with Sunvox soft synth


but they seem to fight over ALSA on Linux. Sunvox seems to handle the whole Pulseaudio / JackD / ALSA mess relatively seamlessly, but SP less so and I typically have to run the following to get it to work -

jackd -R -d alsa -d hw:0

however this seems to reserve the sound system exclusively for SP and Sunvox will no longer start :frowning_face:

Anyone know of JackD/ALSA best practice that might allow the two to coexist ?

Hi Juzbo,

yeah, that’s quite an issue working with a more complex sound environement on Linux…

To your question: I have no experiences with Sunvox but a bit with several other softsynths (namely fluidsynth, helm and zynAddSubFX); they all work quite well with Sonci Pi. Surely they have to be set up to work with Jack (unless you don’t even have this option).

Basically once you start Jack Pulse won’t be available because Alsa/Jack have occupied you soundcard (that is why, if you want to listen to some mp3 files during such a session e. g. you will have to use a Jack-capable music player like audacious).

There is IMHO no reason why you should not be able to start Jack and work with Sonic Pi and Sunvox at the same time (as long as the later does not rely on Pulse audio). One further hint: start qjackctl and check the patchbay; maybe Sunvox is not connected to your system output…

I build myself some (very, very basic but working) start and stop scripts to use every time I am working with Sonic Pi:

jgo is my starting script as long I work with the internal sound card

pulseaudio --kill &
jackd -d alsa --device hw:0 --rate 44100 --period 1024 & # internal soundcard

jstop does stop Jack and everything which is associated with Sonic Pi:

killall -9 jackd jackdbus qjackctl sonicpi sonic-pi m2o o2m beam.smp

(As I said, this is very basic and could be done much more elegantly, but it works so far.)

As I have also recently acquired a Focusrite audio device I have also another soundcard available, so everytime I have this plugged in I start jgo-scarlett:

#! /bin/bash
pulseaudio --kill &
jackd -d alsa --device hw:USB --rate 44100 --period 256 & # Scarlett 2i2

As USB-devices tend to change their soundcard identification it is best to first find out the (steady) name of the device (as oposed to e. g. :hw0) with

cat /proc/asound/cards

and use the name in the square brackets within you jack call (in the case of the Focusrite device it is USB); this makes sure that you will always detect the same device.

Working with Jack, Sonic Pi and (maybe several) different synths on Linux the non session manager (maybe in conjunction with tools like Carla) seems to do quite a good job. The aim is to have only one application to start and have a full setup with Sonic Pi, softsynths, attached midi devices and - of course - all wired so that you can just start playing.

But I am still working on a stable setup. If there is interest here, I can document my setup once I am satisfied.

Hope this helps a bit…

Super thx! Will test and report back

Hi, in Linux i use QjackCtl to control this stuff.
Before start SP I launch this application and manually i add the two live input connections

1 Like