Category Archives: Blogging

Where does Brainwagon belong?

A direct question from Ruth Meers at Bloggercon served to percolate a question that has been kicking around subliminally for quite some time.

What is your podcast (or more generally) your weblog about?

Brainwagon isn’t really a personal diary weblog. I do occasionally mention stuff about my personal life, but that isn’t the focus. I don’t write it especially for my friends, although some of them do get mentions from time to time. I don’t write it to pitch business ideas or find new jobs.

If that’s what this site is not, then what is it?

Have you ever wandered into somebody’s office and scanned the list of books on their shelves? Books naturally grab my eye, so I do it pretty much everytime I go into people’s office. Brainwagon is basically a way of giving you a glimpse into my office bookshelves. You aren’t going to find anything deeply personal here, but you are going to find the list of topics that I am interested in, at least to the point where I took the trouble to buy a book. If you see me posting about Mayan art, the Enigma machine, photography or whatever, you can be rest assured that somewhere there are some dead trees which I’ve been thumbing through lately to help fuel my understanding.

On my desk today, amidst the empty cups which previously held Diet coke, I counted six books:

  • The Physics of Baseball, which has been there since the Red Sox defeated the Yankees. A great book, incidently. Behind me is a copy of Ross’ The Mathematics of Baseball, much less interesting.
  • Meyer and Downing’s Java Virtual Machine. For some reason this was on the top of a big pile. It is one book I’ve never really found a good reason to read.
  • Advanced Renderman, by Apodcaca and Gritz, a nominally work related book.
  • Ken Steiglitz’s A Digital Signal Processing Primer, which I consider one of the best books on DSP around. I’ve read it about six times, and it finally is beginning to sink in more or less completely.
  • Jones and Flynn’s Mobile Robots. I have lots of books on robotics, but never built one. A pity.
  • Helen Fouché Gaines’ Cryptanalysis, a book no budding code breaker should be without.

Okay, so where am I going with this? Imagine trying to assign a particular category to the variety of books that are on my desk at the moment. Just what do you think that word would be?

Hacking WordPress…

I’ve been thinking for sometime that I should really try out the new development version of WordPress. I hacked some crude support for enclosures into my version, but I heard that there was some new code that is supposed to deal with it in the current version, so I thought I’d give it a try.

The way that I hacked the system was by the use of custom fields: basically I added two fields audiourl and audiolength, which if they were present in a posting would:

  • add the necessary enclosure tag to the RSS feed, and
  • add a link with the word “Enclosure” and the size to the posting so those without ipodder scripts could download the mp3 file

This worked fine, but was sub-optimal because it required me to type in the size of the audio enclosure itself. In the CVS version of WordPress, any link to an audio, video or image file is included in the feed as an enclosure, and the code in WordPress is smart enough to try to fetch the header for the requested item to get its Content-type and its Content-length, so that simplifies the overall process.

It took me only a few minutes to go back through my database using a python script and the MySQLdb package and issue the appropriate UPDATE SQL commands to switch one to the other. Et voila! It worked just fine.

While I was trying out the new version, I noticed that it loaded the index page much faster than mine. The key difference would seem to be the right column, and in particular the code that I got from Chaitgear for tracking referers. Digging in the code, found that it does a wasteful SELECT that probably fetches the entire list of referers. Putting a limit onto that query results in the same result, but operates much faster. That’s in place now.

If the CVS version of WordPress checks out, I’ll probably try to deploy it as soon as I can port my brainwagon “theme” over to it.

Brainwagon Radio: Digital Audio 101

Where your host tries to give a meaningful introduction into digital audio by explaining the basics of digital audio. Topics covered include:

  • What is sound?
  • What does your computer do when it records a digital audio file?
  • What does sample rate, sample size and bitrate mean?
  • The sound settings that I use to record these podcasts, namely:
    1. sample rate = 22050
    2. sample size = 16 bits
    3. I record in stereo (2 channels)
    4. I use a bitrate of 64kbps, which results in files which are 480Kbytes per minute

Anybody with any experience in digital recording will undoubtably be bored, but my lunch at Bloggercon gave some hint that this might be necessary.

Garageband closing music is Leigh Silver and the Bitter Things, playing Moody.

Bloggercon Post-Mortem

Where your host, refreshed by two ibuprofen and eight hours of sleep, replays his experience and impressions of Bloggercon.

Closing music from garageband.com:

Push: Don’t want to say goodbye

Errata: I said “Michael Scoble” on the podcast, he is of course Robert Scoble. Why is it that my brain can remember thousands of Simpson’s quotes verbatim, but fails on these rudimentary social tests?

