Visiting The New World Of Linux Sound & Music Software

One of the most frequently asked questions that I receive is "What's the easiest way to get into the world of Linux sound software ?". In the latter half of the 90s there was no simple answer to that query. Typically you had to install your distribution of choice then customize it for audio work yourself. This usually meant such activities as patching the kernel sources for improved performance, replacing the older OSS/Free kernel sound modules with the ALSA system, recompiling and reinstalling the kernel, optimizing disk performance, installing all the needed applications and various pieces of support software, and so forth. While not terribly difficult the process was time-consuming, prone to annoying errors and incompatibilities, and thus rather intimidating even to a relatively experienced user.

In true Linux fashion a number of projects have appeared whose primary aim is the alleviation of the aches and pains resulting from installing and configuring an advanced Linux sound system and applications base. These projects provide the software resources for audio capabilities suitable for simple desktop listening pleasure or for professional-quality multitrack multichannel audio and MIDI production. Appropriate hardware required, of course, but the ALSA system currently supports a broad range of soundcards and digital audio boards, from the popular SoundBlaster Live and Audigy cards to high-end boards such as the RME Hammerfall and M-Audio's Delta series.

Planet CCRMA and AGNULA are two examples of such projects. Each provides a complete Linux distribution with a kernel optimized for audio performance and a software base of selected sound applications. There are differences between the two projects, but I will say at the start that either or both will do just fine if you're interested in getting into the new world of Linux sound software.

Planet CCRMA

Fernando Lopez-Lezcano is a composer working at Stanford University's Center for Computer Research in Music and Acoustics (CCRMA, pronounced "karma"). He is also the Center's system administrator and is responsible for the configuration and maintenance of its network. Most of the Center's workstations run Linux, and over the last few years Fernando has created a software package to mirror the Center's software. The package was made freely available via the local network, enabling students to run exactly the same system at home as at the Center. This package eventually became what is now called Planet CCRMA At Home (Planet CCRMA for short, or just "the Planet"), and it is now freely available for the general public.

In its most complete form Planet CCRMA is a collection of packages to be installed over a full Linux distribution (RedHat or Fedora Core 1, reflecting the systems in use at CCRMA). You can download ISO images for burning to compact disc locally, or you can perform the installation over the network. Base system Red Hat distributions are available from the Planet's Web site, but if you're already running a target system (RH 7.3, 8.0, 9.0, FC1) you can download the kernel and applications packages separately and install the system over your current distro. Fernando has modified various components of the base system, which I'll describe presently, but certainly one of the most helpful additions is the incorporation of the apt system for easily retrieving and installing RPM packages over the network. I'll have more to say about using apt, but first I'll describe my experience installing the system.

I opted for a complete system installation using Planet CCRMA's Red Hat 9.0, so I downloaded the disc images, burned them to CD (using Joerg Schilling's great cdrecord via the GCombust GUI), and installed the system using my new discs. Red Hat is justly famed for its ease of installation (thanks largely to the excellent Anaconda installer), and indeed I had no troubles with the basic installation and setup. My peripherals were correctly recognized and configured, and everything "just worked". Well, almost "just"...

Planet CCRMA's current kernel versions are drawn from the 2.4.x stable series. By default these kernels include the older OSS/Free API as their sound subsystem. However, the Planet CCRMA system requires ALSA, so complete instructions are provided for the removal of OSS/Free and its replacement with the Planet's ALSA packages. Fortunately this step will be eliminated as the 2.6.x kernels are brought into the system. Disk optimization is another task that is still left to the user, but again complete instructions are available on the Planet's Web site.

