Audio Insider
Online Monthly Pass

Register for an Account Forgot your Password?

Most Popular


The EM Poll


This is not a scientific poll but a tabulation of readers responses and is purely just for fun!

See Past Poll Results

pop_quiz_button

browse back issues

Newsletters

emusicianXtra icon
EMSoftware update icon
MET Extra icon
eDeals Newsletter icon


Subscribe to newsletters here...

Sounds from Another Planet

Jan 1, 2004 12:00 PM, By Allan Metts



         Subscribe in NewsGator Online   Subscribe in Bloglines

CURRENT NEWSSTAND ISSUE

Read the full Table of Contents for the issue on sale now! Click here

Subscribe for only $1.84 an issue!

Please tell us about yourself so we can better serve you. Click here to take our user survey.

Personal Studio Series

Mastering Steinberg's Cubase™

This special issue is not only a must-read for users of Cubase™ software, but it also delivers essential information for anyone recording/producing music in a personal-studio.

Click for more
EM Podcasts

Listen to these latest podcasts and more:
Film and TV composer Ramin Djawadi on scoring Iron Man. Go

What's New: New versions of NI Guitar Rig, a synth and more. Go

eDeals Newsletter for Discounts on Gear

Get First Dibs on Hot Gear Discounts, Manufacturer Close-Outs and Job Opportunities when you sign up to receive eDeals E-newsletter, sent twice a month. Check out an issue get advertising info or subscribe

For more than ten years, Linux has been gaining ground as a favorite platform for die-hard techies, power users, and programmers. More recently, Linux has moved into the corporate mainstream, often replacing costly servers based on proprietary technology.


Illustration by Laura Williams

But when you perform a fresh Linux installation, you don't necessarily have a low-latency platform for music and audio production. That's where Planet CCRMA comes in. Assembled by the folks at Stanford University's Center for Computer Research in Music and Acoustics (CCRMA), Planet CCRMA transforms a Linux system into a lean, mean, audio-production machine. And here's the best part: it's free. (For background on how Planet CCRMA came into being, see the sidebar “In the Beginning…”.)

WHY LINUX?

With so many excellent applications available on Windows and Mac, why would anyone even bother with Linux? For starters, command-line programs are still in favor on Linux, and there are times when a fancy GUI just isn't appropriate. For example, you may need to process audio behind the scenes in an amusement-park attraction or in a handheld device for the field. Linux has been known to fit in very small footprints.

Command-line programs are highly conducive to automation, and Linux includes plenty of automation tools. In a matter of minutes, you can write a “script” to identify all of your WAV and AIFF files, resample them to 48 kHz, add half a second of silence, and store them on a file server. If you want this to happen every night at midnight, it can.

Linux applications, whether GUI-based or command-line driven, make no assumptions about where your keyboard, mouse, and monitor are. If you want, you can stick five PCs in a rack, connected with nothing more than power cords and Ethernet cables. You'll be able to run applications on all of these machines simultaneously, using a keyboard, mouse, and monitor attached to any Linux machine. What's more, the GUI screens from all of these machines can appear side-by-side on a single desktop. Massive software synthesis, anyone?

And Linux is free, so you can load up all of those rackmounted PCs without having to worry about how many licenses you purchased. Typically, the applications you run are also free, and source code is usually available for everything. Since Linux comes with a full suite of development tools (also free), you can customize and extend any program you use.

GET SET

Linux is open-source software, and it carries no licensing fees. You can get the Linux source code straight from the development community, compile it yourself, and cobble it together on your hardware. But the easiest way to get up and running with Linux is to use a prebuilt distribution from an organization like RedHat, SuSE, or Debian.

These Linux distributions contain the Linux operating system and lots of useful applications written by developers all over the world. The makers of these distributions typically put a user-friendly installation routine on top of this collection of software and package it all together with a pretty box and manual. You typically pay a modest fee for such a package, or you can download the distribution for free from the Internet and burn your own CDs (you can even install directly from the Internet if you want to).

Depending on how Linux is configured and adjusted, it is capable of performing widely different roles: one Linux machine may act as a high-speed network packet router, another may be serving up the company's Web pages, and a third might be providing basic office-productivity applications like spreadsheets and word processors.