Back from Bloggercon!

Well, I’m back after my full day at Bloggercon. Apologies for not trying to stick around and catch dinner with some of you folks: I was nursing a sinus headache by the end of the day, and still had an hour and a half drive to get home. I had a great time: expect a full post mortem tomorrow after I’ve had time to recoup some of my energy.

But just to keep some of the bullet points that I found most interesting:

  • I got a chance to say hi to lots of podcasters, including Dave Slusher, Adam Curry, Michael Geoghegan of the Reel Review podcast, and Dawn and Drew.
  • Lots of people noticed my Incredibles jacket, and I chatted a bit about my life at Pixar and why I’m interested in weblogging.
  • I was confused about just who the users were at this users’ conference.
  • I had some slighly illuminating thoughts on the idea of mobile weblogging.
  • Met Ruth Meers of podcast.net and Ben Gross.

These are mainly just placeholders for what I’ll podcast about tomorrow when I’m sufficiently energetic, and I’ll probably remember a couple of other things along the way. Stay tuned!

Addendum: They aren’t much to speak of, but you can see my photos of the event here.

Bloggercon!

Well, it’s finally arrived: Bloggercon. I’m just arming myself with my digital camera and my tiny voice recorder, I suspect that if I brought a more powerful gadget, I would be more tempted to pay attention to it rather than what’s going on around me. So, blinking the sleep from my eyes and armed only with a coffee and Krispy Kreme donut, I’m on my way. Oh, and the map. Need the map. And more coffee.

If I update during the day, it will be solely through the kindness of strangers. Expect a full post mortem in my next podcast.

HOWTO: Produce Your Own AudioBlog

Andrew Grumet asked in one of my comments what hardware and software I used to produce my audioblogs. Since I thought this might be of general interest and would be the kind of thing that people might like to find via search engines, I thought I’d actually write down the nuts and bolts of how I go about it.

I’ve used two different machines to do my audio recording: the first is my rather generic HP laptop (2 Ghz processor, 512M of memory, 30gb disk space), and the other is my HP multimedia PC (2.8ghz processor, 512M memory, 160gb disk). In both cases I use a cheap stereo headset with microphone such as you might use for audio conferencing via Skype. The other day I also purchased a $25 Plantronics headset: I have yet to use that for recording, so it remains to be seen whether it will result in better sound quality. Occasionally I do notice breath noises on the cheaper one, so there is room for improvement, but generally the audio quality is acceptable.

Both of my machines are currently running Windows XP (hiss!). There really is no reason why you couldn’t use Linux or FreeBSD (my personal favorite), but since ultimately the goal of these things is to interface well with the vast majority of consumer hardware, it seems to me that means Windows. I actually did some early tests using Audacity on FreeBSD, and it works quite well for recording. I also experimented with using gnupod on FreeBSD to make my own sort of “geek ipodder”, which worked very well without using any Microsoft products whatsoever, so it can be done.

The key bit of software I use is Audacity, which is a pretty nifty little sound recorder application you can download from sourceforge. It has versions for Windows, Linux, FreeBSD and even Mac OS X (so I’m told, I haven’t got a Mac). I set up a project for my audioblog that records new tracks at 22050Hz, 16 bits per sample, and has some default tags that are the same on every post I make so that I can just click a single icon and begin recording.

If you’ve been following Adam Curry’s explorations, you know that most of his problems has to do with wanting to record other “generated” sounds together with his microphone simultaneously. The reason you want to do this is so that you can incorporate other sources (iTunes, Quicktime and even Windows Media) into your audioblog just by playing them on your computer. This relies on a bit of cooperation from your soundcard. I’m not sure if all cards have this capability, but both of my machines do. The trick has to do with the mixer application. You want to examine the various recording inputs, and configure it so that you are recording not just from the microphone, but from the output of the stereo mixer.

Here is where it gets confusing: if you click on the mixer application in your taskbar, you can get access to all the playback and recording devices. First, look at the playback devices. If you are lucky, there is some kind of microphone input. If you unmute it, and crank up the levels (and perhaps turn on the Microphone Boost that you find under “Advanced”), you should hear your voice coming through the mixer when you talk into the microphone. If you set the gain too high, you might get the squeal of feedback. So far, so good. Trim the overall levels back a bit.

Now, go to the recording devices. If you are lucky, there is something called Stereo Mixer or some such. Set that to be your recording device, not the Microphone. Now, fire up Audacity, and try to record something. Try talking and playing a tune from iTunes or whatever. Both should be recorded. You may need to adjust levels to prevent clipping. I’m still experimenting with how to do that.