Kernel-level changes include support for the following improvements : Andrew Morton's low-latency patches (reducing latency from ~300 msecs to possibly less than 10 msec, depending on your hardware) Robert Love's preemptible kernel patch (makes kernel processes interruptible, improving latency and general responsiveness of the system) Tommi Ilmonen's capabilities patch (allows normal users to safely run applications with realtime priority) the kernel's realtime clock driver (rtc.o) patched for higher resolution (especially important for Linux MIDI applications) enabled kernel DMA and PCI bus options The user can also choose between single CPU and multiprocessor kernels. Most of these changes are transparent to the user, i.e., no special routines are needed to activate them. However, the low-latency patch must be manually activated by this simple command from the root user : echo 1 > /proc/sys/kernel/lowlatency If you're not sure the low-latency patches are enabled just run 'cat /proc/sys/kernel/lowlatency'. If it returns 1 you're all set, but if it returns 0 you'll need to run the command given above. Okay, that's the whirlwind tour of Planet CCRMA's lowest level. The next stage includes the middle tier of software that provides so much of the power of the new Linux sound system. This level includes the JACK audio server and transport control, the LADSPA plugins, and various libraries such as libsndfile, libsamplerate, libfftw, and other important audio software components. Again the software on this level is transparent to the end user. Planet CCRMA installs it, you run the programs that need it, and everything is happy. Yes, it actually works that way. The highest level is of course the most interesting to the end user. Here we meet the applications base, an impressive collection that includes the following categories and programs : hard-disk recording (Ardour, ecasound) sound editing (Snd, Audacity, ReZound) MIDI recording & editing (MusE, Rosegarden-4) module tracking & editing (SoundTracker, CheeseTracker) software sound synthesis (Csound, Common Lisp Music, Pd) algorithmic composition software (Common Music) softsynths (ALSA Modular Synth, ZynAddSubFX, Fluidsynth) notation software (LilyPond, NoteEdit) multimedia players/editors (XMMS, ALSAplayer, Cinelerra) Many other applications are available, see the Planet CCRMA site for a full list. By the way, JACK is extensively supported by the most current versions of JACK itself as well as the outstanding collection of JACK-centric applications that has evolved around it (Ardour, JAMin, Freqtweak, qjackctl, many others). The Red Hat versions over which Planet CCRMA is installed are complete Linux distributions, so all your favorite desktop applications are there, including the GIMP, emacs and vi, Mozilla, KDE, GNOME, and everything else you'd expect from a typical Red Hat installation. As I've mentioned, if you're already running a supported release version of Red Hat you do not need to install a version from the Planet. Depending on your installation choices the Planet will boot into either the GNOME or KDE desktop environment, with all its applications already listed in the environment's menus. Of course the Planet also works fine with any popular Linux desktop or window manager (with appropriate configuration). For example, Figure 1 shows off my system running under the BlackBox window manager. Nothing special appears to indicate the presence of the system, but it's all there, ready and waiting. Note: Both KDE and GNOME come equipped with their own sound servers, artsd and esd respectively. If you use the Planet under either of those environments you should be sure to disable the appropriate server to avoid conflicts with the Planet CCRMA system. Finally, a further word about the apt system. Debian users are familiar with the very handy apt-get command, and Fernando has added apt support to Planet CCRMA's Red Hat. To be brief, I've come to love apt-get. My first taste of its power came after I had installed the base Red Hat system and wanted to move on to install the applications. Following the excellent instructions on the Web site I ran this simple command (as root of course) to install everything residing on Planet CCRMA : apt-get install planetccrma-audiovideoapps All I had to do then was sit back and watch everything get automatically installed and configured. From that point I need only run this pair of commands to bring my system up to date with the latest and greatest packages from Planet CCRMA : apt-get update apt-get dist-upgrade Obviously a broadband connection is a requirement. It is possible to use a modem with apt-get but it is not recommended. Fernando consistently maintains Planet CCRMA, keeping it up to date with the most current versions of its software at all levels of the system. Extensive documentation is provided on the Planet CCRMA Web site, and an active mail-list is available for users to share further notes and suggestions. If you want to get into Linux audio and video applications on a Red Hat system, take my advice and book an early flight for Planet CCRMA. AGNULA AGNULA stands for "A GNU/Linux Audio distribution". As its full name implies there is a philosophical basis for this system: AGNULA intends to perform the same function as Planet CCRMA, i.e., to provide a complete turnkey audio/video workstation for Linux users, but it does so with only free software, with "free" defined here as per the definitions from the Free Software Foundation (FSF). In case you don't know about the FSF's Four Freedoms, they are basic principles that specify your rights to : Run the program for any purpose. Study how the program works and adapt it to your needs. Redistribute copies of the program. Improve the program and release your improvements to the public so that the whole community benefits. These are noble precepts almost completely at odds with typical commercial strictures regarding software ownership and use. AGNULA is a project funded by the European Commission and coordinated by Centro Tempo Reale in Florence, Italy. The project's kick-off date was April 1 2002 and it will end on March 31 2004; however, the developers intend to continue supporting the project beyond the end date. The project's primary goal is the development of two distributions for GNU/Linux completely based on free software and devoted to consumer-level and professional-grade audio applications and multimedia development. One distribution is based on the Debian distribution (DeMuDi, the Debian multimedia distribution) and the other is based on Red Hat (ReHMuDi, the Red Hat multimedia distribution). According the AGNULA home site these distributions focus on providing a useful environment for musicians, composers, audio researchers, DJs, VJs, et cetera, with particular attention to these features : The software shall be easy to install (auto-configuration, automatic hardware detection, attention to human-computer interaction). The software shall be based upon a full-featured GNU/Linux system (completely configurable and customizable, reliable and secure). Most of the software shall be released under the GNU GPL licence and all included programs will be Free Software. Another unique aspect of the AGNULA project appears in its consortium of partners. Tempo Reale is not the only research center involved in the project. Other significant participants include IRCAM in Paris, KTH in Stockholm, and UPF in Barcelona. These project partners have already contributed software developed directly for the AGNULA system, including work such as a Python implementation of the famous jMax (from IRCAM), an expansion of Xavier Serra's SMS synthesis software (the CLAM software from UPF), and speech synthesis tools from KTH. Some of these projects have only recently matured, but they are all exciting developments within AGNULA. The AGNULA Web site summarizes the project purposes as follows : Support the development of GNU/Linux distributions completely dedicated to audio applications. Provide coordinated access to the widest combination of free audio software in a coherent environment. This will enhance state-of-the-art research and development in the audio field. Provide an audio system based on free software which will enhance customized usage (useful in cultural and artistic environments). Help spread sensibility on the topics of free software (with specific attention to audio/video applications and content distribution). Lofty goals, to be sure, but certainly worthy of pursuit and attainment. Of course, the bottom line is: How well has the project developed, and is it in a usable state at this time ? I'm pleased to report that development proceeds steadily, and at its 1.0 release performs beautifully. Since I'm writing documentation for AGNULA it's rather essential that I have the system installed here, and since I already have Planet CCRMA installed I decided to set up the DeMuDi branch of AGNULA. I run a Debian system on my laptop, so I was already familiar with some of DeMuDi's aspects, and I found the installation to be only slightly more complicated than Planet CCRMA's. Debian is a natural choice for AGNULA's base distribution: It is a community-supported effort independent of corporate obligation, and it is itself built almost entirely from free software (as per the FSF definitions). Installing AGNULA/DeMuDi is not difficult, though Debian lacks a polished installer such as Red Hat's Anaconda. The few remaining rough spots have been duly acknowledged by the AGNULA developers and are being smoothed out for the next major release date (targeted to late January 2004). I had to massage part of the X configuration, but the AGNULA developers were most helpful and patient with me. Once the base system was installed the next step was to go on-line and issue these simple commands : apt-get update apt-get install demudi-all After that stage completed itself I was ready to go. AGNULA's applications base is quite similar to Planet CCRMA's, with only a few programs left out due to licensing restrictions. The categories are the same, most of the applications are the same, and the underlying system modifications are nearly identical. One noticeable difference is DeMuDi's choice of the FVWM2 window manager. I was somewhat surprised by this choice, mostly because I used FVWM for my first Linux GUI in the mid 90s, but I must admit that it's a good choice for a default user interface in X. Its current default appearance is bland, but a simple 'xsetbg linus.jpg' yielded a more colorful background. The development team is aware of FVWM2's rather stark appearance, and a subproject is already at work on improving the default user interface. Compared to KDE or GNOME FVWM2 is a much lighter-weight interface without the bells & whistles associated with those desktop environments, but of course you may change the X GUI to any manager or environment you prefer. Access to the applications base is made through the command line and a pop-up menu. I wanted to test AGNULA's performance straight out of the box, so I ran applications at random to see how the system would respond. I'm very happy to report that almost everything worked right the first time, and the programs that didn't work failed because I hadn't started the JACK server. All in all, a very satisfying experience. The applications base for AGNULA 1.0 is not as current as Planet CCRMA's, but I haven't been diligent about updating via apt-get. I'm having a lot of fun with the system "as is" (see Figure 2), but I confess I'm eagerly anticipating AGNULA 1.1. The mail lists for AGNULA developers and users are very active, and I think it's safe to say that the project is already well along its way towards achieving its stated goals. Great praise must go to the development team, particularly Andrea Glorioso, Free Ekayanaka, Nicola Giosmin, Davide Fugazza, and Damien Cirrotteau. Seminal work was contributed by Linux audio luminaries Guenter Geiger and Marco Trevisani, and I must also make special mention of the part played by Nicola Bernardini. AGNULA is very much Nicola's brainchild, and it is indeed growing up to a marvelous maturity. Peace Out While certain folks might grumble about how much better things were in the Old Days I must admit that I've become quite happy about easier installation routines, the apt system, and colorful work environments. Performance is what realy counts, and tuning a system for peak audio performance is a non-trivial task. Planet CCRMA and AGNULA do indeed remove most of the aches and pain suffered while trying to untangle the complexities of kernel latency, JACK, ALSA, the LADSPA plugins, and so forth. If you're interested in using Linux for high-quality sound recording, editing, and playback, you should check out these projects. By the way, the Planet and AGNULA are not the only projects out there aimed at reducing user frustration with Linux audio. Check out this article's Resources for a list of other similar projects. After all, it's nice to have choices, isn't it ? Resources AGNULA (DeMuDi and ReHMuDi) Planet CCRMA At Home AudioSlack (Luke Yelavich's audio packages for Slackware users) Dynebolic (a GNU/Linux distribution for media activists, artists, and teachers) LAW (Jacob Robbins' Linux Audio Workstation) Medialinux at OSL (a Knoppix-based Linux distribution focused on multimedia)>i Thac's RPMs For Mandrake (includes a large collection of Linux music and sound packages) Turn-Key Linux Audio (a Linux audio distro from Kevin Ernste at the Eastman Computer Music Center)

