This HOWTO is written as a resourse for tapers of live music who want to use Linux as a platform for transferring, splitting, editing, and burning CD's (and DVD's). This is my first attempt at writing a HOWTO and thus may be incomplete. However it should provide a good overview of the tools available under Linux for tapers. If you have any feedback, suggestions, comments, or additions please send them on over to me (homerj at nc.rr.com).
Copyright (c) 2004 by Dave Maley
Please freely copy and distribute this document in any format. It's requested that corrections and/or comments be fowarded to me. You may create a derivative work and distribute it provided that you:
If you're considering making a derived work other than a translation, it's requested that you discuss your plans with the current maintainer.
This HOWTO assumes you already have Linux installed, and some basic Linux/UNIX skills/experience. It assumes that you'll be able to do some basic things from a command line such as change directories (cd) and list files in a directory (ls). It also assumes that you're able to install packages (RPM's) and install/run shell scripts from a command line.
This HOWTO is not written for any specific version of Linux, although I run Fedora and therefore have only tested these applications and scripts running Fedora Core 2 and 3. And based on my experience I would suggest going with Fedora Core 3 as there are a number of things that I had problems w/ in FC2 that have since been fixed in FC3.
First thing you'll need is to have the ALSA drivers installed. This can most easily be accomplished by running a 2.6 based kernel, which includes ALSA. You can also download and install the ALSA drivers from the project homepage, or by installing them from a 3rd party source such as FreshRPMS or Planet CCRMA
In addition to ALSA some of the scripts that I have posted and will mention here depend on scripts which are found in the etree-scripts collection. If you don't want to install the entire etree-scripts collection you'll need the md5check and unshn scripts.
I currently run and would definitely recommend Fedora Core 3, a freely available distro developed and provided by Red Hat. It uses a 2.6 based kernel so ALSA is included by default. A number of excellent apps are included, and there are numerous 3rd party RPM repositories with tons of {free} addons available. Fedora is an RPM based distro and uses up2date/yum for obtaining and installing updates to make installing and managing packages easy:
OK, now we're ready to begin. The first step is to get your master transferred to the hard drive. This can be from whatever format your soundcard supports, but for the purpose of this HOWTO I'll assume we're transferring from DAT.
There's a number of recording applications available for the Linux platform. I've tested/used a decent amount of these and have found that for digital transfers the simple command line utility arecord (part of alsa-utils) is the best available option. However to make things a bit easier I've written a simple wrapper script for arecord called drecord.
With drecord you can capture a 44.1KHz or 48KHz audio stream to your hard drive, saved in wave (.wav) format and allows you set a duration for your recording. However it requires that you specify the sampling rate of the incoming stream. It also provides real-time sample rate conversion (48KHz -> 44.1KHz) using SoX. SoX is a high quailty audio format converter and is included with most major Linux distributions. SoX provides 3 options for performing rate conversion. And drecord uses the "resample" algorythm to provide very high quality conversions.
Here's an example drecord session:
[dave@kodos osp1998-10-03.flac16]$ drecord -r 48 -t 1 -resample 44 osp1998-10-03.wav
Recording WAVE osp1998-10-03.wav (Rate 48KHz) --> Resampling to 44KHz
Recording for a duration of 1 minutes
File osp1998-10-03.wav has been recorded successfully.
Thanks for using drecord!
[dave@kodos osp1998-10-03.flac16]$ ls
osp1998-10-03.wav
[dave@kodos osp1998-10-03.flac16]$
Now that you have your master transferred to the hard drive you need to split the large wave file into CD sized files. For this I highly recommend using wavbreaker. It's purpose in life is to correctly split wave files on CD sector boundaries, which prevents audible gaps between CD tracks when burned in DAO mode. It's design is reminicent to the ever popular CD Wave on Windoze. I have created RPM's of wavbreaker which are available from my website.
Out of all the Linux audio editors I've tried so far my favorite is Audacity. It's actually not a Linux-only application. It's written using the wxWindows widget set which is a cross-platform toolkit available for Linux, Mac OSX, and Windoze. Audacity is a full featured audio editor. You can record, mix tracks, and apply effects to your recordings. It has a number of built-in effects, and also supports VST and LADSPA plug-ins. Recent versions of Audacity are available from FreshRPMS or Fedora Extras.
Both drecord and audacity should be perfectly suitable for on location recording for you laptop tapers wanting to try Linux. The drecord script also supports ameter, which is a graphical level meter. However you'll need to have ameter installed.
If you prefer a graphical application for live recording situations Audacity should do the trick. It allows you to disable the graphical waveform display. You'll also need to make sure that the level meters are enabled - this is a new feature so make sure you have a recent version. Audacity also supports recording and editing 24-bit and 32-bit (floating-point) samples, providing high-quality dithering and resampling for all conversions.
There are a number of available burning utilities for Linux, the most common being cdrecord. Although cdrecord is available by default in most major Linux distributions I don't recommend using it. There's a small bug in all recent versions I've tested which is annoying enough to use something different. This bug causes the display of a CD player to look as if there's a 2 second gap between tracks, even though it was burned in DAO mode and there's no actual audio gap.
Instead I highly recommend using cdrdao which correctly burns CD'sin DAO mode. The downfall to cdrdao is that it requires a toc file or cue sheet. Fortunately this is what motivated me to write dburn-wavs and dburn-shns which are simnple wrapper scripts around cdrdao and handle building the toc file for you. The dburn-wavs script simply builds the toc file for a directory of .wav files and then burns them using cdrdao. The dburn-shns script does the same thing but first un-compresses the files from either .shn or .flac format.
http://homer.homelinux.net/scripts
Note: dburn-shns by default will use /tunes/tmp/burn for a temp directory. You'll either need to create this directory and make sure it has enough free disk space to hold a CD's worth of .wav files, or you can set the $BURN_DIR environment variable for your shell. Or of course you can always modify the script to default to a different directory.
If you prefer a graphical application for burning CD's you should checkout K3b which is now being included in many major Linux distros. K3b provides a gui frontend for cdrecord and cdrdao, and allows you to manually choose which to use. It's a simple drag-n-drop interface for burning data and audio CD's, and even supports burning DVD's. I also noticed that there's a flac plugin available however I haven't yet tried this feature.
Note: To prevent 2 second gaps between tracks you'll need to change the default pre-gap setting from 2 to 0. This can be changed from the "Settings" menu --> "Configure K3b".
After you've got your tracks split and audio CD's burned you'll need to compress the wave files for backing up and uploading. For this you can use either shorten (.shn) or FLAC (.flac). I've written a couple simple scripts for this called dflac and dshn. You can provide the path to a specific directory of wave files, or you can have the script recurse through sub-directories looking for wave files to compress.
http://homer.homelinux.net/scripts
To check the integrity of your .shn and .flac files I recommend using the md5check script which is part of etree-scripts. This script will verify the md5 checksums of .flac and .shn files in the current directory and will also recurse through sub-directories looking for files to check.
http://linux-sound.org
http://etree.org
http://ccrma.stanford.edu/planetccrma/software
http://www.oade.com/Tapers_Section/Forum/dcboard.php?az=show_topics&forum=107