Linux Audio: Converting 33-rpm Records to Modern Media

Recording LP
I know this was obviously before your time but, way back when, recordings were done on these things called vinyl records. We, in the industry, use to call these recordings '45's'. - Don Scossow

A while ago I recorded my collection of 33-rpm "Vinyl" records (German: "Langspielplatte" or LP) to CD format and to OGG vorbis. This page gives a short description of the tools and processes that I have used with success.

Hard- and Software

Recording Hardware

The turntable is a Technics SL-D202 with stock pickup and new stylus. It is connected to my good old NAD 7020i Receiver, whose "Tape Out" is then connected to the line-in of the soundcard using a commercially available cable.

The PC that used for sound recording is an old Pentium-III 660 MHz with 512 MB RAM, running Fedora 8 Linux with KDE. A key point is the soundcard: I am using an Ensoniq/Creative ES-1371 PCi here, which is a decent card for that purpose (16-bit stereo record and playback at up to 48 kHz; signal-to-noise ratio 90 dB(r); frequency response 20 Hz to 22 kHz).

Make sure that your equipment is set up "hum free". With the PC connected to the receiver, I actually had to disconnect the antenna during recording since this caused a ground loop. In addition, the recording PC is placed as far as possible from the stereo to avoid interferences. It is only used for recording; all further sound processing is performed on a faster PC - see below.

Recording Software: krecord

For the audio recording, any simple tool that allows direct recording to WAV files will do the job. My preferred application is good old krecord (not to be confused with that over-complicated krec tool that came by default with some KDE desktops). It has a few particularities that make it well suited for the recording of LPs:

Today, for some reason that escapes me, most Linux distributions seem to lack krecord ... so get it e.g. via linux.bytesex.org. On a Fedora system, you will need to run the following:

yum install kdebase-devel libXmu-devel
cd /usr/lib/qt-3.3/lib/
ln -s libqt-mt.so libqt.so

The symlinking is required since otherwise you will get an error of the linker. - With that, you can build and install krecord.

Cleaning Software: Gnome Wave Cleaner

Recording Digital Audio under Linux is easy. What was not so easy was to find suitable software that would allow me to do the audio restoration - in other words: denoise, "dehiss" and "declick" audio files. To put a long story short: Once I discovered Gnome Wave Cleaner (gwc), I quickly settled with it :-)

If gwc it is not included in your Linux distribution, it can be downloaded from the gwc project homepage. Compilation needs a few development libraries; for a standard Fedora 8 system, this is:

yum install fftw-devel libsndfile-devel libgnomeui-devel

... after this, unpack the gwc archive into /usr/local/src/ and simply follow the installation instructions.

The Recording Process

The recording process is actually straightforward: Adjust gain so that you get a good sound level without overshooting, then play and record the record ;-)

Setting the Levels

The goal of the level adjustment is to set signal levels so that no clipping occurs when the signal levels are near the maximum levels: This will preserve the dynamic range of the original piece for the best quality. You will probably need to do some test runs until you have figured out the ideal levels.

The ES-1371 card has an internal amplifier stage that needs to be adjusted, otherwise it will clip the audio. The settings that I am using for kmix and krecord are shown in the following screenshots.

kmix input

kmix output

kmix switches

krecord settings

Recording

Thoroughly clean the disk (I use a carbon "anti-static" brush, acquired decades ago), then record each side of an LP at once. Allow as much "entry" and "exit" time as possible: this is used in the post-processing to determine the baseline noise level.

Count about 10 MB of memory per minute; this means that about 200..300 MB are required per side, which easily fits into the RAM of the machine without swapping.

Survey the sound level (using krecord's VU-meter display). I allow up to 1 cut-off sample per side, otherwise the levels need to be adjusted and the acquisition is re-run.

Every "buffer" is saved as a separate file. I like to use a combination of the artists' and disks' name and the side, such as Al_Stewart-Year_of_the_Cat.1.wav.

Archival

If the audio recording is fine, I take an unmodified (!) copy of the original WAV file, convert this to FLAC and archive it. This file is a kind of "master copy", should the need for re-processing arise.

To automate the conversion process and to add some metadata (such as artist, album, year, etc.) to the resulting FLAC files, I use a shell script called lp2flac.sh ("LP to FLAC"). The script needs a simple "playlist" file, as explained below.

bullet Click here to download the lp2flac.sh script.

Audio Restoration

An Overview

As mentioned above, audio processing ("restoration") is done on a separate PC with a fast CPU. All the necessary steps are described in the GWC Help, so I will not repeat them in detail here. The overall process that I apply is as follows:

  1. Load record into GWC
  2. select "blank" sample at beginning of disc
  3. listen to that section
  4. remove clicks in that section
  5. apply noise removal to that section
  6. listen to that section
  7. undo (once)
  8. select whole track
  9. apply noise removal
  10. apply strong declick
  11. (only if necessary) apply weak declick
  12. listen to the entire record; apply manual declick/correction where necessary
  13. mark songs (start automatically, correct manually)
  14. save songs to individual WAV files

Denoise and Declick

In the GWC configuration, I use the following "denoise" and "declick" settings:

GWC De-Noise settings

GWC De-Click settings

I have found it useful to apply denoising before declicking.

I do not use the FFT click detector: after a few very positive trials I found out that it may have disastrous effects on brass (in particular trumpet) music, such as on Ennio Morricone's Dollar Hits.

With that, I generally get 200...600 detected and corrected clicks per track. Since my disks are generally in a decent state, applying the "weak declick" is only required in a few cases. For most disks, running just the denoise followed by strong declick is enough; I repair the remaining clicks manually later on, while listening to the record.

Splitting the record

Once the above steps are complete, the overall record is "cut" into individual songs and these are saved to individual WAV files. Again, I like to use a combination of the artists' and disks' name and a counter, such as Al_Stewart-Year_of_the_Cat.01.wav. This scheme allows automatic processing in the final conversion (see below).

Audio Conversion

Usually, I create an audio CD from the resulting WAV files (using k3b).

In addition, I convert the files to OGG, FLAC or MP3 format. To automate the conversion process and to add some metadata (such as artist, title, album, year, etc.) to the resulting files, I have written a shell script called makemusic.sh. It merely requires a "playlist" file as input, which is a plain-text file of the following structure:

Artist	Al Stewart
Album	Year of the Cat
Year	1976
Genre	Rock
01	Lord Grenville
02	On the Border
03	Midas Shadow
04	Sand in Your Shoes
05	If it doesn't come naturally, leave it
06	Flying Sorcery
07	Broadway Hotel
08	One Stage Before
09	Year of the Cat

bullet Click here to download the makemusic.sh script.

Links