This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Graphics & Multimedia

Vinyl + Audacity = MP3

By David Pendell on October 20, 2008 (7:00:00 PM)

Share    Print    Comments   

If you were born before 1975, you may have a collection of records that you want to convert to digital format. Some open source software and a cable are all you need to convert your prized vinyl to something portable.

If all you want to do is create MP3 files from you LP tracks, the only software you'll need is Audacity. If you want to convert vinyl to CD, you'll need cdrdao and cdrecord as well. All are readily available in most distributions' package repositories or from the projects' sites.

Next, you need to connect your computer to your turntable. There are many ways to do this. In my case, I connected a cable that has a headphone jack on one end and RCA type audio jacks on the other end to my mic jack on my laptop and the preamp on the stereo, respectively. An iPod cable would work if your stereo has a headphone jack. If you have the option of connecting a digital cable to the amplifier on your stereo and computer, then you are truly lucky. This option will give you the most accurate reproduction of your records. However, since vinyl was not necessarily known for its acoustic perfection, a headphone jack will suffice for most people.

Before you begin the conversion process, check a few settings. Run Audacity and select Edit -> Preferences -> Audio I/O. Under playback and recording, make sure that Audacity is using the correct hardware. If it's not, click on the drop-down menus and fix the selection. If you want to be able to listen to the music as you are recording, select the Software Playthrough option. Next, click on Quality on the left side, and for the Default sample format, select 24-bit. While the standard for audio CDs is 16-bit, the 24-bit option allows Audacity to catch subtle nuances that the lower 16-bit setting might miss. With audio and video is it usually best to record at a higher level of quality and then scale back rather than try to go the other way.

Once these options have been set, you are ready to begin. The easiest way to do so is to start Audacity recording and then begin playing the record. Don't worry if there is a long pause between these two events; removing pauses is easy. Unless all you want is one track from the record, record the whole thing; Audacity is quite capable of removing any tracks that you don't want. Let the whole record play, and give yourself some editing room at the end of the record as well.

If Audacity doesn't seem to be recording, stop and try playing what you have recorded. It may be that the recording level is too low. While Audacity does have the ability to increase volume, it is again better to start with a higher level and then scale back. Try the recording again with a higher output on the stereo. If this doesn't seem to be working, try checking the connections between the stereo and the computer. You may have the cable plugged into the wrong jack. Double-check the settings in the preferences. You might try a different hardware device; if Audacity is not recording, the problem is most likely a hardware problem. Another place to look is hardware access rights; you may not have the correct permissions to record sound.

If you are going to record both sides of the record, you have two choices: you can simply pause the recording, flip the record, begin recording again, and play side two, or you can record two different files and then cut and paste. The latter is resource-intensive, and depending on the speed of your machine and the availble memory, can take some time, so I recommend using the first method.

Once the sound is recorded, transferring the record to a music CD is easy. First, understand that CD audio is not measured in hours, minutes, seconds, and miliseconds, but rather in minutes, seconds, and Compact Disk Digital Audio, or CDDA, frames -- MM:SS:FF. There are no hours because the maximum amount of music on a CD is 80 minutes. Frames are 1/75th of a second long and correspond to a sector length on the CD. So, the first thing that you want to do is change the way that Audacity measures time. At the bottom of the Audacity window there are three time displays marked Selection Start, End Length, and Audio Position. To the right of those time displays are drop-down arrows. Click Selection Start and select "hh:mm:ss + CDDA frames (75fps)." This one selection will change all of the time displays to match. Now look at the middle time display. The End and Length options are mutually exclusive; if you select End, Length is deselected and vice versa. These two option for the second field will be useful when you make a table of contents file for recording to CD.

Click anywhere in the audio track window (the blue pulsating area that represents the music you are working with) and then click on the hours portion of the Selection Start time display. Zero out all of the numbers in the display by typing "0" until all of them are set to zero. The line that was left by your click in the audio track section should move all the way to the left. You are now ready to play the first track of your audio file. Push the play button (the green triangle pointing to the right) and the music should begin playing. If the sound meters in the middle of the top line of the display have pulsing green bars in them but you do not have any sound, check to make sure that you have sound available in some other program, such as a DVD player. If you do, make sure that under the Audio Output section of the Preferences that you set earlier has the correct device listed. If you don't have sound in another application, make sure that your speakers are turned on (if they are powered) and plugged in correctly. Also, check permissions on the sound card again.

