Category Archives: MOD

some real JavaScript IDE – anyone?

Debugging JavaScript can really be so much fun.. first there are Firefox’s “developer tools”. These are so slow that they bring back memories of the early Eclipse Java IDE: By the time the bloody tool shows the breakpoint you have long forgotten what you wanted to look for in the first place. From there it is then a steep downhill trip: When stepping through a function in the debugger the focus will suddenly disappear and the only way to reanimate the tool is to actually remove the previous breakpoint.. LOL it’s version 31 and Firefox still has no usable developer tools.
For all those thinking ‘ahhh but Chrome is so much better’ – think again: While it is true that Chrome’s developer tools are real quick there is a catch. Or as a colleague once said: “if the result does not have to be correct my code can be real quick!”. Here is an example of a situation that you may encounter while debugging in Chrome (this is actual – non tampered with – debugger output):

WhyJavaScriptSucks

The debugger here has just stepped over a line of code that sets some variable to 0. On the very next line the debugger tells you that this very variable is NOT 0.. Another fun Chrome surprise is when you find that Chrome’s garbage collector will actually trash ‘event handler’ functions that are still in use – unless you separately anchor them to some dedicated variable. 

I am so glad that I never make any mistakes as a matter of principle 🙂 So my latest bit of music playback programming could not be stopped by foul developer tools:

screenshot 
And what was this experiment about? xmp is a module player that plays over 90 mainstream and obscure module formats from Amiga, Atari, Acorn, Apple IIgs and PC, including Protracker (MOD), Scream Tracker 3 (S3M), Fast Tracker II (XM) and Impulse Tracker (IT) files. This functionality is now available on my little web page (click on the image above) 🙂

 

(You’ll find the source code here: http://sourceforge.net/projects/webxmp/)

more of the same in blue..

Having the building blocks of my SID player available (see earlier posts), it really was no brainer to take up the suggestion of a colleague to take his Rockbox version of a MOD player and also turn it into a Flash version (it took about half an hour).

MOD
To try out at least something new, I decided to tap the WebService of a popular chiptune page and learn how that is done with PHP. Also I am using AJAX to integrate the resulting data.

As I had already done in my SID version I am using a PHP/cURL based proxy script to work around the Flash security restrictions and load the music files indirectly from the respective domain.

The result can be seen here.