Or maybe you'd rather set it up for audio, video, and MIDI — Planet CCRMA will show you the way.

EVERYTHING TO EVERYBODY

Planet CCRMA installs into RedHat only, so I'll zero in on this particular distribution. Since the folks at RedHat don't know how you're going to use your system, they provide a general-purpose installation that provides a reasonable (but not necessarily optimal) platform for whatever you may want to do with it.

What's more, a default RedHat installation tends to be somewhat conservative. Its performance-tuning parameters won't necessarily push your hardware to its limits. And a machine running the “latest and greatest” RedHat distribution will often contain software that is several versions older than what the developers have released.

There's a good reason to err on the side of caution. RedHat wants major corporations to adopt its Linux distribution for use in enterprise-wide deployments, and major corporations want stability and easy installations on a wide variety of machines. So when RedHat assembles a new version of its distribution, they use versions of the core Linux software and applications that have seen plenty of use in the real world, and they test the whole package to ensure it will be safe and stable on all kinds of hardware.

Planet CCRMA provides three things you need to transform your general-purpose, default RedHat installation. First, you get a “tuned” Linux kernel that is optimized for low-latency operation. (The kernel is the innermost core of Linux and operates directly on your hardware. Everything else communicates with the kernel.)

You also get an advanced Linux sound architecture, which isn't provided in the RedHat distribution. This architecture is actually a collection of interrelated projects, with interesting names like ALSA, Jack, and LADSPA (I'll cover each of these in detail later on). Without Planet, you'd have to download, compile, and configure each of these manually.

Finally, you get a huge set of applications that can take advantage of this turbocharged audio foundation. It's important to note that much of this software is created by folks who have nothing to do with CCRMA. Planet CCRMA represents a convenient packaging job for applications that are created by a host of different people in locations all over the world. You can acquire all of this software directly from the developers, but you'd have to visit a ton of Web sites to get it.

CREATING A PLANET

Before I could set up Planet CCRMA, I had to establish a working RedHat Linux machine in my studio. I downloaded installation-CD images for RedHat from a mirror site at Georgia Tech and burned the CD-ROMs using software in Windows. Be aware that these are huge downloads. If you don't have a broadband Internet connection, you'll probably want to purchase the CDs from RedHat instead. Now would also be a good time to read the “Preflight Checkup” sidebar to make sure you're mentally prepared for this endeavor.

I dedicated an unused disk partition on my main studio computer to Linux and proceeded with the RedHat installation. A complete description of this process is beyond the scope of this article, but there are plenty of resources available to help you with it (see the sidebar “Resources and Links”). Linux can coexist peacefully with other operating systems, so I set up a dual-boot configuration that let me switch back to my commercial software in Windows 2000 whenever I needed to.

All of the Planet CCRMA software is located on the CCRMA Web site or one of its mirrors. This represents another huge download, but once again you have options. I have a fast Internet connection, so I chose to install everything online. You can also download CD-ROM images, however. That option is handy if you have a friend or workplace with a broadband connection, but lack one yourself.

