JackLab/JACK first steps
From openSUSE
This tutorial will explain the fundamentals of Jack - the audio server and to tune the settings to get optimal performance for your audio.
JACK or Jack Audio Connection Kit in full, is the low-latency sound server that runs under linux. It allows any compatible software to be connected together using virtual 'patch cords' in an incredibly flexible way. For example, you can connect your guitars and vocal microphones to your multiple-input soundcard. Your keyboard can be connected to a USB port for MIDI recording. The audio can be recorded in one DAW application while the MIDI is recorded in a separate MIDI sequencer. The output from all applications can be simultaneously recorded to a stereo WAV file in a third application. All applications are perfectly synchronised together. This is just a simple example of the power of JACK.
JackControl (QJackCTL)
QJackCTL is the graphical user interface for the JACK server. It allows you to alter any soundcard settings and make patches using a virtual patchbay.
The JACK server needs to be 'tuned' to your soundcard to get the best possible performance without any Xruns. What are Xruns?
Xruns
Simply speaking, Xruns are either sound buffer overruns or sound buffer underruns.
- A buffer overrun happens during recording, when your sound card tries to write data to buffer, but your software has not yet emptied it.
- A buffer underrun happens during playback, when your sound card tries to read data from the buffer, but your software has not yet filled it.
It is okay to get a couple of Xruns when you start or close an application. However, any Xruns during recording and you will probably get a very horrible click sound in your audio file. Therefore, it is very important to reduce the possibility of Xruns to an absolute minimum level.
Here is a screenshot of the QJackCTL panel. The numbers in red show the xrun count. This needs to be as low as possible. To manage this, we need to tweak the JACK settings in QJackCTL. Click on the 'Setup' button as shown below:
Tailoring the settings for best performance is really and trial and error process as there so many variables involved. Your system speed, soundcard and driver and kernel configuration all effect the performance of the JACK server. The settings you need to concentrate on are: Sample Rate, Frames/Period and Periods/Buffer.
We suggest you start with the Sample Rate of 44100Hz for greater compatibility with other digital equipment and especially if you are going to master to CD. Some sound cards don't work very well at 44.1KHz, especially Soundblaster cards. In this case use 48KHz.
As you can see from the screenshot above, with the sample rate at 44100Hz, 64 Frames/Period and 2 Periods/Buffer, we get a latency of 2.9 milliseconds. This is perfectly adequate for realtime effects and software synthesizers. It is perfectly normal operating practice to change the settings of JACK as you progress through a project. For example, for initial track laying and recording of softsynths you will need a very low latency - this is okay as long as minimal live effects and processing are needed. Further into the project when you start mixing, you will need to increase the latency to cope with more processing and effects without encountering any Xruns - this should be okay as live recording isn't needed.
After you have made your settings, click 'save' to exit the configuration. Then press the 'start' button as is shown below:
If everything is okay, then the JACK server will start. If there are problems you will see error messages shown in a pop-up dialogue box.
QJackCTL is the heart of a linux-based professional audio system, the more you get to know it and what it can and can't do - the more productive your linux music session will be.



