Tuesday, June 03, 2008

Automatic Mario - Kumikyoku

Music video made inside Super Mario World.

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.

Friday, May 16, 2008

Friday's no-comment pic


From Ball don't Lie

Saturday, May 10, 2008

Getting fresh meat for Debian Etch (and solving the Dynamic MMap ran out of room problem)

Oddly enough the I don't recall ever installing anything from the Debian testing repository so far, but an opportunity presented itself when I discovered projectM. Getting projectM to work in Amarok is another story but for now, just the details of the pull from the testing repository:

1. SOP - Just add deb http://ftp.debian.org/debian/ testing main non-free contrib to sources.list in /etc/apt. I also added deb-src http://ftp.debian.org/debian/ testing main non-free contrib which probably contributed to the problems I had later.

2. Run apt-get update. Processed and downloaded the repository packages' metadata fine, until it ran into:

E: Dynamic MMap ran out of room
E: Error occured while processing sqlrelay-sqlite (NewPackage)
E: Problem with MergeList /var/lib/apt/lists/ftp.us.d.........contrib_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

So I googled the error and found a partial solution at the cached version of http://jaqque.sbih.org/kplug/apt-pinning.html:

You may find that you receive an error like the following:


E: Dynamic MMap ran out of room
E: Error occured while processing sqlrelay-sqlite (NewPackage)
E: Problem with MergeList /var/lib/apt/lists/ftp.us.debian.org_debian_dists_woody_contrib_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

This is caused because apt's cache is too small to handle all of the packages that are included with stable, testing, and unstable. This is also very easy to fix. Add the following line to /etc/apt/apt.conf

APT::Cache-Limit "8388608";

Thanks to R (Chandra) Chandras for pointing out this problem

Now it turns out in my Etch there is no apt.conf...there is an apt.conf.d directory with two conf files containing directives. So I followed the pattern, named mine 80aptcache.conf and added the CacheLimit directive above. However I had to set it to some insane high value - 200000000 (I suspect because of including the src packages) to finally get apt-get update working. But it did work and I got a the 1.01 version of libvisual-projectm. How I got that to work with Amarok is another post for another day.