Breakpoint demolog, days 38-50: change of plans

I'm quite sure most of you might have thought that I had either a) silently abandoned my goal or that b) I was just too busy to post here. I can tell you the answer is b) :-D

We went to Spain for a few days (hence the plane meditation title of a previous post) to visit family and have a taste of that hell-in-Earth celebration that are Fallas, and I could keep productively working on the demo for the first few days. After that, things just stopped going so smoothly --or I was too distracted-- and I lose a lot of time with trying to compose a song which could work for a demo, with my synth. Unsuccessfully.

After some reflection, I understood that I couldn't have the cake and eat it too, so I decided to aim for a cupcake instead. Therefore I'll skip the visual part and focus on creating a song for the executable music compo.

Which on one hand is a pity since I really wanted to fill that gorgeous huge screen with my stuff, but since there are always a TON of demos I guess it's better to not to add another half-finished demo to the competition.

With that in mind I began to make my code fit in 32kb. I tried first to do things from scratch and learn in a few hours how to make that waveOut Windows API work. At which I failed miserably. And I didn't want to install the DirectX framework (and going through the genuine windows validation thing meanwhile) just for this, if only because I fear it would ruin my Windows installation.

Hours later I remembered that His 4k/64k Majesty iq had helped me to fit my previous intro into his 64k framework, and the code is out there. And amazingly, it compiled without a complaint from Visual Studio 2008! (unlike the 64k framework sources that are in his own website).

So I spent yesterday changing the code to use pure vectors instead of std::vector, devising alternative data structures to avoid using std::map and things like that, since the 64k framework doesn't use the standard c++ memory allocation, and everything with templates just won't compile. And since my previous code assumed that I would load the Song.xml directly, I also wrote a new importer from Song.xrns to Song.h, using python, so that the song data is extracted and converted into a long array of floats, prior to compiling.

Now I have an executable that when compressed only uses 8-9kb, including a semi-elaborated song, so there's plenty of space for more elaboration if need be. Unfortunately the sound isn't exactly what comes out from Renoise --the code being more or less the same--. It's got something to do with the implementation of math functions that the framework uses, since we had a similar issue when we ported the intro to Windows: things would sound weird and distorted in Windows only. I'm tracking things down by using simple sounds and testing them separately, changing one parameter at a time. It's a bit slow but it's the only way of tackling this.

Wish me luck! :D