Most synthesizers, sequencers and similar audio software on Linux use jackd, a realtime audio soundserver. “Why yet another soundserver?”, you may ask. “Aren’t there enough for Linux?”. Sure, there are. But none of them fulfils the needs of the digital musician.
If you want, for example, to use your linux box as a guitar amplifier and an effects-rack which you want to record in an digital audio workstation and then playback the result via the output jacks of your audio card, jackd is for you. It does not only allow to connect the hardware and the software in an arbitrary manner, it also allows to reduce the latency of your computer. If you pluck a string of your guitar, you don’t want to wait 500ms until the processed sound comes out of your soundcard. Instead, you want to hear the result “immediately“. A latency of 0ms of course cannot be achieved. But jackd helps to get as close as possible.
To accomplish this, jackd can make use of some so-called realtime capabilities of the linux kernel. Some years back, there have been several kernel patches and several configurations to set your system up accordingly. Back in those days, we have been more busy patching kernels and configuring the system than actually using it. Each time a new kernel was out, we repatched, rebuild, reinstalled and reconfigured (if necessary). I remember I had a good configuration with a 2.6.10 kernel one day :) .
Times have changed. The default Ubuntu kernel is not the best for getting low latencies, but for the average musician it should be sufficient. So here’s what I did to get jackd up and running:
- Install the desired audio software you like to use, like qjackctl, jackd, ardour, jamin, qtractor etc.
- If the current user does not belong to the audio group, add it to this group.
- As root, edit
/etc/security/limits.conf. Ensure the lines at the end of this posting are found in the file. - If you want to be on the save side, log out and in again the changes to take effect.
- Start qjackctl and configure it. In the optimum case, the default settings should be sufficient to get you started. Once you are addicted to even better realtime results, you will tweak them anyway – promised ;-) . Press its start button. If everything went well, it should start without any complaints. If not, use the web to get some help.
The red digits in the screenshot are so called x-runs, which usually result in audible clicks in the audio output. As they are very annoying, jackd should be set up in a manner so that x-runs never occur. Obviously I still need to tweak my setup.
I also use a Midisport 8×8 MIDI patchbay. It requires a firmware to be loaded into the device each time it connects to the computer via USB. No manual configuration is required. Just install the package midisport-firmware and reboot the device. That’s it.
BTW: The Midisport 8×8 can be used offline, without a computer. It remembers the connections of the ins and outs which can be set up by a Windows tool of the manufacturer. Ages back, I wrote a shell script which can be used to configure the connections of the Midisport. I’m pretty sure it still must be available somewhere, so if you can need it, don’t hesitate to drop me a line.
/etc/security/limits.conf
@audio - rtprio 99
@audio - memlock 250000
@audio - nice -10
