Projects
I had one project I really needed to accomplish this weekend. I needed to build a deck to have a place to put a spa I’ve already purchased. The weather was not cooperative, however. Saturday it rained, sleeted, and snowed. There was still snow on the ground until late morning. The afternoon was not bad, and I did get five of the nine Dekblocks set, but that was all I managed before my wrists started hurting too much. Digging with a shovel or pick is not one of my favorite things. I think once I get the piers set I should be able to actually build the deck fairly quickly. I’m thinking about taking Tuesday off to see how much further I can get.
Since yesterday was useless for yard work, I started thinking about kickball. I pulled out the sound system and made sure everything was working properly and that I had all the paraphernalia I needed. I also remembered some unfinished work with a couple of playlists I wanted to have ready. This led to finding a bit more music and organizing a little better. One of the issues I’ve had in the past is trying to manage multiple lists of songs and being able to easily switch between them. There might be some DJ software out there that does what I want, but I really like Winamp, if only I could run several simultaneous copies. Surprise, that’s possible. I discovered that if I check the “allow multiple instances” box and start Winamp with the /new option on the command line, multiple copies will start. That was a step in the right direction, but still forced me to load playlists in each instance. It was also annoying when enqueueing files from the file system. They would always load into the most recently started instance, which wasn’t usually what I wanted.
A bit more digging turned up two more qualifiers: /inidir, which specifies an alternate directory to store the current playlist and settings and /class, which forces the Winamp window to present a class string to Windows. Armed with this, I set up individual directories for each instance of Winamp I wanted and wrote a small perl script to read the directory names and start the copies I wanted. That almost got me where I wanted to be. I then needed to go modify the registry for all file types that opened in Winamp to default to enqueue rather than play and modify the command used to include the class and inidir for the instance I wanted to always handle ad hoc enqueues. Everything then worked pretty much the way I wanted. Except… If I accidentally or purposely stopped one or more instances, I didn’t have a good way to restart them with restarting all of them. A bit more looking around uncovered the Win32::GUI module which allowed me to find out which instances were still running (by class id) and start those that had stopped.
One might think I was done at this point. Then I got to thinking about one of the other annoyances I have with Winamp. If there more than about 20,000 entries in the playlist, trying to do a search is painfully slow. It occurred to me that Perl does a much better job of pattern matching than what Winamp supplies. I then sat down and re-learned enough Tk to write a fairly simple interface that loaded in the full playlist and allowed me to nicely search it. Sine I’d already figured out how to direct files to the correct instance, the backend was simple once I had the UI written.
So, the deck isn’t done, but I have a pretty neat interface to play tunes next Sunday.