Portable Hard Disk Recorder How-To
December 1st, 2007 by Dan Sawyer in
Podcasting is great. More and more people have discovered Audacity to record their podcasts, and in many ways it's ideal. It's like a toe in the shallow end of the recording and producing pool. With a podcast, you rarely need more than a mono channel—maybe a stereo setup if you're recording with someone else in the studio. But, when you get your feet wet with basic dialogue podcasting, it's hard to stop.
After all, there are so many things in the world worth recording and podcasting. There are podcast novels, such as those put out by the folks at podiobooks.com, and a good production can run into dozens of tracks between sound effects, guest voices, music and layering.
If you've gone that far, why not go the rest of the way with a full-cast radio drama? Even if you aren't a writer, plenty of plays in the public domain work very well for audio. If you're of a more musical bent, you could set up a recording session for your kid's garage band. However, once you get into doing complex live audio, such as recording full-cast radio dramas, concerts or stage plays, you're going to need more than Audacity. You're going to need a full-fledged portable recording studio.
To record a moderate-sized stage play, for example, your recording rig must capture multiple tracks simultaneously and independently while keeping the separate streams in sync. There's nothing quite so stressful as coming home from an excellent performance riding the mixing board to discover that, despite what you were hearing in your headphones, you've inadvertently created phase cancellation in your mixdown with your microphone placement. The data you don't have on your tape or hard drive is data lost forever—data that wouldn't have been lost if the eight-mic zone system had run to a multitrack recorder instead of a stereo mixdown. If you had the individual tracks, you could control for phase and positioning problems, sweeten the mix and even create a surround-sound environment. But, with all of the mics mixed down to stereo, what you hear is probably the best you'll ever get.
Moving from simple stereo recordings on Audacity to doing sophistocated multitrack recordings and mixes is, thankfully, a natural next step on Linux, but it requires some initial cash outlay. First, it's off to the great electronics mall to grab the appropriate hardware to build your studio. Resist your urge to indulge in one of the latest gamer's sound cards; they look sexy, but you're never going to get them to record in anything better than stereo. No, for our purposes, you'll want a good Pro Audio card that's well supported. It's not a cheap move, but for about $500 you can choose from a good range of interfaces that are exceptionally well supported. Of course, you won't want to chuck the sound card your computer already has; a Pro Audio card is designed to interface with mixing boards, digital audio devices and public-address systems—it may not even include a plug for your speakers. For our purposes here, its central feature is that it pipes multiple simultaneous nonmultiplexed streams of audio to your computer, often including MIDI.
It's one thing to build a multitrack hard disk recorder out of your desktop computer—the choice of hardware for your interfaces is embarrassingly extensive, the price range quite broad, and there is far more Linux support than you'd expect in terms of user community. But, unless your home recording studio is both uncommonly large and very well soundproofed, you may have some problems with a desktop HDR. Who wants to lug a desktop computer and monitor around in order to do field recording? If you had a spare $1,500 you could pick up a multitrack appliance, such as the ones made by Alesis and available at fashionable Guitar Centers everywhere, but why bother? You'd still need the Pro Audio card in your desktop to pipe the data back into the computer for mixing, so the total cash outlay is more than $2,000—much too large for even a dedicated hobbyist.
But have faith, all is not lost! In my case, I needed a multitrack portable recording rig to do client site recording of stage shows and panel discussions, and because of the variety of voices and the prevalence of shoddy mic techniques in the world, I needed to preserve the option of postproduction in each individual audio track. I looked into the commercial HDRs, particularly the Alesis models, as I have previously used Alesis' ADAT tape-based system extensively. The advantage of these devices is that you turn them on and they just work—they're firmware-controlled and they operate in hard real time, which is an absolute must for multitrack recording. Even so, in the end, they were not worth the money. Their capabilities are too limited for my needs—most are limited to 48KHz sample rates, which is fine for dialogue, but far too low for recording sound effects, complex movement in a space or music—the 48KHz sample rate simply can't capture the fine high-end detail and phase information that make such sounds distinct (explaining the audiological reasons behind this is beyond the scope of this article, but a quick read on the basics of acoustical sampling will give you the background you need). I needed a better solution.
Fortunately, I have an old laptop lying around, and Linux—unlike some other popular operating systems I could name—has real-time hardware preemption, which is essential if one wants to build a hard disk recorder. A laptop, of course, will not accept PCI or PCI Express cards, so the choice of Pro Audio interfaces is limited to the external—something that can plug in either to the CardBus slot or the USB or FireWire port.
The list of compatible external audio interfaces is far shorter than the list of internal cards available for desktops, but it's still long enough to require a lot of research. I actually do have an old Swissonics USB Studio D on my rack, which is nicely supported by ALSA and normally sits connected to my desktop HDR station, but it's too big and draws too much power to lug around to remote locations where I might have to run off my car battery.
For my purposes, I needed something around $600, with enough inputs that I could mic a stage play—eight analog inputs, minimum. This automatically culled out most of the FireWire-based interfaces. Even though the FireWire boxes from Presonus can draw all their power from the FireWire bus and let your interface run off the laptop battery—a big plus—the boxes in my price range tend to be limited to four or six tracks. So, on the advice of Ardour Project maintainer Paul Davis (www.ardour.org), I checked out the RME Hammerfall HDSP Multiface 2, which is a CardBus-based device with a very nice external breakout box. It helps that its Linux drivers are written and maintained by Davis, who is no mean slouch when it comes to writing tight code. It also helps that I've got one of RME's cards in my desktop HDR, so I knew they were likely to work handsomely. RME's mixing and control panel software for the HDSP is every inch as professional and easy to use as its Windows and Macintosh analogs.
After plugging this interface in to my laptop and configuring it properly, I have a multitrack hard disk recorder that can simultaneously record 24 tracks at a maximum sample rate of 96KHz, well above the maximum available sample rate on far more expensive commercial HDRs, with more available input tracks.
As mentioned previously, multitrack audio recording ideally requires real-time access to the hardware, but this support is not built in to the kernel by default on most Linux distributions. It's an option that must be enabled at compile time, or, if you're running an older kernel, must be hand-patched into the source before compiling. Although I have no problem recompiling my kernel for a good cause, it's not something I like doing for the sake of pure amusement.
Fortunately, a number of distributions are on the market, geared particularly for multimedia production, that come with real-time priority enabled, with the distribution binaries built with all the architecture-specific and real-time optimizations turned on. Planet CCRMA (Fedora-based), DeMuDi, Ubuntu Studio and 64 Studio (all Debian-based) all come with things set up this way, and if you're building a field recorder from scratch or don't mind re-installing the operating system, they are all excellent starting points for your system. Although I have used all of them and find them all quite capable, I ultimately chose Ubuntu Studio for the sake of consistency with the rest of my platforms—I run Ubuntu flavors on most of my workstations, and even though it's well tuned for real-time use, Ubuntu Studio is more of a general-purpose distribution than is my other favorite, 64 Studio.
Ubuntu Studio is currently in the Debian Feisty iteration, which presents a problem when working with the Multiface 2, as the Ubuntu ALSA version included doesn't contain the correct firmware to activate the hardware. To remedy this, however, a two-pronged attack is required. First off, the ALSA firmware loader, which is not installed by default, needs to be loaded—a task easily done with apt-get. Once that's done, loading the firmware still fails because of the bug in the bundled ALSA version. Heading over to alsa-project.org and downloading, building and installing the v.1.1.4 or better firmware fixes this problem neatly. Once that's done, restart the computer. So long as the rest of the default packages are installed (which include particularly all the HDSP tools), the system should recognize the interface automagically.
To test it, open the hdspmixer utility (Figure 1), plug in a microphone or instrument, and do a levels test. Keep this mixer open, as it is your primary first-level control to govern what's coming into your system.
Now that the hardware is up and running, it's time to get the software whipped into shape. Pro Audio production on Linux is handled entirely through the JACK Audio Connection Kit, which allows software to access the hardware in real time through the real-time-enabled kernel. On the studio distributions, this software is installed by default, although if you intend to use the latest-and-greatest multitrack recording software we'll examine in a moment, you need to upgrade to a later version of JACK than is currently included in Ubuntu Studio.
To start JACK from the command line, enter jackd -R -d alsa -d hw:1 (hw:1 denotes the second sound card in your system, which will almost always be correct when you're dealing with a laptop, as it has a built-in sound card). Once that's done, start up QJACKCtl or another one of the graphical patchbay clients—you'll need it (Figure 2).

Figure 2. The patchbay is used for routing sound from the hardware into the applications, from one application to another, and then back out to hardware outputs.
When it comes to multitrack recording on Linux, one project shines above and beyond all the other audio recording software available for the platform. That project, Ardour, is maintained by Paul Davis and is unabashedly geared for professional audio engineers. Like Blender, which has a naked aim to be a free professional 3-D finishing system for the masses and is designed with professionals in mind, so too is Ardour aiming squarely for audio professionals, with an interface design borrowed from programs like ProTools and then tweaked with an eye toward improving upon it. As such, its interface is daunting and obtuse for the newbie, but it operates with great efficiency and transparency once you get acclimated (Figure 3).
The version of Ardour that ships with the current studio distributions at the time of this writing is version 0.99, which lags behind the current release, now comfortably into 2.0 territory. For most purposes, 0.99 is fine, though some of the improvements in version 2.0 are ones you'll want to take advantage of eventually. If you want to get up and running in the quickest order, start the version that comes with your distro, connect the HDSP patchbay outputs to the Ardour inputs, and you're up and running (Figure 4).
If, on the other hand, you want to use Ardour 2.0, you need to do the requisite download/compile/install routine for both the new version of JACK and for Ardour, and you will not have to start JACK or QJACKCtl before starting Ardour—the new version of Ardour has a JACK control interface built in. In either case, when you're up and running to this point, you're ready to rock and roll. Plug your microphones or instruments to your breakout box, and begin recording. But, keep the manual wiki handy until you get familiar with things!
Three years ago, this project would have been a royal pain in the hind end. Although the Multiface has always been Linux-compatible, once upon a time, doing real-time audio on any hardware required a lot of fancy command-line tricks and kernel recompilation. The plethora of studio distributions in the last couple years has radically changed the process and has brought the most powerful parts of the Linux multimedia subsystem into the reach of people who are power users and hobbyists, rather than remaining in the domain of kernel hackers. Thanks to the power of Linux and open-source software, for the cost of an old laptop and a new audio interface, you own a proper, full-featured, multitrack digital audio field recorder. Go forth, record, edit, create and compress!
Special Magazine Offer -- 2 Free Trial Issues!
Receive 2 free trial issues of Linux Journal as well as instant online access to current and past issues. There's NO RISK and NO OBLIGATION to buy. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Sorry, offer available in the US only. International orders, click here.
Subscribe now!
Recently Popular
| Linux HOWTO: Video Editing Magic with ffmpeg | Jul-23-08 |
| Building a Call Center with LTSP and Soft Phones | Aug-25-05 |
| Google Gadgets for Linux | Jul-21-08 |
| Man vs. Myth: Greg Kroah-Hartman and the Kernel Driver Project | Jul-21-08 |
| Review: HP 2133 Mini-Note | Jul-16-08 |
| Boot with GRUB | May-01-01 |
Featured Videos
Non-linear video editing tools are great, but they're not always the best tool for the job. This is where a powerful tool like ffmpeg becomes useful. This tutorial by Elliot Isaacson covers the basics of transcoding video, as well as more advanced tricks like creating animations, screen captures, and slow motion effects.
Shawn Powers reviews the HP Mini-Note portable computer.
Thanks to our sponsor: Silicon Mechanics
Silicon Mechanics is a leading manufacturer of rackmount servers, storage, and high performance computing hardware. The best warranty offerings available are backed by experts dedicated to customer satisfaction.
From the Magazine
August 2008, #172
There's nuttin like a Cool Project to give you some relief from the summer heat, so get out your parka cuz we got a bunch of em. First up is the BUG, not a bug, The BUG. It's got a GPS, camera and more, in a hand-sized package that's user programmable. The BUG does everything. It's both a floor wax and a dessert topping. Get one now. Need a software version of a Swiss Army knife? Take a look at Billix, and don't leave home without it. Then, chew on this one, an X server on a Gumstix device driving an E-Ink display. Need more storage? How about 16 Terabytes? Can do.
And, of course, we have the usual cast of characters: Marcel, Reuven, Dave, Kyle, Doc, plus the new kid on the block Shawn Powers. But it doesn't stop there: build a MythTV box on a budget, build your own GIS system, set up the tools to monitor your enterprise and more. Finally, remember The War of the Worlds? Now you can play too.



Delicious
Digg
Reddit
Newsvine
Technorati







About that RME gear
On November 13th, 2007 David L (not verified) says:
Dan,
Good article, but...
I went looking for the RME Hammerfall HDSP Multiface II and it says that in order to use the break out (which only seems to support balanced 1/4" jacks rather than the standard XLR that most mics come with - is that a phantom power issue I wonder? Do you use XLR to 1/4 successfully?) I need the PCMCIA CardBus which you don't seem to mention, pushing the price of the gear closer to $1000. Did you use the Hammerfall without the cardbus? If so was it over Firewire because I don't see a USB interface on the back side of the Multiface II.
While not technically a Linux issue, it is key to making the whole thing work successfully and maybe a little more detail would make it a little more clear.
Clarification
On November 22nd, 2007 dsawyer says:
David -
One of the things I keep around are a collection of adapter cables, a couple batter-powered preamps and, now, a portable mixer - that deals with the problems related to the XLR inputs. But indeed, if you're needing XLR inputs right in the box, one of the Presonus interfaces is probably more up your alley than the RME.
I actually did buy the cardbus card in addition to the Multiface, only to discover that the Multiface shipped in a case with one of the cardbus cards. It wasn't as nice as the cardbus cards that sell separately, but it does the job perfectly well. So, unless I got lucky and they accidentally popped a cardbus card into the wrong box, then the multiface II really does ship with a bare-bones cardbus card. I wound up returning the Cardbus HDSP that I bought separately and buying a really nice portable Yamaha mixer with the cash back.
Since I wrote the article, I've been using it to record my podcasts at http://www.reprobateshour.com and http://sculptgod.jdsawyer.net.
Hope that helps
-Dan Sawyer
Thanks - that's a start!
On November 29th, 2007 kg4giy says:
Dan,
That does help, yes. It seems that there are some package cardbus deals out there which did not seem to keep the price in line but I will take a look at the other suggestions you made since I don't keep the spares around that you do, although I do have a portable mixer that would do the trick in a pinch.
I will be working on this over the Christmas holidays and with any luck I will report out my findings for those that are following along at home.
DAVID
__________________________David A. Lane is a Linux Journal Reader Advisory Panelist.