Once the playback has reached the point that you have heard the complete first track, and the second track hasn't begun, pause the playback and make a note of Audio Position time display. Stop playback and transfer that information into the End Length time display. First, select End and note the time. Next, select Length and note the time. End is the position in the audio file that the track ends, while Length is the HH:MM:SS+CDDA time that the track plays. End is useful for positioning the Selection Start time for working with the next track, and Length is useful in the table of contents file that you will create.

When you transferred the information from Audio Position to End Length you should have noticed that the portion of the audio that you just listened to became highlighted in dark grey. If you don't want to keep the track, you can press the delete key and make the track audio data disappear. You may have to reset the Selection Start time display, as you have modified the length and start position of the file. If you delete a track by accident, don't worry -- Audacity has a multilevel undo feature. Press Ctrl-Z or select Edit -> Undo. Should you want to save the track as an MP3 file, select File -> Export Selection and choose MP3 as the file type. You should be prompted for track information for ID3 tagging. Input the information and save the file.

To continue making track time notations, transfer the time information that you gained from the previous track to the appropriate time display to begin again. For example, if the previous track ended at 00:02:48+09, then transfer that information to Selection Start and begin playing. When the second track is through, press pause and make note of the End and Length times and repeat the process for all the tracks.

If you want a utility to do all of the track splitting, look into GramoFile. It has the ability to calculate the separations between track and output the information to a file. However, it saves its information in HH:MM:SS.MSECs, so you will have to convert between msecs and frames. This isn't too hard, since frames are 1/75 of a second or 13.3msecs -- e.g. 400msecs is 30frames -- but it is a time-consuming step. Also, GramoFile uses a root mean square calculation to find the silences that indicate track splits, and it is not perfect. On the test file that I used to write this article, GramoFile found only three tracks, not the four that I actually recorded. It can be tuned, but that too may take some time.

If all you want is MP3 files, you can quit now -- you're done. If you want to create a CD, however, you should export your audio to a .wav file by using the same method as the MP3 export, except this time select WAV. If you are prompted to enter information about the audio data, ignore it; in a .wav file, it doesn't matter.

Once you have all of the information about the audio data collected and have exported the file to WAV format, you can write it to a CD. First, create a table of contents. In the following example, you will see that there are four tracks that make reference to a .wav file with time notations that specify where each track begins and how long the track is. CD_DA specifies that this is a Compact Disk Digital Audio disk, and TRACK AUDIO specifies that this is an audio track and not a data track as is possible on multi-session disks. (If you wanted a multi-session disk, you would replace CD_DA with CD_ROM_XA. There are many other track types available and they depend on the type of data that you are writing in addition to the audio files.)

CD_DA //Track 1 TRACK AUDIO FILE "footloose.wav" 00:00:00 03:45:37 //Track 2 TRACK AUDIO FILE "footloose.wav" 03:45:38 04:22:38 TRACK AUDIO FILE "footloose.wav" 08:08:02 03:46:53 TRACK AUDIO FILE "footloose.wav" 11:54:54 05:41:36

This is the simplest type of file that you can create for making a music CD. Cdrdao is a powerful program that allows you to include a great deal of information about the disk in text form, but for now, just use this example as a template. Replace the name of the .wav file with your own, and replace the start and length times with those that you gained from working with the audio data. To make things easier on yourself, you might also make use comments by placing // in front of any such documentation. These can be placed anywhere and will comment out anything behind them to the end of the line.

When you are finished creating your file, burning is all that remains. Since modern kernels use SCSI emulation for CD burning, you can run the command cdrecord --scanbus in a terminal to find your CD burner. You should see a list that shows all SCSI or SCSI-emulated devices attached to your system. If there is more than one CD drive attached, the simplest option is to simply try to burn a CD in both drives. If a drive cannot burn a disk, cdrdao will just error out; if not, you will have a new music CD when you are done. The list will indicate the SCSI ID for the CD drive(s) in question. Make a note of the three-digit numbers delimited with commas, as you will need these for burning with cdrdao. When you have that information, run sudo cdrdao write --device 0,0,0 your_toc_file, replacing 0,0,0 with the three digits that you gained from cdrecord, and your_toc_file with the name of the file that you entered your TOC information in. If the command errors out, you may have tried to burn to a non-burnable drive, or you may have a typo in your TOC file. Make sure that the case in the file names in the TOC file matches the file names on disk. If there are no errors, in a few minutes you should have a new audio CD.