Dave Phillips is a musician, teacher and writer living in Findlay, Ohio. He has been an active member of the Linux audio community since his first contact with Linux in 1995. He is the author of The Book of Linux Music & Sound, as well as numerous articles in Linux Journal.


Similis sum folio de quo ludunt venti.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Visiting the New World of Linux Sound & Music Software

dlc's picture

Another great article, but after all, what was I expecting, chopped livah? :)

I've been using Debian since 1.1 was released (actually 1.0 but some CD distributor jumped the gun and distributed a pre-release version as 1.0, so decided to bump the release number to avoid any confusion). Kernel installation could be very challenging when you wanted to get a music development platform together. I'm looking forward to evaluating DeMuDi as my primary workstation platform. Hopefully I can build everything from sources to optimize all executables for my box.

One not so major question: what are the accepted pronunciations of all these acronyms?

author reply

Anonymous's picture

Thank you for your comments, I'm glad you enjoyed the article.

AGNULA 1.1.0 is official as of today (Jan 14), you might want to give it a try. Alas, they didn't get the fancier artwork into this release, but I think they've packaged some instructions for the artwork this time. I'll upgrade after the weekend (got a gig to prep for over the next few days).

Okay, about those acronyms:

Planet CCRMA - planet karma
AGNULA - agnoola (hard 'g')
ALSA, JACK, LADSPA, DeMuDi - just like they look...

