posted by Filippo Pappalardo on Wed 14th Apr 2004 07:36 UTC

"Linux audio, Page 2/4"

The professional audio server for linux - Jack

The "full-duplex" mode, that is the ability to record and to listen at the same time using a single audio card, was already possible using the old OSS indeed, thanks to some software called sound servers. A Sound Server is a software that tries to manage in user space the use and access to your audio devices. Let's see which are main sound servers and in what Jack differs from the others, and why Jack is called a professional sound server.

ARTS - KDE's sound server

Arts is Kde's sound server. Personally I am a big fan of this DE. If properly configured I find it very integrated and usable and it's able to adapt to my needs. One of the best modules in KDE has always been represented by the audio layer and ARTS, the sound server. Arts is very configurabile: from a simple GUI I can choose to enable the full-duplex mode, set a sampling frequency, enable ALSA or OSS support, or to leave all the way it is. THe fact is: arts was never meant to do professional audio: when it was written it was already a success to be able to listen to an mp3 with xmms while licq (who remembers that one?) was happily announcing "Incoming Mail!"

Esound - sound "the alternative" server

ESD, alias "Enlightened Sound Daemon", betrays from the name its origins: in fact it was written for the Enlightenment Window Manager. "E" was one of the most brilliant and sexiest software a desktop user could meet. I would say right now it is quite old, however still loved and used. Currently esd has been adopted by GNOME, another amazing Desktop Environment. Esd isn't quite as configurable as arts and it doesn't support full-duplex .

Audio Jack Connection Kit

Jack's first characteristic is to make use of the ALSA devices. To be precise jack's operation is closely related to every aspect of ALSA, that means we cannot install Jack on our machine without having installed and configured ALSA. Making use of the various devices in /dev/snd/*, jack leaves part of the audio I/O management job to the kernel.

JackdJack works in "realtime". The last year has seen the "Linux in Real Time" issue bouncing from a forum to another. There has been a revival of the interest for QNX, the birth of projects like RTLinux and a bunch of patches to test the new kernel 2,6 abilities with the stable 2.4 kernels. These "abilities" evoke exotic names like "preemptibillty", "lowlatency", "capabilities" and obviously "realtime". Apart from the physical pleasure when pronouncing these words, the direction taken by linux development privileges high performances to all the levels, server, desktop, workstation and obviously Audio. I am not the one to describe what this means at a technical level, but a kernel that works in realtime should guarantee all the I/O operations are carried out exactly in real time. If we think of the requirement to record and to listen music at the same time... we begin to see the light

Jack has been studied and written to fully take advantage of these new abilities offered by the kernel, providing a standardized layer for all audio applications that support Jack. Each of these applications, from XMMS to Alsaplayer, GStreamer to Mplayer, to name a few, "is seen" from our audio server, and put in relation one with another simultaneously. Every application can be thought of like a virtual device, having at least one IN and one OUT. In this way the audio stream can flow from one application to the other in homogenous and standardized ways.

As an example, let's say an output leaves from a video opened with mplayer, then a microphone attached to MIC IN can be added to the signal, or an instrument in LINE IN, a drum track played with hydrogen and whatever else. They can all be processed with one of the LADSPA digital effects, like a reverber or a delay etc, to end in the INPUT of an application able to record the audio flow, like the simple jack_rec, or more complex applications like Ardour indeed.

QjackctlThough appreciating the comfort of shell & command line, since from the first recordings and experiments with jack I tried to find a good GUI in order to manage complex connections. I am more than sure that "ONLY CLI is beautiful" is becoming more and more an enemy attitude towards linux, that has the only effect of scaring the customers. Qjackctl is a nice application that uses QT to make the task of configuring, launching and "killing" (stopping) Jack a pleasant experience.

Once launched and configured qjackctl, it will be enough to push buttons start and stop to manage the server. Attention, you cannot use more than one audio server at a time, that's because Jack isn't supposed to be multiuser friendly, so before launching jack make sure nothing is using the sound card. Qjackctl's main window contains some other useful buttons, each one opening a different window showing various info like messages, or statistics and info about the audio server. Qjackctl acts as a monitor for Jack's "Transport", a feature making jack behave like a master for all audio applications.

qjackctl connections windowParticularly useful as an example is the Connections window, used to monitor but also to modify the state of the connections and therefore acting as a so-called "patchbay", that is as a control center from which being able to manage which INPUTS to include or to exclude from the audio flow. Obviously with "INPUT" I mean both the physically existing or whatever application providing manageable INPUTS/OUTPUTS.

Audio Linux Developers Simple Plugin Architecture - LADSPA

I mentioned the inclusion of digital effects in the audio flow in the example before. Anyone who has had any exerience with phonics, recording studios, live concerts etc etc knows what I'm writing about. I will describe "my personal" situation and requirements, they obviously cannot coincide with yours, but I believe it supplies an example of real life use of linux, in order to do things more concrete than an always regenerating apt-get dist-upgrade : -)

Before introducing the most ambitious software I've ever seen for linux, I would want to shortly describe the world of digital effects according to linux. If someone has any experiences in home recording, they can think of LADSPA as to the equivalent for linux of the VST Plugins.

There are a lot of types of plugins, you can can choose among classic effects type: chorus, delay, reverber, echo etc; but I found something for basically all the tastes: flanger, pitch shifter, phaser, compressor...; there are also equalizers and filters of many types, and less known others. In my experimenting I can't do without a set of plugins by Tim Goetse that reproduce the sound of a guitar tube amplifier :-). You find them here.

Nearly all LADSPA plugins can also work in realtime. This means that I can apply the effect echo "live", while strumming my guitar attached to LINE IN of my sound card, or "postprocessing", that is modifying, a "track" taken before and lacking a little echo, for example.

What if I want to record at the same time a drum track played with hydrogen, a rhythm guitar and a voice? More: if I also want to add a bass line but the bass player isn't there? More: if I want a three-dimensional effect applied on the voice track and, say, a little distortion on the guitar track? Still more: if I want that each of the "tracks" comes recorded in different files so to allow me to do small changes on the single "tracks"?

Table of contents
  1. "Linux audio, Page 1/4"
  2. "Linux audio, Page 2/4"
  3. "Linux audio, Page 3/4"
  4. "Linux audio, Page 4/4"
e p (0)    81 Comment(s)

Technology White Papers

See More