Audacity has many options for filtering, effects, and analysis, yet it is easy to use and, thanks to its its multilevel undo, very forgiving of mistakes. Cdrdao is also powerful and forgiving of mistakes, though it is not as easy to use. Both programs are good to know if you have a pile of vinyl you want to bring into the digital age.

David Pendell has been working with computers for the last 23 years in a variety of capacities, including for programming and audio and video processing. He has been using Linux since Red Hat 5.1 and has used a variety of distros.

Share    Print    Comments   

Comments

on Vinyl + Audacity = MP3

Note: Comments are owned by the poster. We are not responsible for their content.

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 81.178.37.160] on October 20, 2008 08:20 PM
I have been using a setup of Audacity and Ubuntu to record my extensive collection from my Technics SL1210 turntable via my Numark mixer. I had experimented with different eq settings but found that the recordings either distorted or were too tinny to use whilst playing. After experimenting with different volumes and eq settings I found that zeroing all eq settings and putting the input and output volumes up to full gave me a good level to record with.

Once recorded I save the recording to wav and then begin the chopping. To chop I simply create a new label track and then navigate to the start/end positions of a track and hit ctrl-b to create a label. I label the tracks in the format "trackno. Artist - title" so that they are in order when exported. Then I go to File > export multiple and use that to export each track to a wav file.

Once that Is done I use a bash script to convert the exported files to flac and also to mp3 with id3 tags.

#

Re: Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 74.93.36.22] on October 20, 2008 09:39 PM
I created MP3s from a collection of old tapes as well, but I seperated the tracks by hand. Thanks for the article.

#

Re: Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 65.25.150.64] on October 21, 2008 03:15 AM
Audacity has an option to "Show Clipping". It will draw a vertical red line through any sample that hits a positive or negative maximum. If you're getting a lot of those, back off the input level a tad and restart your recording. An excess of clipping sounds plain awful. I won't tolerate more than a few single sample clips on an entire LP side. Note: If you use the Normalize effect, you will get at least one red clip line. Normalize finds the difference between the loudest sample in the recording and the maximum signal level and adds that to each sample. I always do that as as a final step after any pop/click removal or other cleanups but it isn't a substitute for having good signal in the first place. Especially when you are recording with 16 bit consumer gear and need every bit of dynamic range you can get.

I also take issue with the advice to record in 24 bit. Unless you've splurged on a spendy prosumer or pro audio card, you aren't going to actually capture at 24 bits. At best, Audacity will just upsample the recording. That isn't a bad thing necessarily if you intend to run a lot of filters on the audio but it won't turn a cheapo 16 bit audio card into a 24 bit one and if you want to avoid aliasing due to running filters then I'd just upsample manually after capturing at whatever the card can actually do. Of course, if you actually have a 24 bit card then do it. With dynamic range like that, you can afford to not have to back off the input volume due to clipping. Just set a level that is consistently more than 16 bit then normalize and downsample to 16 bits when all other processing or cleanup is done.

#

What about RIAA equalization?

Posted by: Anonymous [ip: 97.88.203.140] on October 20, 2008 08:49 PM
When I tried to record directly from my turntable, the results sounded awful, but when I played the record through my stereo, it sounded fine.

I turns out that that records are recorded with RIAA equalization, and a phono preamp reverses it back to normal. When you bypass the preamp, you hear the highly EQ'ed version instead.

Is there an de-RIAA filter?

#

Re: What about RIAA equalization?

Posted by: Anonymous [ip: 198.16.3.247] on October 21, 2008 12:34 PM
you should always use RIAA eq to record from a turntable. hopefully you have a receiver or intergrated amp that has a "tape monitor" or "preamp out". and to the writer of the original article, LP's are audio perfection, after all sound is analog.

#

Re: What about RIAA equalization?

Posted by: Anonymous [ip: 85.154.167.111] on October 21, 2008 02:49 PM
It appears from this link http://audacityteam.org/forum/viewtopic.php?f=17&t=3097, that there is a software RIAA equalization effect which can be applied after the recording has been made. However, looking at the forum, the general opinion is that a hardware pre-amp which includes RIAA equalization offers a higher quality result.