I hope that helps... ;)

== dp

Author's response to a fair criticism

Anonymous's picture

I recently received a message from a reader who was dismayed that I did not provide totally complete instructions for installing these systems. He's right, my articles do not intend to substitute for the docs and instructions available from the home sites, but I should have made that fact more clear. My articles are not complete HOWTOs, they are written to serve as a user's impressions of the software under review. I'll be more emphatic about that in future articles, and I apologize to any readers who wasted time trying to install Planet CCRMA or AGNULA using only this article as a guide.

Btw, the specific criticism referred to my failure to mention the need to acquire and install (in /etc/apt) the sources.list from AGNULA or the Planet. Please read all instructions available from the Web sites for these projects *before* attempting their installation.


== dp

Author's comment: ALSA next month

Anonymous's picture

Btw, I forgot to mention that next month I'll be profiling the latest development of the ALSA project. ALSA has reached 1.0.1 and is now the default sound system for Linux (it's already included with the 2.6.x kernels).

See you next month !

== dp

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

Is Andrew Morton's low-latency patch made obsolete by other improvements in kernel 2.6 or does it still need to be ported to 2.6?

His page shows patches for 2.2.x and 2.4.x kernels only.

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

His patch is included in 2.6, as a configuration choice.

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

If this patch is in 2.6 and configurable, why is there no configuration paragraph? The 2.4.23-low-latency.patch has

+Low latency scheduling
+ This enables low latency scheduling, with reduces the scheduling
+ latency of the kernel. This makes the kernel more responsive, and
+ potentially increases its bandwidth; since threads waste less time
+ waiting for execution.
+ If you don't know what to do here, say Y.

If it were an option wouldn't there be some mention of CONFIG_LOLAT in the arch/i386/Kconfig file?

The 2.6.0 source tree doesn't contain CONFIG_LOLAT anywhere, nor some other keywords found in the 2.4.23 ll patch:


Also what happened to /include/linux/low-latency.h ?

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

2.6 is engineered to have low latency, it does not need an additional patch.
It does have an option you can turn on (the preemptible kernel option) that
_should_ result in latencies close to what was possible with the combination of
the low latency and preemptible kernel patches in 2.4.x.

-- Fernando

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

OK. Thanks for the clarification.

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

very nice article, but I really like to see PlanetCCRMA ruuning with BlackBox ;)

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

Try clicking the link!!! ;))

Re: Visiting the New World of Linux Sound & Music Software

Anonymous's picture

Just click on the link!! ;)))

Geek Guide
The DevOps Toolbox

Tools and Technologies for Scale and Reliability
by Linux Journal Editor Bill Childers

Get your free copy today

Sponsored by IBM

8 Signs You're Beyond Cron

Scheduling Crontabs With an Enterprise Scheduler
On Demand
Moderated by Linux Journal Contributor Mike Diehl

Sign up now

Sponsored by Skybot