Tuesday, June 03, 2008

Saturday, May 24, 2008

Programming is pain (sometimes)

Last night I went to bed completely frustrated. I had spent probably 6 hours staring and poking at a piece of code and thinking what on earth could be wrong with it. It seemed functionally identical to the code I had been using as a guide, yet it didn't work. It didn't do anything - generate error messages, any messages at all - it just got silently ignored by the framework. Why, why, why, is all I could think about before going to bed.

But what I've learned and seen reinforced over and over again is - if you get completely stuck, step away from the problem for a while. Take a nap or a shower or watch a movie or do something to take your conscious mind away from it. Sure enough, when I woke up and went back at it, less than 1 hour in I spotted the discrepancy. I had a function included in a class definition, while my example code had the function outside the class. So I took it outside and hey presto it worked perfectly.

It still sucked though to have to go through all that frustration.

projectM - Finally audio visualizations for Amarok

The one area where my trusty WinAmp had Amarok licked was visualizations (although Amarok outshines it and nearly everything else I've tried in most every audio library category.)

Enter projectM :

projectM is an LGPL'ed reimplementation of Milkdrop under OpenGL. All projectM requires is a video card with 3D acceleration and your favorite music.

FINALLY I could get trippy fullscreen milkdrop visualizations. I talked about how I pulled libvisual-projectm from Debian lenny here. The two gotchas I had with getting the libvisual-projectm plugin to work with Amarok are:

  1. The config.inp file projectM drops in your home points to fonts from ttf-bitstream-vera - Vera.ttf and VeraMono.ttf. If you don't have these fonts installed then all you will see when enabling the plugin under Amarok is a brief projectM window flash and then disappear. You can get these fonts in debian by installing the ttf-bitstream-vera package. In theory you should be able to modify config.inp to point to whatever fonts you want but this runs into the second issue:
  2. Currently libvisual-projectm appears to ignore some parts of config.inp I got it to set directives for Preset Duration but it ignores other directives like Window Width and Fullscreen and FPS.
No biggie, but it is kind of irritating to have to resize the vis window to 640x480 and then right click in, whenever I want fullscreen visualizations. But milkdrop is so worth it. Maybe these issues will be resolved with the 1.1 release of projectM which I'm soon to build and install.

Friday, May 23, 2008

Great moments in Views 2 coding history

After scrabbling through source files and scrutinizing tantalizing yet incomplete docs, I finally got Views 2 to disdainfully acknowledge that yes, I was in fact a views style plugin.


Wednesday, May 21, 2008

MAN U 6 - CHELSEA 5 PK

To quote Vincent Vega, now if you'll excuse me I'm going to go home and have a heart attack.