They Might Be Finished!

I‘ve been working here and there on setting up a Linux based Dial-A-Song answering machine for They Might Be Giants. I promised it to them in April, really buckled down in October, and I’m finally (almost) done today. If you want to follow the saga read my previous posts explaining the project and detailing some of the issues.
I did finally find a voice modem that works with vgetty – an old US Robotics external Voice/Fax/Data modem. After some trial and error I discovered that if I resampled the MP3s to 16-bit, 8Khz, mono sound files they’d work with the modem. It was such a thrill to dial up and hear a TMBG song on the other end.

The basics of the shell script follow – minus the extensive error checking code. If an error occurs anywhere (no CD, can’t read the disc, etc.), the script falls back to a default message stored on the hard drive.

#! /bin/bash
# -----------------------------------------------------------
# newsong - Leo Laporte, April-December 2003
# -----------------------------------------------------------
# this shell script is designed to be run hourly by cron
# it pulls a random MP3 off a CD in drive, combines it with the
# outgoing message (message.mp3) on the same disc, then
# converts it to the appropriate RMD format and moves it
# into the outgoing message directory for vgetty
# requires:
# pickrandom - a perl script to pick a random song
# SoX for the MP3 to WAV conversion
# vgetty's PVF utilities to convert the WAV to RMD
# Written for They Might Be Giants Dial-A-Song
# -----------------------------------------------------------

cd /var/spool/voice/work/
touch /var/spool/voice/work/startrun

