| Getting Started with Linux - Lesson 18 |
|---|
Compact Disks
I love the scene in the Adam Sandler movie The Wedding
Singer where the Yuppie junk bond trader Glenn Gulia, brings one
of the first CD players home to his fiancée; Julia, played by
Drew Barrymore. Gulia exclaims: "It's a CD player- it cost 800
bucks, but the sound quality is excellent!" I remember those
days in 1980's when I heard my first CD and was amazed - no scratches-
no hiss. The CD, as promised, ousted the LP record forever. Not soon
after the release of CDs and CD players, records disappeared from all
but collector's shops. Luckily, CD players didn't stay around 800 US
dollars for long.
Soon software companies realized the potential for data storage in
these little plastic disks and the CD-ROM market was born. From about 1992 on
the use of CDs in computers increased exponentially. Now, almost 10 years
later, we're not only talking about reading CDs but writing to them with CD-RW
drives that cost under 200 US dollars. A spin-off of the CD, the DVD (Digital
Video Disk) is becoming more and more popular everyday. Soon we will have
affordable drives for home use that write to these disks as well.
Linux has never been behind in supporting these types of media, so we'll
show you some of the utilities out there for playing and ripping tracks from CDs.
Playing CDs
As I pointed out earlier in the lesson on sound, I like to use command line
programs to play CDs. My favorite one and I think the one that's easiest to
manage is tcd by Tim Gerla
You can control which tracks to play, adjust the volume, eject the CD and
do other things all from the keyboard. You can use 'tcd' to keep a database of
your CDs for easy playing. Under X-window, you can fire up this baby in an
x-term and enjoy hours of listening pleasure.
GUI based CD players are plentiful as well, and when you've installed and
configured your X-window system, you can try out those as well.
Ripping CD tracks
The whole Napster phenomenon, as I pointed out at the beginning of this
article, made the practice of converting songs on CDs "ripping as it is
also called" very popular. Here we're going to talk about one of the most
widely used programs in the Linux world. The official position of this author
is that ripping tracks from one's own CDs for personal use is OK by me (and the
law, it would seem). For example, ripping your favorite songs and converting
them to Ogg format to make it comfortable to play your favorite songs from your
desktop doesn't entail you venturing into legal gray zones. If you shared them
however, that's a different story. So, if you're interested in ripping tracks
from CDs, the Linux program par excelence for doing that is cdparanoia .
cdparanoia is billed as a ripping tool for CD-drives that could be
problematic. It seems to work fairly well on the variety of speed drives that I
have tried except for a couple of ancient ones. It's available for download from the same
people who bring you Ogg Vorbis. Here's how it works:
Let's say you wanted to rip track (song) 6 from a CD. You
would place the CD in the drive (I have forgotten that on occasion - duh) and
type:
cdparanoia -- "6"
The output would look something like this:
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty and Xiphophorus
Report bugs to paranoia@xiph.org
http://www.xiph.org/paranoia/
Ripping from sector 48423 (track 6 [0:00.00])
to sector 58677 (track 6 [2:16.54])
outputting to cdda.wav
(== PROGRESS == [ > | 050085 00 ] == :-) . ==)
So now you have track 6, called 'cdda.wav' (cdda stands for Compact Disk
Digital Audio, by the way) ready to be converted into your favorite compressed
format, like Ogg. Here's a refresher. To convert your ripped track to Ogg, type
this: (change it to your info)
oggenc -b 192 -a "The_Rubber_Band" -l "Gummed Up" -t "shes_elastic" cdda.wav -n "%a_%t.ogg"
Now you have a nice Ogg file that you can play with ogg123
Other options for ripping tracks with cdparanoia include:
cdparanoia -B
This will rip the whole CD into separate tracks, named track01.cdda.wav,
track02.cdda.wav, track03.cdda.wav etc.
cdparanoia cdparanoia -B -- "-5"
This will rip tracks up to and including track 5 into separate
*.wav files. If you want one big file, just eliminate the -B
option. Do not forget to type the double hyphens -- before
track numbers. Just to finish off, here's an interesting combination:
cdparanoia -- "4[:45]-4[2:15]"
The above example will rip track 4 starting at 45 seconds and end at 2
minutes 15 seconds into the same track. Why would you want to do this? A number
of reasons - you only like the awesome lead guitar part of a song? That could
be. Anyway, the manual page (type: man cdparanoia) is a particularly
well-explained one, so if you want more examples, there's a good source of
information there.
Well, that concludes our lesson on sound. You should be able to listen to,
create and manipulate sound with Linux.
[Previous] [Next]
|