While it does provide extreme flexibility for an audio system, Jack itself is a platform, and not a program one “uses.” This means that without a front-end graphical interface, it is nearly completely useless.
The QT Jack Control program (Which I’ll just call “Jack Control” from now on) is one of several programs designed to manipulate Jack to get the best results. This program is also one of the few programs that allows you do choose the settings that Jack needs with a GUI; otherwise, you’d have to start the server using a command line like “jackd -P89 -dalsa -dhw:6 -r48000 -p128 -n3 -Xseq”. Not very simple, huh?
When you start the program, you are presented with the following window:
The buttons on the left show the controls for running and managing the Jack server program, the buttons on the right are specific to the program itself, and the ones along the bottom are transport controls. The status window shows the status of Jack, as well as the project settings.
The first thing we want to do is set up the jack settings. To do this, we need to bring up the “setup” window, so go ahead and click that button (the one on the right-center). You should see a window like this:
Audio Interface Setup
The column of options on the right are for deciding and setting up the audio interface Jack will use. By itself, Jack can only connect to one sound interface. If all you have is a sound card, then that will be what Jack uses by default. However, as I mentioned in my hardware list, the bulk of my recording is using a USB audio interface, so I want to use that device.
You also should be seeing the other devices used on my system on that list; the C-Media is the Riviera, and the HDA is the built-in device. Loopback is an extremely useful device for making a bridge to non-Jack programs, but for now, it’s not important. The USB headset is for those times when I want to talk without a high-fidelity recording environment running on the system… after all, if all you’re doing is ordering a pizza with skype, just how much audio cleanup do you need?
Sometimes, people use USB microphones, which do not include speakers of any kind. In this case, instead of the main “Interface” item (which you can leave at “(default)”), you can choose different entries for “Input Device” and “Output Device,” so that the microphone’s selected for input, and whatever sound card you choose can be used as output.
Audio should always be set to “duplex,” as this allows you to hear audio even as you speak. This is especially important with software monitoring, since the alternative means you can only hear, or only record, which is definitely not optimal.
Audio Conversion Options
The options in the center column determines the quality of the audio conversion. Priority is associated with the realtime options mentioned in the preparations article; while you can take it all the way to 90, I like to at least keep it at 89; that way, something utterly important to system stability will take precedence.
The second, third, and fourth options are extremely important; these are the items you edit to determine the quality and latency of your audio. By default, the Frames/Period and Periods/Buffer are pretty high, but I’ve found that lowering them can allow a similarly-clean sound at a much lower latency.
At the bottom-right of the window, you can see the “Latency” box. The number changes based on how your audio settings are set; higher frequency and lower frames/period and periods/buffer settings lower this value, but be careful that you don’t take it too far that the system suffers from xuns; the processor still needs to keep up with the audio, and sometimes a little leeway can ensure that the audio is clean. generally you want to keep this number under 10ms if you intend to perform software monitoring; anything higher can start to delay enough to be noticeable.
On the bottom-left, you will also see a MIDI driver entry. This allows you to route MIDI data with Jack the same way you route audio data; the options available are none (Jack doesn’t route MIDI data), raw (Jack routes raw midi data, without any processing by ALSA), and seq (Jack gets the midi data from the ALSA driver with time processing and application management). There doesn’t seem to be too much difference, but I prefer to use seq.
The left column shows several options that can be applied, depending on how you have your system set up. The first four options are related to performance timing and xrun handling.
The first one, realtime, is self-explanatory; without appropriate preparations, this can prevent Jack from starting at all, since permissions from the setup are required for Jack to use realtime.
Normally, in any computer with virtual memory, some of the memory will be placed in virtual memory when the system needs the memory for something else. This is useful when the programs using the memory are willing to wait. However, when the program is timing-sensitive, the last thing we need is for memory to be paged to disk. So, by default, Jack will attempt to “lock” memory in order to keep it in the fast RAM, rather than being written to virtual memory.
However, sometimes, this is just not possible, usually because of permission issues (particularly if the preparations have not been completed). In this case, the next two options are available. No Memory Lock tells Jack not to lock memory at all, while Unlock Memory will unlock memory used by graphical toolkits, leaving more lockable memory available for Jack to perform its work.
Soft Mode is a setting that will simply ignore xruns. This can be used when Jack is being used just to output sounds, and where runs in audio aren’t important. Obviously, when doing any kind of recording, we do not want this to be used, since we won’t be alerted when xruns cause issues with the recording.
Monitor provides special ports for monitoring audio; usually, this is not important, as the input ports can be directly sent to the output ports for monitoring. More importantly, there are ways to add additional devices to Jack once it has been started.
By default, Jack will attempt to use your audio interface’s default bit depth. Failing that, it will attempt to use 32-bit floating point (decimal) values. Some peoples’ equipment can’t handle this, and can cause issues with the audio. To fix that, the force 16-bit option is available to reduce the 16-bit bit depth.
Some hardware have hardware monitoring and metering features that can be set from software. H/W Monitor and H/W Meter options do just that.
Some of the settings in hardware interfaces have their own period buffer settings. If your equipment does this, and you want to set your own, you will need to check Ignore H/W.
Finally, sometimes you really have problems. Jack has the ability to give more detailed log messages when things happen. All you need to do is enable Verbose messages, but unless you know how to make sense of the logs, there’s really no point in checking this options.
At the bottom-center is another option, Start Delay. When Jack is started by the QT Jack Control program, the display waits for a few seconds before beginning to review Jack’s status; this gives the server time to get ready before reporting its status.
For the “Options” tab, there really isn’t anything you need to change, so we will move onto the “Display” tab.
The display options are specific to the QT Jack Control window, as well as its tool windows. Most of this is cosmetic, but at the bottom are two checkboxes that are useful, especially when working with MIDI; you want to make sure that “Enable client/port aliases” and “Enable client/port aliases editing (rename)” are both active; they will give you the ability to rename the inputs and outputs of programs to whatever you want them to be; this is especially useful when dealing with stereo and surround sound data.
The final tab has additional options for how the QT Jack Control program behaves.
These options are all useful, depending on what version of Jack you are using, when or how often you intend to use Jack, and what kind of desktop you are using. Most of these options are pretty self-explanatory, so we won’t go into too much depth on the obvious ones.
The first item, Start JACK audio server on application startup, is exactly what it says; it starts Jack the moment you start the control application. If you use another sound server, like PulseAudio, for system sounds, then Jack may cause them to build up until you close Jack, which means you won’t hear anything at all until Jack closes; as such, you probably don’t want Jack running unless you actually intend to work with audio.
Delay window positioning at startup is a bit of a head-scratcher; I’m not really certain what this one is about. If anyone else knows, I’d certainly be grateful for an explanation.
Single application instance, however, is much easier to figure out; this means that you can’t run the Jack Control application more than once. Any attempt to run it will simply bring up the window of the already-running copy.
Configure as temporary server is a way of allowing Jack to close itself once you’re done with it. Simply put, when all jack-aware applications are closed, Jack itself will close without any effort on your part. I’m not fond of this, as I’m a control freak, but it’s nice for those who don’t want it running constantly.
Enable ALSA Sequencer support depends on your MIDI settings above; if you do not use Jack MIDI support, but you do use MIDI, then this is definitely something you want to enable. This adds an ALSA tab in the connections window that will allow you to arrange your midi devices and programs as desired. If you do use Jack MIDI, this does not need to be enabled.
The original Jack uses a server-based program called jackd. However, the newest version of Jack, called Jack2, has the ability to be accessed as part of the underlying system. The system that allows it to be accessed is referred to as DBUS, and the main advantage is that any Jack-capable programs attempting to connect will prompt the DBUS system to start Jack automatically. If you are using Jack2 with DBUS support, this will need to be enabled, and all text fields with “jackd” in the other tabs will need to be replaced with “jackdbus”. If these three steps are not performed, the QT Jack Control will not be able to start or stop Jack, just connect to it once it’s started by something else.
Once you have all the settings in place, you can then proceed to learn how to use Jack. One more thing, however: At this point, Jack is still turned off. You need to press the Start button to actually begin using Jack.
Whew! Well, that’s everything important you need to know to set up the Jack Control application. There was a lot of stuff here, but you can safely skip most of it, referring to it as you need to. Heaven knows, I had learned a few things while writing this, and as I type this, I’m excited to be able to use the control application with Jack2. I will go into its actual use in another article, but until then, have fun, and make something good!