# mount CD
mount /dev/cdrom /mnt/cdrom
ls /mnt/cdrom/*.mp3 >/var/spool/voice/work/files

# call an external perl script to select a random title from files
echo "$tune" >currentsong.txt
cp -f "$tune" tune.mp3
cp -f /mnt/cdrom/*message.mp3 message.mp3

# convert the MP3s to raw audio (signed, 16-bit, 8khz, mono)...
sox -V tune.mp3 -s -w -r 8000 -c 1 tune.raw
sox -V message.mp3 -s -w -r 8000 -c 1 message.raw

# combine the raw files...
cat message.raw >>tune.raw

# convert to RMD via SoX and PVF tools...
sox -V -s -w -r 8000 -c 1 tune.raw -s -w -r 8000 -c 1 standard.wav
wavtopvf -16 standard.wav standard.pvf
pvftormd US_Robotics 1 standard.pvf standard.rmd

# copy converted file to messages directory...
mv -f standard.rmd /var/spool/voice/messages/standard.rmd

touch /var/spool/voice/work/endrun

The little randomizing perl script:

# picks a random song from the file list
my $tune;
open(TUNES, "files") or die 1;
do {
rand($.) < 1 && ($tune = $_) while ;
} until $tune !=~ /message.mp3/i ;
print $tune;
exit 0;

A cron job will run the script hourly. I’ve been running it every ten minutes for several days and it’s been working without a hitch. (Here’s a cool little cron feature I’ve not used before. If you define a MAILTO environment variable in the crontab, cron will mail the output of each job to that address every time it runs. I’ve added MAILTO=root to the crontab, and now I can use pine to check the results of each run. Very handy for checking up on problems after the fact. )

Since this is a headless machine I’m planning to add audio error messages using pre-recorded WAVs on the hard drive. That way John can tell how the thing is working just by turning up the speaker.

We’re ordering the parts and plan to build the machine this week. I’m going to put it in a small case with a Celeron, small hard drive, and 256MB RAM. It’ll probably run SuSE Linux – my current favorite. Total cost well under $500. I’ll set it up so that I can SSH into the box if something goes wrong, but it won’t normally be connected to the network.

John and John live in Brooklyn so Joshua Brentano and I are hoping to fly out and deliver this to them for Christmas. With any luck it will run without maintenance for years.

Dork Farewell

It’s good-bye to Megan Morrone on a very special Dork Tower.
Megan, of course, has blogged all about her departure from TechTV. But don’t worry – I’m planning to keep her very busy working on books and some other stuff. You haven’t seen the last of her! Mwahahahhahha!


Patrick and I are having a blast, as usual, meeting fans at the Lenox Square Mall in Atlanta. We stayed four hours signing autographs with Michaela Pereira. I’m told we met 273 people. We usually get to more but we took our time today. We’ll have to work a little faster tomorrow; we both have planes to catch so we’ll be leaving at 3p sharp. Come early – they’ll probably cut off the line by 2pm.
I needed a little escapism after watching the Giants season end so suddenly this afternoon. Fortunately, Patrick and I had picked up copies of Neal Stephenson’s newest book, Quicksilver, at the airport bookstore. We were both big fans of Snow Crash and Stephenson’s last, Cryptonomicon, and couldn’t wait to get our hands on this one.

It’s very good, but very different from Neal’s previous works. It’s definitely not sci-fi. So far it takes place in the time span between 1655 and 1713 and deals with the birth of modern science. We meet Ben Franklin and Isaac Newton as children and see the earliest days of the “Massachusetts Bay Colony Institute of Technologickal Arts,” already home to investigations of computing machinery and far in advance of its neighbor, Harvard College, whose dons are still stuck in the scholasticism of the Dark Ages. We also meet the author of the original Cryptonomicon. But that’s only in the first hundred or so pages. I’ve still got 800 pages to go, and it’s just the first book in the three-volume “Baroque Cycle,” so who knows where we’ll end up. So far it’s a great read, though, and best of all… there wasn’t any baseball in the 18th century.

TechTV Themes

Thanks to Darryl Harris who sent me this lovely autumnal Screen Savers wallpaper. Click the thumbnail to get the full size image then save as wallpaper.

Incidentally, we’ve posted high quality copies of the original on The Screen Savers web site.

The TechTV wallpaper for PocketPC that Patrick showed you yesterday is available from PocketPC Themes. There’s another one here. Thanks Foo Fighter!

(Yes, Patrick did show my cell phone number on the air when he showed you the theme. Thanks for all the messages!)

Balto Blog: Crabby Friday

I’m also capturing a little video on the trip using my Olympus C-3040 digital camera. These are Quicktime movies encoded in MPEG-4. If you haven’t installed Quicktime 6 you will be prompted to do so. They should stream well even on a 40 kbps connection. On Friday, Mario Armstrong, the mayor’s Technology Liaison, took us on a tech tour of Baltimore, which included a visit to Bo Brooks, the classic Maryland crab house. Here Johanna Hall and Jennifer Crist from Affiliate Relations teach me how to eat a crab while producer Ken Marquis looks on:
Eatin’ Crabs

Later in the day Ken and I went to the DC bureau so that I could be a part of the fun during the Mitnick-Wozniak version of The Screen Savers. There we met with Peter Barnes and Gary Nurenberg. We also got a gymnastics demonstration from producer Alina Mesenbourg:

Perfect 10

Then Gary and Alina took us up to the bureau’s roof for the live shot. They have a beautiful view of DC from up there with the White House and Washington monument as a backdrop. You are supposed to call the White House when you go outside, however, so the snipers on the roof won’t pick you off. We forgot to call, but fortunately, no one shot at us:

White House View

A great day in Baltimore, despite the rain. Saturday dawned clear and bright and I’m getting ready for a trip to Arundel Mills for our first appearance. We’re hoping to take in an Os game at Camden Yards tonight.

Seattle XP

We had a great time in Seattle. I flew in on Friday, taped a piece on Tacoma, the self-proclaimed “America’s Number 1 Wired City.” Then we did a show to tape on Saturday. The edited show will air on Friday, 10/19 and through the weekend. Uncle Paul’s museum, Experience Music Project, looked great. Wait til you see how Microsoft’s XBox looks on the wall sized screen behind us.
We had a capacity live audience of about 300, pretty good considering that the Mariners were playing at the same time. It was so fun doing the show with a live audience. I would love to do it that way every night. Thanks to everyone who came to the show.

The weather was awful. At the end of the piece I did in Tacoma there’s rain dripping off my nose and the lettering on my microphone is starting to run. It was cold too. All the natives said that we had just missed beautiful weather. Yeah right. They probably say that to all the geeks.

I flew back right after the show, so I didn’t have any time to see more of Seattle. But I have a feeling we’ll be back.

Next week I’m flying to NYC to do Live with Regis and Kelly. They’re doing a technology week. Bill Gates is on on Thursday 10/25 (XP day) and I’ll be on the next day, Friday 10/26. I’m going to show Regis a bunch of tech gadgets. Should be fun.

Quicktime VR of The Screen Savers studio

Here’s a Quicktime VR picture of the Screen Savers set from my point of view at home base. (You need Quicktime to view this. If I’ve coded this properly, Quicktime should load automatically, even if you haven’t installed it yet. The movie itself is about 1.4 megs so it may take some time to download it. Click on the picture and drag your mouse to move around in it. You can look up and down, too.)

Thanks to Alex Lindsay of dvGarage for taking the picture. You can read all about it on The Screen Savers web page.

(NOTE 7 Oct 2007: I’m trying to figure out when this is. This is the second Screen Savers set – Patrick Norton is already co-hosting, you can see his skateboard behind home base. We’re already moved to Studio B – making room for Tech Live I guess – but lots of pieces are still missing, including the LAN party set, the spiral staircase, and the audience risers. The “babe corral” isn’t finished yet either. The control room is visible behind it. You can also still see the old Money Machine set behind the cameras. This must have been very early on with the new set.)