Dawson

#

Xitel INPORT

Posted by: Anonymous [ip: 65.25.150.64] on October 21, 2008 03:20 AM
The Xitel INPORT isn't the only USB audio option. There are USB audio devices that work just fine with the USB audio class driver in the Linux kernel. I have a Creative MP3+ that Just Works with the Ubuntu desktop I'm running and there are others.

Its tacky to recommend such a device on a Linux site when there are similar devices that will work natively under Linux. And yes, having the digitization occur outside of an electronically noisy PC is a Good Thing.

#

Vinyl + Audacity = OGG

Posted by: Anonymous [ip: 91.201.80.240] on October 21, 2008 06:51 AM
Since we're talking about free software here, why not export to OGG instead of MP3? :-)

#

Re: Vinyl + Audacity = OGG

Posted by: Anonymous [ip: 62.49.188.193] on October 21, 2008 09:29 AM
The reason I go for mp3 and not OGG is that .ogg files don't play on either my Creative MP3 player or on my car mp3 player.

#

Vinyl + Audacity = MP3

Posted by: Marc on October 21, 2008 11:18 AM
Great! Thanks for the post. I will try this soon. Can Audacity also get rid of the crackles that come with old records? Or is there any other tool that can get rid of those? Although the crackles have a certain charm when playing a record it wouldn't quite sound right on an mp3 player...

#

mp3splt

Posted by: Anonymous [ip: 139.153.15.17] on October 21, 2008 11:20 AM
For automated splitting (if all you want is MP3 files) I recommend mp3splt over gramofile.
Save your entire album as a single mp3 then get mp3splt to split it up using silence detection. It first detects the silences, creates a log of where they are, then uses that log to split the file. If the results are not quite what you'd expect (ie, a silence missed, or a mid-track silence hit) you can edit the log file to add and remove splits. You can then re-run mp3splt using the log.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 216.58.12.253] on October 21, 2008 01:06 PM
To remove the snap, crackles and pops that come with damaged vinyl's, I do two things.
First I wash, yes, wash my records with a very gentle soap, like Downy or similar product. I then generously rinse with demineralized or distilled water, lots of it to ensure proper removal of any soap, dirt and dust. I use a lint free cloth for each process of washing, rinsing and drying, never the same for each process. Finally, once dry, I have a professional turn table that I got in the early 70's but I'm sure a Radio-Shack will do fine with a fresh needle for every 10 records I re-record.

Finally to remove those snap, crackles and pops with GWC or Gnome Wave Cleaner software. Caviat, it only works with wav files, not MP3 or OGG or otherwise.

Results, I took an old 60's record from the group "IronButterfly", did the above and voila, almost brand new and now in OGG format to play on my OGG (Samsung) device.

Cheers.

#

UK Service available?

Posted by: Anonymous [ip: 136.19.94.230] on October 21, 2008 01:21 PM
Are there any UK based companies that could convert a library of 4000 cassette tapes (recordings of religious talks) to MP3 for a reasonable charge? I can do it with Audacity, but it will take me ages! Contact mdbarton at blueyonder dot co dot uk.

#

Re: UK Service available?

Posted by: Anonymous [ip: 67.45.55.77] on October 21, 2008 08:35 PM
If you can't find someone to convert your tapes, there may be a simpler and quicker way than Audacity. KHdRecord (http://software.jodda.de/) is free, and records your inputs directly to mp3 files.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 72.23.204.226] on October 21, 2008 04:12 PM
There is an RIAA filter (and several other old-recording filters) built into Audacity, I forget where I saw it. Probably just as a preset on one of the EQ tools.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 12.46.139.200] on October 21, 2008 05:11 PM
nice article. also as a side... if you want better audio, ION makes a digital turntable that has USB hookups for you pc. I think they run about $99.

#

Re: Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 12.46.139.200] on October 21, 2008 05:13 PM
oops, other brands also make digital turntables... like Stanton and Numark. The ION seems to be the cheapest though.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 64.72.200.5] on October 21, 2008 07:24 PM
Or if you don't want to sit there while the record/tape plays you can use rezound to capture the songs. It allows you to set time limits for the record time so that it won't fill up the computer with trash if you forget about the recording process.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 67.45.55.77] on October 21, 2008 08:39 PM
I agree that an external preamp is the better way to correct for the RIAA curve. But if you take that route, I think there's a better way available than Audacity. KHdRecord (http://software.jodda.de/) lets you capture audio directly into mp3 files. It does not, however, include an editing feature.