That’s really all there is to it. Except that my desktop PC is considerably more complicated.

You see, my desktop supports 7.1 sound and has all sorts of whacky recording and playback devices. To the PC it looks as if this single device was multiple sound cards, so Audacity needs to be configured to use the right ones for input and output (the defaults don’t work very well). To be honest, I’ve got a setting that works, but it was mostly trial and error and I’m still not sure that I understand how it works, so explaining it to you would probably be difficult. The general idea remains though: use the mixer application to configure your sound properly, and Audacity should do the right thing.

I use a couple of other features of Audacity that you might explore:

  • Audacity allows you to record or input multiple tracks, rescale their amplitude, slip them in time to align them, and then mix them down to a single stereo track. This is a useful way to record intros and exits, although I usually just ride the volume controls like an amateur and record it live.
  • You can select regions of the recording, play them, and delete them. I use this to delete complete asides and idiocy that is too great to share with others.
  • You can do fade ins and fade outs. Very nice.
  • You can pause and unpause during recording to gather your thoughts when flustered.

When I am done, I usually play back the recording to check it once again, and then export it as an MP3. Since I do 22050hz recordings, I usually do 64kbps MP3 encoding, which frankly sounds indistinguishable to me from the live encoding under virtually all circumstances. I then upload the recording using the PuTTY scp client PSCP to the /audio subdirectory on my webserver.

To get these in my weblog is actually just the crudest hack. I use WordPress as my weblog system, which has a feature called “custom fields”. These are name/value pairs that you can associate with any post. I add two fields, audiolength and audiourl, which point at the length and url for the uploaded mp3 file. I then modified the index.php and wp-rss2.php to look for these tags and generate links and enclosures.

That’s pretty much all there is to it. I’m actually going to write some better tools to help automate this process (I want to make a gadget that when i drop an audio file into a given directory, it mirrors it automatically onto my website and creates an unpublished article that references it so I can edit it later), but it isn’t enormously difficult to do audioblogs that sound fairly good with this basic level of sophistication.

If anyone has any questions, feel free to post questions or email them, and I’ll try to be helpful.

I feel just like Jonathan Frakes on Futurama

Now, not appearing, Jonathan Frakes!While driving into work this morning and trying to catch up on my audioblogs for the weekend, I noticed that Dave Slusher had mentioned the comment that I left on his weblog regarding the idea of giving fees to the record labels in exchange for making filesharing legal. Woohoo! I feel just like Jonathan Frakes! Front Row!

Sadly, while trying to find a screencap of this stupendous achievement in Mr. Frakes’ career, I found that the screen captures at gotfuturama.com was just slightly early, and so he doesn’t appear. Sorry Jonathan!

Lessee now, if Dave is an C class blogger, and he cites me, that means… well. My blog still is a bottom feeder. I’ll keep trying though. Perhaps the patina of coolness (or at least novelty) will eventually rub off on me.

In the end, I think that Dave is right: we are in near complete agreement. His argument as expressed in his audioblog was more convincing, and closely followed Lessig’s own about using fees to compensate old media while the disrupting new media take its place. The key difference in the situation that exists now versus the past is that the terms and scope of copyright protections have gone far beyond where they were in the early days of film, radio, or even the VCR. Under the law, record labels can sue you for copyright infringement for even the most minor infractions, even infractions which would fall under fair or unlicensed uses if you could afford to bring them in front of a judge. The only way to prevent this from happening is to make legislative changes which prevent them from doing that. It would be within the scope of the legislative power of Congress to attempt to make that balance, perhaps by instituting a statutory license and fees to balance the scales between producer and consumers as they did in the case of licensing for radio broadcast. I suppose that I could in fact support such a notion: my reaction was mainly to the fact that Dave didn’t mention these legislative changes: only their desired effect.

There are still many questions to be answered, such as exactly how record labels would divide up this booty, and whether it is fair to small or independent record labels. I also still question exactly where Congress should draw the line between the interests of the music business and the citizenry at large, and given the way they are funded, where they are likely to draw that line, but I suspect now that Dave’s opinion and mine differ only in detail, not in substance.

Thanks for the mention in any case Dave!

Sigh…

For the moment, comments to my weblog are disabled. This is because I have an IP spoofing spammer who has been hammering my website, posting comments on each and every blog entry on my website.

Hey, you, moron, if you are reading this: I have comment moderation enabled. I always did. Nobody is going to see these, even if your posting succeeds. So why don’t you finish your Mt. Dew, shut off your computer and go outside for a while. Perhaps you could even work up to saying hello to a girl.

