Two words for you: car stereo. "Ruby," our 2004 Subaru, has a CD player but no mp3 player and no aux input jack. The other thing about the car stereo is that, unlike an iPod, you can't leave it on a bench somewhere. If you're in the car, the car stereo's there.
All-righty then. A search on "twelfth night audio" (no quotes) led me to LibriVox site and the download page for King Lear, which you see at right. As you can see, the play runs about 3½ hours, and there are five mp3 files, one per act.
So far so good, but there are two issues we want to deal with. First, a music CD holds what, 65 or 70 minutes, right? Notice the duration of the various parts of the play:
- Act 1 – 00:53:42
- Act 2 – 00:38:56
- Act 3 – 00:38:38
- Act 4 – 00:42:54
- Act 5 – 00:28:52
So that's the first issue. The second issue is, if the CD's in the car stereo and somebody wants to change the CD, then how can you recover your place? If one track is 28 or 42 or 53 minutes long, it's rather a pain. So we want to have track divisions at maybe 10-minute intervals.
So here's what we're gonna do. First, change each mp3 file into a "wav" file. For this, we'll use "lame" (meaning "lame ain't no mp3 encoder"). Then we'll use the compact "snd" together with "sox" to split the "wav" files into 10-minute pieces. The plan then would be to put these onto CDs as follows:
- Act 1 + 12 minutes of act 2
- about 27 minutes of act2 + act 3
- acts 4 and 5
lame --decode Downloads/king_lear_1_shakespeare.mp3 /tmp/k1.wav
and so on for the other 4 files.
Next, we want to divide each of these into (about) ten-minute segments. Where exactly do we divide them, and how? To answer the "where" we'll use snd. You may want to use something else, but "snd" works for me. In the image at left, you can see what looks like a pretty quiet spot about 612 seconds in. The x-axis shows just 611.0 and 613.0 and a bunch of tick-marks; you have to interpolate... well, or you can position the cursor and click, and you'll get a little number near the lower-left corner; you can see it if you enlarge the image -- "612.5030" -- let's just call it 612.5. We'll look for quiet spots around 1200 seconds in, 1800 seconds in, etc., and break the ".wav" file at those points.
But one thing at a time. Given the first break-point, at 612.5 seconds, I type:
sox /tmp/k1.wav -c 2 Desktop/k1.1.wav trim 0 =10:12.5
which is explained as
the program name.
the input file
Make the output have two channels (stereo) as CDs have
the output file
trim 0 =10:12.5
Trim 0 off the front, and everything past 10:12.5 (612.5 seconds) from the start.
sox /tmp/k1.wav -c 2 Desktop/k1.2.wav trim 10:12.5 =20:06.2
and so on for the rest of the 53-minute act. Here are the files for Act I:
collin@p3:/mnt/home/collin> ls -o /tmp/k1.wav; ls -o Desktop/k1.*.wav -rw-r--r-- 1 collin 284258442 2012-01-23 20:30 /tmp/k1.wav -rw-r--r-- 1 collin 108045044 2012-01-23 20:48 Desktop/k1.1.wav -rw-r--r-- 1 collin 104728724 2012-01-27 21:08 Desktop/k1.2.wav -rw-r--r-- 1 collin 107039564 2012-01-27 21:18 Desktop/k1.3.wav -rw-r--r-- 1 collin 103723244 2012-01-27 21:19 Desktop/k1.4.wav -rw-r--r-- 1 collin 85906844 2012-01-27 21:20 Desktop/k1.5.wav -rw-r--r-- 1 collin 59073640 2012-01-27 21:20 Desktop/k1.6.wavYou may wonder why it is that the six files come to about 56 Mbytes whereas the original /tmp/k1.wav was closer to 28 Mbytes; it's because the output files are stereo, which I think we need for recording on CDs.
I do the same with the rest of King Lear's ".wav" files, aiming for 66 minutes (my guess for how much will fit on a blank CD) on each. The last CD has over 70 minutes, but it still just might fit -- I'm finding out now.
For actually burning the CDs, well, my CD-writer is broken, so I'm using a mac mini, which belongs to the lovely Carol. It's pretty easy to do on a Mac using iTunes (we are running OS X 10.6). Here are the steps:
- File → Add to Library
then select the files (in this case
- Select 65-70(?) minutes' worth of tracks, then File → New playlist from selection
Then name each playlist
- right-click on a playlist and "burn CD from playlist"
- get free MP3 files from librivox (or wherever);
- convert to 44.1khz stereo WAV files using
- Separate into tracks (if needed) using
- import into iTunes
- create iTunes playlists
- burn CD image using iTunes