Hint: right click, "Save Link As...".


(*)Mp3 Cap'n uses a find(1) command with the -iname primary, which some systems may not support. If your system does not support this, you will need to edit the script and change the find command to one that works for you.


Back in 1998 or so, at the height of the Napster era, people were just beginning to amass collections of compressed audio files -- mostly in the MP3 format. Given a large collection of music files, it's somewhat awkward to select which ones you want to play in any sort of efficient way. Playlists are good things, but they're static. What if you want to hear something by Dream Theater, but you haven't made a playlist containing all your Dream Theater songs? You could make a playlist, and then tell your music player to play it on "shuffle" and listen to whatever song comes up first. Or you could navigate into the directory where those songs live (assuming they're all in one place!) and pick a file by eye -- a process which leaves something to be desired, especially from a command-line interface. Neither of these lets you just listen to the songs right now!

Fortunately for me, Scott Sams wrote a program called Mp3 Commander. This little gem was a standalone Perl-Gtk script that recursed through a music collection, grabbed all the filenames, and then allowed you to play all of them, or some of them, based on simple searches on the filenames. Type "dream theater" in the entry box, hit the Enter key, and you're listening to all the songs with those two words in their name. Check the Shuffle box before doing that, and you're listening to them in random order. While not a perfect interface for corner cases (e.g., searching for songs by Prince by typing "prince" in the box gave me lots of false hits), it was brilliant for everyday use.

Meanwhile, some time after 2000, mp3commander disappeared from the Internet. It's not on freshmeat any more, and it's not on the web site shown by the program. (In fact, that site's entire domain is expired.) I had a copy of version 0.6 of the program, and a copy of version 1.1 of the program -- nothing in between, and nothing newer. Version 1.1 did not work for me; it tried to use a fancy Perl module interface to XMMS instead of just running xmms(1) as 0.6 did. So I had been using 0.6 continuously for many years. In fact, I'd forgotten I still had 1.1 lying around.

Unfortunately for me, the Perl-Gtk interface is pretty much obsolete at this point. The latest round of Debian unstable upgrades (summer 2008 for me, but I'm way behind on many packages) nuked it, in favor of Perl-Gtk2, which is not backward compatible with Perl-Gtk. Compiling Perl-Gtk from CPAN sources is also extremely nontrivial due to some awfully hairy library prerequisites.

This left me with a few choices:

Porting it looked like a lot less work than writing a new one from the ground up, so that's what I did. I started with mp3commander 0.6 and slowly bludgeoned my way through tutorials, man pages, perldoc pages -- whatever I could find to try to understand how this interface worked.

(I should point out that my programming background is primarily not in graphical user interfaces or object oriented techniques. I have some experience with those things, but not the kind of expertise that would have made this project much easier.)

Since I was basically assuming ownership of an abandoned project, I decided that a name change was in order. So, my version of this program is called Mp3 Cap'n, or mp3capn. If you don't like the name, you're free to rename your copy to anything you like.

And I started over with the version numbering too -- it would hardly be fair to call my first publically released version of this program anything other than version 0.1, given that it's received absolutely no peer review, or even had any users other than myself try it yet.

Anyway... if you like the idea of playing your entire music collection on "shuffle", but also sometimes playing all your Concrete Blonde songs on shuffle when you're in that kind of mood, then maybe you'll find this as useful as I do.