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.
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) http://www.agnula.org Planet CCRMA At Home http://www-ccrma.stanford.edu/planetccrma/software/ AudioSlack (Luke Yelavich's audio packages for Slackware users) http://www.audioslack.com Dynebolic (a GNU/Linux distribution for media activists, artists, and teachers) http://dynebolic.org LAW (Jacob Robbins' Linux Audio Workstation) http://www.newyorkmusicunion.com Medialinux at OSL (a Knoppix-based Linux distribution focused on multimedia) ftp://logx.it/mirrors/medialinux/>i Thac's RPMs For Mandrake (includes a large collection of Linux music and sound packages) http://rpm.nyvalls.se/ Turn-Key Linux Audio (a Linux audio distro from Kevin Ernste at the Eastman Computer Music Center) http://lulu.esm.rochester.edu/kevine/turnkey/
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.