I use Audacity a lot when I want to edit audio. But if all I want to do is capture it to an mp3 file, I use KhdRecord.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 198.199.154.250] on October 21, 2008 09:30 PM
NO NO NO

Using the mic input on your laptop is a big NO NO, formula for sheety sound and if your laptop is not equipped with an Aux Input then go USB or Firewire or use a desktop souncard instead if you want listenable clips

Either use a USB RIAA Preamp directly from turntable directly to your lap/pc

or

Use any good quality Stereo Receivers Tape/Line RCA out's to your PC Soundcard/Laptops Aux Input using the RCA to 1/8" TRS Cable from Radio Shack.

From there you can use any Application that allows you to choose the Input Path i.e. your Sound Mixer/Sound Cards Aux In.

I use Musicmatch Juke 10, I saved the install after Yahoo ended what was one of the best Jukes with its selectable input mixer etc.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 139.188.130.221] on October 21, 2008 09:44 PM
Quite a few comments regarding pop removal, track separation and conversion to compressed formats (MP3, OGG, etc). Audacity does all these things. The tools menu is a good place to explore - there is stuff like bass boost, normalisation, rumble and pop removal that are invaluable when recording analogue sources.
As mentioned in one of the posts above the best way of splitting the recording is to add a label track, type the track name at the start point of each track (using CTRL-B), then use export multiple to feed out the whole recording as separate tracks. One glitch is that all the ID-tag information doesn't always roll forward across all the tracks, but these can be backfilled afterwards.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 68.50.89.120] on October 21, 2008 11:21 PM
I've been recording tapes and records to my linux box recently, and I have had good results using a Sony DMC-DA1 dv converter box. While the minus side is that you record everything as dv and have to take the sound out, the plus side is that you don't really need a preamp and you can use the equipment you already use to play the media.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 75.108.44.39] on October 22, 2008 07:59 PM
I agree with the poster above. Do NOT use the the mic jack on your laptop. On my laptop
the resulting sound was vomit inducing. My cheap Creative mp3 usb card works very well.

turntable/old hafler preamp/creative mp3 usb soundcard.

I use Rezound (Audacity is fine also) to record the lp to a wav file. I then use wavbreaker
http://wavbreaker.sourceforge.net/ to split the tracks. It's easy to use and does a great job.
Wavbreaker will even export your project to a .toc file for use with cdrdao.

I then make an audio cd for the car, convert the wavs to flac to archive, and finally, make
some oggs for my rockboxed sansa.

If you have a huge lp collection, you should think about a new stylus ( or cartridge ) and
maybe a VPI lp cleaner (!).

With records that have been well cared for, the sound can be very good.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 87.221.151.5] on October 22, 2008 09:41 PM
...or just get a copy of eMule and download them.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 76.7.4.227] on October 23, 2008 04:38 PM
I have a question about Audacity. I run SUSE, UBUNTU and Windows XP. When I use the Linux side of my computer I would like to know how to remove turntable hum. I use the lowpass filter and it seems to work all right but is there a better way? I found that "Spin It Again" will work on Linux running under WINE. I use it to sort out the tracks. It will also record records without any problems. This makes it a lot easier as "Spin It Again" will also label each track for you by typing it in. I also use Classic Equalizer, which is a free VST program, to bring out some highs and lows depending on the recorded album. "Spin It Again" also has a noise and pop&click remover with it.

If anyone can help me with the hum problem I would appreciate an answer as I would like to Audacity to clean up the old record before using "Spin It Again" to encode and break up the tracks.

Thanks for any help.

Also you might give "Spin It Again" a try. It works well under WINE.

#

Vinyl + Audacity = MP3

Posted by: Anonymous [ip: 80.169.182.163] on October 24, 2008 08:45 AM
Personally I'm born in 77 and I have about 300 vinyl records (including 7''s) but my partner is born in 86 and have collected way more than that. It's not a "vinyl has warmer sound!!1" thing either, we just like the feel of vinyl records better. The larger covers, included posters and so on. When you buy an LP you feel that you buy a record, not just a piece of plastic. After buying the vinyl I get an MP3 version "from the net" which become the version I listen to most anyway.

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya