| Getting Started with Linux - Lesson 18 |
|---|
My nostalgia project with Ogg Vorbis
To try out the capabilities of Ogg Vorbis and the capabilities of Linux in
general for manipulating sound I decided to convert to *.ogg format some old analog audio
recordings that I had of a "garage" band I was in during the
late 70's and early 80's. These were produced before the first CDs ever
appeared on the planet using 8 track reel to reel equipment in my best friend's
basement. Various cassettes were made of the original recordings and I
wanted to preserve them digitally. It also gave me the opportunity to outline
the procedure to use as a tutorial and to cowardly stay outside the realm of
copyright infringement issues. There are, I am sure, people using Linux
who grew up in a time when the letters CD only meant "certificate of deposit"
and who listened to vinyl records and audio cassette tapes. Some might have even
listened to 8 track tapes and are afraid to admit it. If you have stereo
equipment that has a turntable and/or audio cassette player with line-out
plugs, this tutorial may also be applied to the possibility of making copies of
records and tapes for yourself, which the law allows, if you own them.
How to digitally enshrine your past delusions of grandeur
Needed:
- One unsuccessful garage band of the 70's
- A cassette of music of rock star wanna-bes
- Audio cassette player with line-out plugs
- Cables to connect the player to your sound card
- optional - Medical insurance (in case you get ill listening to the music)
All sound cards have inputs for your speakers/headphones, a microphone and a
line-in cable (that is, the line-out from stereo equipment). Their function is either
color coded (speakers are usually green, microphone red and line-in blue) or
written on the metal bracket of the sound card. Plug the line-out of the
cassette player into the line-in input on the sound card. Usually, the
microphone is the default source for recording. You may have to fire up the
Alsa mixer and change this. Type:
alsamixer
then, using the arrow keys, make your way over to the line-in column and push
the space bar. That should activate your line in as the recording
source. It should look like this:
You can also adjust the sound with the up arrow.
Somewhat tarnished bronze oldies
Now, I put my cassette in the player and I was ready to go. I planned on
using the wavrec program I mentioned earlier in this lesson to convert
the analog tape audio to *.wav files, but I
discovered a slight problem. I didn't know the length of time the songs took to
play. Being your basically lazy system administrator type, I decided to try a
little trick. I figured that none of them could probably last longer than 5
minutes, so I typed the following:
wavrec -S -t 300 -s 44100 stairway_to_the_basement.wav
That meant that wavrec would continue to record for 300 seconds (ie 5
minutes). You can change that for however many seconds that you like. I sure
you remember the rest of the options from earlier parts of the lesson.
My plan consisted in pushing CRL + C when the song came to an end. At
first, I was afraid that would corrupt the data but when I tried it, it
worked. The first trial run sounded fine using wavplay. So I just
continued doing this:
wavrec -S -t 300 -s 44100 smoke_on_the_wafer.wav
and pushing CRL + C at the end. Soon I had all my songs converted to *.wav files.
Then came the time to convert them to *.ogg format.
Working with Oggenc
Then I used oggenc to get them this format. Here's an example with one song:
oggenc -b 192 -a "G-rage_Band" -l "Demo Tapes" -t "no_sympathy_for_the_neighbors"
no_sympathy_for_the_neighbors.wav -n "%a_%t.ogg"
Let's explain some of the options.
- -b stands for bitrate. Anything above 128 will give you good quality. I chose 192 here because this is fairly good quality without being excessively big.
- After the -a option you should put the artist (I use the term loosely in my case) in quotes.
- The -l option is for the name of the album. We never made an album, so I just put "demo tapes" as you can see.
- -t stands for track or the name of the song.
- Now, type the name of the song whatever.wav
- -n followed by "%a_%t.ogg" tells the program to name the Ogg file for the artist(%a) and the track (%t).
You've noticed that I have put underscores_between_words in true Unix
filename fashion. That's a good idea. (Demo Tape excepted - that's not going
into the file name)
That should create some files in Ogg format for you. One word of caution. Both MP3 and Ogg encoding is very CPU intensive. Make sure you're not doing anything that needs a lot of CPU cycles at the same time. If you're interested in seeing just how CPU intensive this is, just run the command: top and that will give you an idea.
Once again, if you've got some old tapes or old records and you want to make copies for yourself, here's a way to do it. There is software available to take the scratchy sounds from *.wav files made from LPs. There is good explanation of the process at uklinux.net.
Well, enjoy all those old cassettes and LPs and if you were once a neighborhood Rock and Roller, then try out the Ogg Vorbis tools and take a trip down memory lane.
[Previous] [Next]
|