The Original Brain Wagon

The Original BrainWagonI have to give credit where credit is due: the name “brainwagon” was first suggested by Tom Lokovic, based upon the theory of jamming two common words together that were easy to spell. Interestingly enough, when I did a web search to find other instances of the words “brain” and “wagon”, I found that a gentleman named Colonel Goethal had worked on the Panama Canal and had named his railcar “The Yellow Peril” (because of its color) or “The Brain Wagon”.

Too cool.

Musings re: iPod and Audioblogging

iPod ProgrammingWell, my week long vacation is slowly slipping away, and it appears that I’ll do relatively little programming during the 11 consecutive days that I have off. Still, I’ve worked my way through a couple of niggly tasks that have been nagging me for a long time, so my time isn’t entirely wasted.

Today I spent about half an hour investigating the possibility of trying to write my own version of Adam Curry’s iBlogger script. The idea is to check RSS feeds for enclosures (which are a particular chunk of XML used to indicate large media payloads), download them automatically, and then automatically add them to your iTunes playlist so that the next time you sync your trusty white companion, you get all the downloaded mp3 files available for your next convenient listening opportunity. That doesn’t sound too hard, and in fact, the first two bits are remarkably easy. In just a couple of minutes, I wrote an eight line Python script that used Mark Pilgrim’s feedparser library to open Adam’s feed, find all the enclosures, then use wget to grab the named mp3 file. It wouldn’t be hard to not use wget: I just like it’s automatic bandwidth limiting capability, which keeps downloads from swamping my wimpy cable modem.

As I said, a piece of cake.

Well, except for getting it to talk to iTunes. If I was on a Macintosh, it would be relatively simple to use Applescript to do it, but I use Windows XP on my laptop and FreeBSD and Linux on my two desktop machines. I normally synch my iPod using iTunes on my laptop, but frankly, I wasn’t averse to trying other ideas, so I downloaded gnupod, a set of perl scripts that can talk to my iPod and installed them on fishtank, my trusty FreeBSD box. I then plugged in my iPod and….

Promptly got screen fulls of fwohci: phy intr messages from FreeBSD. Frown.

Then, I remembered that I had never actually tried hooking a firewire device to this box, and I had some difficulty installing the confusing header blocks to the front mounted panel I added to my box. Instead of supplying a nice solid 2×6 block header, they had 11 separate little pins that each had to be wired to the right location. Bleh. I didn’t feel like sorting this out, so I found the normal rear panel header, shut down my computer, disconnected the front panel, hooked up the rear panels and thirty seconds later rebooted.

Voila! The machine responded with the expected:

da0 at sbp0 bus 0 target 0 lun 0
da0:  Removable Simplified Direct Access SCSI-2 device
da0: 50.000MB/s transfers, Tagged Queueing Enabled
da0: 19073MB (39063024 512 byte sectors: 255H 63S/T 2431C)

A simple addition to /etc/fstab, and I mounted the disk and could begin to search around. I could even use mplayer to play some of the audio files that I found nestled in the subdirectories.

Okay, so next I installed gnupod and followed their instructions. But this too failed. When I attempted to run gnupod_INIT.pl, it complained about a compilation error. Harumph. Then I remembered that the version of perl installed in /usr/bin by FreeBSD is actually an early version of perl5. The version installed by the ports is more recent. Could this be the problem? A bit of scurrying around, and I managed to get the port installed and set it as the default.

And voila! It worked. I could use the gnupod_addsong.pl to add .mp3 files, and then run mktunes.pl to update the database, unmounted the disk, used camcontrol eject da0 and I had a bunch of new mp3 files on my iPod.

This isn’t probably the ideal solution for anyone, even me, but it is a solution that I can understand. I’ve also downloaded Apple’s SDK information about using COM objects to program iTunes, but I must admit that I’ve never done anything like that before, so it’s probably more work than I would like at the moment. An afternoon’s work with Python and gnupod will probably get me to a fairly painless solution. I should have some time tomorrow to goof around. Stay tuned.

How popular am I?

I’ve begun to wonder who (and how many) read this blog. I’m now averaging 65 megabytes of downloads per day, with 1581 unique hosts served in the last week, and 5,528 unique hosts in August. I ‘m getting roughly 2000 successful requests for pages per day, with about 6.75% of all requests coming from my fellow Pixarians.

I’ve also got five subscribers to my weblog on bloglines.com. I highly recommend bloglines to keep track of large numbers of RSS feeds, you can look at the blogs I monitor if you like.