"Blue Tuesday" sources released

Blue Tuesday by xplsv

"Blue Tuesday" is a direct evolution from the codecolors code base. Since it was all done in a hurry, there were lots of things which didn't work as expected. I somehow got rid of some of them when I ported the demo to mac, then I got rid of some extra things these days when I made the demo work in Linux, prior to releasing these sources. I am not happy with this code; with so many modifications it has grown way too much to be still readable. There are effects whose behaviour is not predictable, things like the ribbons are very inefficient and so on.

I'm still not completely happy with the synchronization. In the first version we had a simple flash app in which we tapped a key each time an event happened (e.g. a snare hit) and then generated a list from there. But due to the way the demo is structured, I had to split the list in three parts so that I could check whether an event happened in each effect. Also with so many changes in the code, the synch had gone slightly awry and when I managed to compile the code in Linux, it clearly was asking for a revision.

So I thought about using Audacity for re-recording the synchronization. I would store each event as a label (Audacity has something called Label Tracks) and then exporting those labels as txt files and processing them to convert them into a .h file with all the events in an array. I had the idea of opening Audacity's project with a text editor and found out that it was a simple XML file -- which would make even easier the task of importing the labels' information, without having to go through the step of exporting to a text file and parsing it.

I then tried to process the XML file with Python, but it was a horrible experience. Since it has a namespace on it and I wanted to do a simple XPath search, it seems I was doomed to fail without installing a couple of Python libraries -- which I didn't want to install. My main premise is to make my demos simple to compile, and having to install an extension just for parsing XML is not what I consider "simple". So I resorted to good old PHP's XML functions and in 20 minutes the import script was done. That was the easy part.

What was really painful was recording the synch points! Audacity took up crashing as a hobby. Thankfully, I have the CTRL+S tic --in which whenever I'm working with any program I tend to press CTRL+S regularly, pretty much each time I have typed in something, just in case-- and that prevented me from losing my changes more than once. But it was just annoying to have to kill the program, open it again, say yes to "yes please recover the project I was working on when you decided to crash". Even worse: at some point, the project got corrupted, and when I reopened it again, Audacity just got stuck switching between an sleep/idle status. I had to create a new project with the same mp3, save it and then edit the new project in a text editor, and copy and paste the old label tracks from the initial source project. Luckily it was all XML. I can't imagine what would have I done if it had been binary data! (Probably scream a good lot!)

So lesson learnt: for making good synchronization you need a dedicated, and probably integrated, piece of software. If I need to do something like this again, I will probably spend a good amount of time in preparing something like the editor blackpawn created. Because it wasn't only a problem of crashing, it was also the problem of not having a comfortable interface which lets you go back and forth the song, reduce its speed, etc, without having to use the mouse.

This is probably one of the reasons why I prefer to make demos with my own music: it's easier to access the original song source files and build a list of events from there if I wanted to :-)

Enough chattering, go watch the demo or get a nice headache just by looking at the code :P