Steve's World Home   Geography Info   Image/Photo Archive   IRC Stats   Software   Linux Tips   Steve's World Info 

Linux Audio Codec Tips

Although I started playing with digital audio on some of my earliest computers (both PCs and Macs) it's actually taken a number of years for both the quality and the cost of hardware to improve to the point where the average person can afford it (see the Linux Audio Tips page here, or other sources). The current state of open source software is also such that many things are not only possible, but also straight-forward (and in many cases downright easy... :)

Of course, there's still the issue of knowledge in general, including the physics of sound, AD and DA conversion (ie, the properties of digital audio), audio codecs, and then higher level tasks such as multi-track digital recording, editing and mixing, midi, etc. I can't possibly cover all of that here, however, I can try to cover the basics of recording, editing, and the best of the free audio codecs (plus a few other tools). Whether you want to record something yourself or just enjoy the music there should be something of interest. Potential sources of audio include:

Hardware:

Unless you already have a decent audio card (meaning at least an Audigy2 or better) the best bet for recording live audio is a USB audio interface. Avoid the $10 USB audio devices, and splurge the $40 for one of the Behringer models mentioned on the Linux Audio Tips page. This will get you basic 2-channel (stereo) recording with high quality microphone and line-level inputs, but another $100 will get you a very high quality multi-channel USB recording interface such as the Lexicon Alpha or even something Envy24-based from M-Audio. I'm amazed at the quality and Linux compatibility of both Lexicon and Behringer. Highly recommended...

You should also have at least one or two decent CD/DVD burners for ripping and burning digital audio, and either one of the above audio interfaces or one of the many specialty items for recording from tapes or vinyl (yes Martha, they make USB turntables and tapedecks). However, if you record vinyl using a standard turntable connected to your audio interface, don't forget to use a pre-amp in between (remember that turntables output the standard RIAA curve, so you'll need a real phono input to process it correctly).

Lastly, if you want to record anything live, you'll need at least two decent microphones (or one stereo mic). We won't go into condenser mics vs. dynamic mics here; just make sure they can handle the sound pressure levels without distortion and watch your record levels to avoid clipping.

Formats and Codecs:

All digital files have a format and possibly a compression and/or storage codec (mostly due to the size or content) and digital audio is no different. Even though your average PC .wav file is uncompressed, it must still represent the data in some known way, and it usually includes some kind of file header for metadata; in this case we're taking PCM (Pulse Code Modulation) to represent the data, and a wave file header to describe the file contents, such as mono/stereo, the sampling rate, etc. There are also many other formats for the PC platform, as well as other Unix architectures, PowerPC/Macintosh, etc. Suffice to say that you don't really need to know all of this (but you'll pick it up along the way whether you want to or not :)

Some useful reference sites:

You'll pretty much always be ripping or recording to PCM .wav files, as well as editing them; even when ripping AC-3 or other surround formats from a DVD, you'll probably want to convert it to PCM stereo if you just want the audio track (but if you're working with audio and video together, then maybe not).

For any of the above options, you'll need to have your kernel configured for USB and ALSA, and possibly an external kernel driver (eg, Line6 Pod). You'll also need several tools and applications, depending on what you want to do. Many current applications will work for both recording and jamming, including MIDI, USB, and Digital Audio, again, depending on your particular hardware setup (at the least you should have USB and basic audio line in/out).

The default alsa configuration should work for basic ripping, recording/editing, and playback, but you may want to disable legacy desktop audio servers such as esd or arts (notorious for latency problems). If you need a modern low-latency sound server, then check out pulse audio (but if you're just starting out, stick with alsa and check out the .asoundrc configuration options).

Applications:

In addition to lame, flac, etc, you'll want to check out the the DVD ripping tools on the DVD audio rip page, as well as make sure your cd kit is complete (ie, cdrtools, grip, brasero or k3b, etc). A nice command-line utility for querying, converting, and otherwise working with directories full of audio files, is shntool. If you go ahead and install the required utilities, you'll have a fairly complete toolbox for working with digital audio files.

Complete Linux-based Audio Workstations

My preferred platform is Gentoo Linux, but if you already use RedHat or Debian, feel free to try one of these:


 Steve's World Home   Geography Info   Image/Photo Archive   IRC Stats   Software   Linux Tips   Steve's World Info 

Powered by Zope