news.samba.org

Jeremy Allison Column Archives

The Low Point — a View from the Valley — Column 4

The Magic Machine

This month I finally understood, I finally got what all the fuss is about. OK, I can be slow sometimes, but this month I finally understood the real power of a digital computer. It happened by accident, as such things often do, when I was involved in doing something else (in the same way all my best programming ideas occur in the shower).

Back in the early 80's I used to be quite a fan of a particular brand of teenage angst music from a band called "the The". Fan enough to lose all my fear of being the only person on the dance floor when my favorite song was being played (and in the North of England that's a scary thing for a single bloke to do :-) ). I've ended up out here in California with several twelve-inch "the The" vinyl singles and not even a record player (anyone remember them ? You kids, get off my lawn...) to play them on.

Even though it's not "Free Software" I'm a big fan of Skype for Internet telephony. It saves a lot on transatlantic calls (and even though they're cheaper over here it can still mount up) but the sound quality of most PC sound cards is awful. I fixed this by getting a USB sound card (a Griffin iMIC from the Mac section of the computer store, if you must know). Plugs into a spare USB port and a 2.6 Linux kernel recognizes and initializes it immediately. Instant improvement on my Skype phone calls. But as I opened it, a small white lead containing a lead between a microphone socket and two phono jacks fell out. Reading the manual I learned the USB sound card could be used to digitize the output from analog devices ("like a record player !", I thought) into CD quality sound.

A quick trip to Fry's (if you ever visit Silicon Valley, schedule one whole day for a trip to Fry's electronics store. You'll be in geek heaven; they even have a Mayan Temple themed store *) and $99 later I had the only model of record player that they still sold. Probably in five years time it'll be just as hard to find a video player. I connected it up, put on my "Perfect Day" single and got ready to make my own CD's.

What took me longer than any of the physical set-up was working out the right command to use on Linux to capture the sound (I'll save everyone the trouble :

/usr/bin/rec -d /dev/dsp1 -c 2 -r 44100 -w output_file.wav

is what you need to create a .wav file suitable for burning onto a CD). In order for "Linux for the masses" to take off we have to fix problems like this. Getting ALSA sound working correctly on Linux is a nightmare, but that'll have to be for another column. An hour or so later I had enough files to make myself a "teen angst mix" CD, with music I hadn't heard for at least 15 years (some of it was pretty bad, wasn't it :-) ). The problem was they were old records. I'd played them a lot in the 80's. They had a lot of scratches, and every one of them was jarring to my CD educated ears. "I must be able to fix that", I thought.

Enter a Free Software application called "audacity". It took me less than five minutes on the Web to find it, download and install it (thank goodness for modern Linux install methods) and I discovered to my delight I could edit individual sound samples from the file and remove the scratches by hand. Finally I had a perfect quality CD of music that was previously only available on an almost extinct medium. Don't get me wrong, I'm not particularly cheap, I would have just ordered the CD online if that music had been available anywhere, but it wasn't.

Then it struck me. I had made my own CD. Add a bit of home made artwork and I had something that the record industry would have sold me for $20. It wasn't my music, so I was just converting the format from analog to digital and I wasn't going to sell it to anyone else but that wasn't the point. Convert anything currently in analog format into a bitstream and I have all the tools on my sub-$1000 PC to do anything I want to that data. We've all got dirt cheap hard disks that can hold thousands of audio files and hundreds of video files, and god knows how many hundreds of thousands of photos. All digital, all just bitstreams, all ours to manipulate as we will. Combine this with the Internet and I have a distribution mechanism for any bitstream I can create or manipulate and transform on my desktop machine. All with Free Software.

I got it. This is why the record and movie industries are in a panic. This is why they are desperately pushing "Digital Rights Management" into every electronic device they control. Their control over what they derogatively call "content" and is really "creativity" is gone. All their talk about closing "the analog hole" is about preventing people like us from buying a USB sound card. But how can a sound card distinguish between use of digitizing speech for Internet telephony and digitizing music ? It can't. We all experience the world in analog form though our senses. Human beings can't experience bitstreams, we have to have digital to analog conversion. We are "the analog hole" and so it cannot be closed. There will always be ways to generate digital bitstreams from analog outputs that circumvent "content" controls.

I'm off to Fry's to buy a video capture card. There are many old PAL format Video tapes I have that haven't been released on US format DVD yet and I think I'll start to experiment with the "transcode" Free Software that's been sitting unused in my Linux distribution for far too long.

"Oh What a Perfect Day-i-ay-ay-ay..." (with apologies to "the The" :-) ).

* I know this part sounds like a "Jerry Pournelle" column and I apologize for that, but no one ever gives me any hardware so I'm not trying to sell you anything :-) .