Planet CCRMA uses a special installation tool that must be installed first. Once in place, this tool remembers the location of the CCRMA repository (whether it's on your CD or at Stanford University) and dramatically simplifies the process of downloading and installing application files.

Next you must replace RedHat's default kernel and sound drivers. The commands for doing this are straightforward, but because of the low-level nature of these operations, you do have to edit some system files and such (all of this is described on the Planet CCRMA Web page in a step-by-step fashion).

This is the point at which you're most likely to run into compatibility problems with your hardware. If you can't bring up the new kernel, Planet CCRMA provides an alternate “safer” one that contains just enough changes to run the audio platform, but at the cost of higher latency.

The sound drivers come from the ALSA (Advanced Linux Sound Architecture) project. There's more to ALSA than just the drivers, but I'll get to that later.

Before jumping into a Planet CCRMA installation, you need to check the ALSA Web site to make sure that your sound hardware is supported. Unfortunately, neither my Lynx Studio LynxONE nor my MOTU 828 has ALSA support as of this writing. However, many multichannel professional devices are supported, particularly models from Echo Digital Audio, RME, and M-Audio. Some USB devices require special installation steps, but Planet CCRMA makes easy work of these (I know this because I inadvertently did it the hard way for my M-Audio Midisport 2×2).

Many consumer-grade devices are also supported, so that Sound Blaster in the junk drawer is likely to work. The built-in sound circuits on my Intel motherboard had support, as did the sound chips in my laptop. But be sure to read the fine print on the ALSA Web site — in the case of my laptop, “supported” meant “for playback only.”

Once you have your new kernel and drivers running, the rest is easy. Planet CCRMA provides detailed instructions on tuning your system, but most of these steps aren't necessary with recent versions of Linux. At this point, you're ready to load all the applications. I executed a single “download and install everything” command and went to bed. The next morning, I was ready to rock and roll.

AUDIO PATCHWORK

Before ALSA, Linux typically came with OpenSound System (OSS) sound drivers. These drivers provided reasonable support and performance for a variety of devices, but they weren't necessarily low latency. However, older Linux sound applications may not be written for ALSA, so you need to be aware of OSS (ALSA can emulate OSS if necessary).

If an application supports ALSA drivers for both audio and MIDI, it's likely to have excellent performance as a standalone program. But you're missing out if you stop here, because the real power of this platform exists in its support for sound applications that communicate and integrate with each other.

There are several integrating technologies at work here. For MIDI, there's the ALSA Sequencer interface. Applications that support this interface can “publish” their inputs and outputs, allowing other applications to connect to them. If a MIDI-based drum machine and a MIDI sequencer both provide ALSA Sequencer support, you could record the activity of the drum machine by simply connecting it to the sequencer.

You can do the same with audio using a technology called Jack. Any Jack-aware application can connect its output to the input of another. Want to record your soft synth with your audio-recording program? It's as easy as connecting them together.

My physical audio and MIDI connections are always available for use. When I'm ready to record from or play back to the outside world, I simply connect the ports I'm using to the applications that will do something with them.

There are several programs you can use to make these connections. Typically, these present the available “writers” on the left and the “readers” on the right. You connect a writer to a reader by selecting them and pressing a button. I settled on kaconnect for MIDI connections and QJackConnect for audio (see Fig. 1).

PLUG IT IN

Many Linux audio applications support the LADSPA (Linux Audio Developer's Simple Plug-in API) plug-in architecture. Roughly equivalent to the DirectX or VST plug-ins that you're probably familiar with, the LADSPA plug-in architecture allows a single set of audio tools to be shared by all of the audio applications on your system.

More than 100 LADSPA plug-ins are installed with Planet CCRMA, and there are quite a few applications that can take advantage of them. I found flangers, delays, reverbs, filters, phasers, and all sorts of other audio manglers. Many are quite good, some are mediocre, and others are downright goofy.

The real magic starts when all of the pieces (ALSA, Jack, and LADSPA) come together. Here's an example: I connected a MIDI file player to a software synthesizer using the MIDI patch bay in kaconnect. Then I found an application called Jack Rack that allows you to assemble a chain of LADSPA plug-ins and use them in real time

I configured an interesting set of LADSPA effects in Jack Rack and routed the audio from the software synthesizer into it (using the audio patch bay in QJackconnect). Then I connected the output of Jack Rack to studio monitors and an audio-recording program. What's more, I could connect one of my physical MIDI inputs to Jack Rack and control effects parameters in real time. The whole setup worked like a champ, which is particularly impressive when you consider that each of these programs was written by a different person in a different part of the world.

If I needed visual feedback on all of this, I could have easily started the “meterbridge” program and inserted it in the midst of any of the audio streams listed above. This notion of extreme modularity is quite pervasive in the Linux and UNIX worlds. For years, Linux users have been stringing together simple commands to make complex operations take place.

BRING ON THE APPS

There are well over a hundred packages that can be downloaded from the Planet CCRMA site. There's simply no way I can cover all of them — most of these programs are so deep that I can only scratch the surface of the ones I do cover.

I'll mention my favorites, focusing solely on the audio and MIDI applications (Planet CCRMA contains video, multimedia, and system applications as well). For electronic musicians, the most interesting applications are the ones that support Jack for audio, the ALSA Sequencer Interface for MIDI, and LADSPA plug-ins.

I'll start with a full-featured digital audio workstation called Ardour. This program rivals similar commercial applications in functionality, with support for 24 or more channels of 32-bit audio. You can manage your recorded audio in an intuitive editing window (see Fig. 2), automate your mix with graphical envelopes, or mix everything down in a separate mixing screen, complete with graphical controls and level displays.

Command-line applications are still alive and well on the Linux platform, and a remarkable audio package called ecasound operates completely without a graphical interface. But that doesn't mean it's short on power: In addition to playback and recording, ecasound can be used for mixdown, effects processing, and format conversions. It even lets you manipulate audio in real time with MIDI continuous controllers.

Ecasound's mode of operation is remarkably simple. Specify audio hardware as inputs and a file as an output, and you're recording. Do it the other way around and you're playing back. Using nothing but command-line statements, you can build “chains” of arbitrary complexity, allowing you to do just about anything with your audio.

There are several audio editors in Planet CCRMA. I like Snd. It's almost unnoticeable when it opens; all you see is a tiny menu bar. But the deeper you go, the more you realize what you can do. Snd can be completely customized with a programming language called Scheme (which is similar to Lisp). The learning curve is steep for this program, but there's not much it won't do.

MIDI MAYHEM

On the MIDI front, there are two heavy-duty sequencers available: Muse and Rosegarden. Both have many of the features you'd see in MIDI sequencers on other platforms, and you can record or import audio into either application. However, these integrated audio capabilities aren't quite as refined as what you see in the commercial applications on other platforms.

I think Rosegarden has the cleaner user interface (see Fig. 3). In addition to the typical track, event-list, and piano-roll views, Rosegarden lets you see your music in standard notation, which is great for a free program. Rosegarden also allows you to you export music for use by Csound or LilyPond (described shortly).

Muse has a few features not found in Rosegarden, including a nice mixer window and integrated access to some of the software synthesizers available on the platform. I had a hard time picking a favorite sequencer — I'll probably use either or both, depending on my current project.

I did have trouble syncing these applications to other programs, however. Judging by their GUIs, Muse and Ardour can both act as MIDI Time Code masters or slaves. I should have been able to route MIDI from Muse to Ardour (or vice versa) and have MIDI and audio running in lockstep. But neither app seemed to recognize synchronization messages coming from the other. I asked about this issue on a few mailing lists, and a few users described similar experiences.

Rosegarden and Ardour seem to support the Jack Transport Interface, which is a new development intended to allow synchronization using Jack. But again, the applications wouldn't sync to each other (the developers of both applications informed me that they haven't yet implemented the latest version of this interface). All of these applications are in active development, so the situation should improve by the time you read this.

THAT SOFT SOUND

There is no shortage of software synthesizers in Planet CCRMA. I counted at least eight that profess to be nothing but a software synthesizer (there are plenty of other programs that can generate their own sounds).

One of the most useful synthesizers is probably the least flashy of the bunch. FluidSynth can load multiple SoundFont files and play on 16 MIDI channels at once. And it does so without a graphical interface.

Once you've loaded your SoundFonts, you can choose among the loaded instruments using MIDI Bank Select and Program Change messages (or through command-line instructions). And if you need to create or edit SoundFont files, a nice editor called Swami is close at hand.

There are synthesizers with graphical interfaces as well, including a couple that let you patch together modules in any configuration you choose. My favorite is AlsaModularSynth (see Fig. 4). This software synth has a clean, intuitive interface, powerful capabilities, and lots of included example patches.

If building your own modular synthesizers isn't challenging enough for you, you can go deeper. Planet CCRMA includes Csound (covered in depth in the July 2002 issue of EM). Also included are extensions to the Lisp programming language that enable you to generate sound, write music, and create music notation from within the Lisp environment.

AND EVERYTHING ELSE

Speaking of notation, Planet CCRMA includes LilyPond, which takes a specially formatted text file and converts it into printable music scores. I was only able to try out this program with some trivial examples, but by all accounts, LilyPond excels at creating gorgeous scores that rival hand engraving (check out lilypond.org if you'd like to see how they do it). For those who object to creating scores by typing text files, there are other programs in the Planet that can export the LilyPond format.

There are many more applications in Planet CCRMA — I found DJ tools, a high-quality sampling-rate converter, CD-burning software, and a modular audio and MIDI-processing package called Pd that resembles Cycling '74's Max/MSP (Pd was developed by Miller Puckette, who also developed the original version of Max. And there are plenty of handy utilities for smaller tasks, such as MIDI file playback, sound-card control, and format conversion.

Can you perform real work on this platform? Absolutely. Sound designers, composers, and musicians alike will find tools on Linux that they can't find anywhere else. I would be a bit wary of booting up some of these tools in the midst of an expensive recording session (at least not until they become more stable and mature); home recordists, however, should find plenty of valuable software here.

My biggest problem was the distraction factor: there is so much to explore and discover, I found myself playing with all of these goodies instead of actually making music. But that's a good problem to have, and you certainly can't beat the price. So if you're ready to travel to the brave new world of Linux audio, download Planet CCRMA and strap yourself in.


Allan Metts is an Atlanta-based musician, software and systems designer, and consultant.

IN THE BEGINNING …

Planet CCRMA is actively maintained and supported by Fernando Lopez-Lezcano, who is a lecturer, composer, and system administrator at CCRMA. I asked him how the Planet came into existence and learned that it didn't really happen intentionally — instead, it evolved organically. Over time, students and faculty began using Linux instead of the NeXT and SGI workstations that had primarily been in use previously. Many of the music and sound applications they were using were ported to Linux as well.

Lopez-Lezcano started creating installation packages to ease the maintenance and configuration headaches associated with the Linux machines. Then he started incorporating some of the low-latency capabilities and drivers that were under development.

“Eventually it became obvious that some students and faculty might want to install Linux at home and add the packages I had created to their machines,” says Lopez-Lezcano. “At first I just pointed them to the collection of packages I had in the server, and much later I created a Web page to better organize the package collection. So that was the start of Planet CCRMA.”

Today, Planet CCRMA is thriving, with an active mailing list and a well-organized Web site. On the site are comprehensive installation instructions and detailed descriptions of each of the Planet's applications. What's more, there are three mirror sites, which ensures that you can download all of this software from a location near you.

PREFLIGHT CHECKUP

Installing and using Planet CCRMA is a fascinating journey. But before you embark on this trip, you need to give yourself a little test: Are you intrigued by technology, or do you need for things to “just work” for the sake of your music and your project deadlines? Do software failures cause you to curiously dig to the root of the problem, or do they cause you to write angry letters to company presidents?

The current state of this technology is far from a “one-button installation.” But if you are reasonably savvy with technology, and if you stick to the script, you'll be fine. However, you do need a working understanding of Linux and how to get around in it (or at least have access to a friend with these qualifications). There are plenty of books available on the subject if you need to study up a bit.

If your hardware is supported and all goes well, you'll be making music in no time. If things don't go smoothly, you may find yourself messing with device-configuration parameters and adjusting low-level parameters in the operating system.

But you are not alone in your suffering. Interestingly, I find support in the open-source community is often better than the support I get from commercial software vendors. There are Internet sites and mailing lists devoted to all of this software, and a good Google search will usually lead you to someone who has seen your problem before. And as long as you ask your questions clearly and politely in the appropriate forums, some kind soul will usually help you out. Often, you'll actually be talking to the very person who wrote the code in the first place (as opposed to an entry-level tech support representative at a commercial firm).

RESOURCES AND LINKS

Advanced Linux Sound Architecture (ALSA)
www.alsa-project.org

Free Software Foundation
www.gnu.org

The Linux Documentation Project
www.tldp.org

Linux in a Nutshell, 4th. ed., by Ellen Siever et al. (O'Reilly & Associates, 2003)
www.oreilly.com/catalog/linuxnut4

Open Source Initiative
www.opensource.org

Planet CCRMA
www-ccrma.stanford.edu/software/planetccrma

RedHat Linux
www.redhat.com/download/products.html

Get Copyright ClearanceWant to use this article? Click here for options!
© 2008 Penton Media, Inc.

Back to Top