the master jacker
Before we can start making music, first we need to get the tricky configuration bit out of the way: that thing called JACK.
the JACK Audio Connection Kit is a sound server intended for low-latency recording, allowing extraordinary levels of interconnectivity between audio and MIDI, and some truly elaborate sound rigs. Although most of the applications here can run without JACK, it’s really the foundation behind most advanced Linux audio. Unfortunately, it usually takes a bit of tweaking to get started with it.
The most popular tool to configure JACK is Qjackctl. You’ll find this in all the main repos (Ubuntu, Fedora et al), so apt install qjackctl and it’ll also pull in JACK as a dependency. Once installed, open Qjackctl and press Start. If you’re lucky JACK will start the first time, but even then, you’ll probably need to make a few tweaks.
If JACK (see feature LXF191) won’t start, the first thing to try is to ensure that ‘Driver:’ is set to ‘alsa’, and that ‘Interface:’ is set to your actual sound card, rather than just being left on ‘(default)’. If you want to use MIDI, the MIDI driver will probably be set to ‘none’, so you’ll need to choose ‘seq’ from the menu. Next, try adding your user to the audio group, and if you’re still getting no joy, you may have to disable ‘Realtime’.
JACK might also fail to start if you’re already using something that needs audio and won’t relinquish your sound card’s permissions – you may need to log out if so. It’s best to start with a clean session, and don’t run anything extraneous, especially not web browsers.
Note that when you finally have JACK running, your sound card will be taken over entirely, so anything outside of JACK’S ecosystem won’t work. However, we’re not done yet: there is still latency to contend with.
Latency is a problem that plagues all sound engineers, regardless of software or equipment they use. If there is a substantial delay between a new track and the track(s) it is recording over, you have latency issues. Don’t just turn the latency down, though – the lower the latency, the greater the load on the system, and the more likely there will be weird clicks and pops.
You need to find a sweet spot: start with the defaults, and gradually adjust the latency until you can
remove any delay without overburdening the system. Once JACK is running you can start anything that’s Jack-reliant.
Making connections
Making the correct connections in JACK is probably the hardest part of the process. Start by clicking the Connect button in Qjackctl.
The Connections window is divided into two halves: Readable Clients/output Ports on the left, and Writable Clients/input Ports on the right. It is also broken into three tabs: Audio, for sound using JACK; MIDI; and ALSA, for Linux’s underlying sound system. Much like the cables involved with real musical equipment, programs or modules can be assigned as outputs and connected to the inputs of other programs by means of virtual leads.
To make a connection, click the output client on the left, then the client on the right you want to connect to. For any connection JACK deems possible the Connect button will become available, and when clicked, a line will be drawn from left to right, indicating a virtual lead has been connected.
In the image (see above), we are using multiple JACK clients/modules to create a new sound. In the MIDI tab, ‘jack-keyboard’ is attached to the MIDI module ‘amsynth’. Back in the Audio tab in our image, ‘amsynth’ is attached to effects program JACK Rack, which is applying kooky modifications to otherwise boring synth sounds. Finally, JACK Rack is connectedto ‘system’, which is the final audio output.
If Qjackctl’s Connections window doesn’t float your boat, Patchage (see left) has a completely different interface. Each client is a box you can drag around in space, and clicking between compatible ports will make a connection. It’s certainly more elaborate, but feels more like the strewn cables one finds on the floor of a studio practice session!