AMIDILIB library development status

Things are quiet here, because I am busy with my project (AMIDILIB) which I have started somewhere in 2007 and I would like to turn it into usable form. Yes, development is a long road out of hell, especially with no budget at all and on computer platform which is in somewhat undead state and still dares to haunt the living ( hopefully ;> ).
The aim of the project is to provide music sequence replay with use of early 80’/90′ Roland LA/GS/GM MIDI modules (which sound like this or this in case of SC-55 modules) and 16/32 bit Atari home computers (ST/STe/TT/Falcon030/CT60). Something I felt was missing (we don’t need full blown sequencer here like Cubase for simple replay) and simple enough, that it could be used by other developers in custom music players, games and demos. Just init, load file and play. Second thing is that Atari ST and Roland MT-32 are good match, both came out from the same era.

I’ve picked up this project recently after a long inactivity period and it seems that first goal (providing the replay routines) is very near. Currently I’m working on delta timings and I hope to get them right soon and release small demonstration. So you can start to hunt for old sound modules now :).
Midi replay routine has been completely reworked and now it replays multitrack MIDI files, also MIDI type 2 files are supported (,but currently there is no logic for their replay – each track has to be treated separately like MIDI type 0, so this is not a big deal).
MIDI file parser was heavily bugfixed and is quite reliable on Falcon030/CT60, but it has one issue on ST/STe/Mega STe (it will be investigated after timings will be right). It was tested with quite big MIDI files like 640kb with embedded SysEX messages and behaved quite well (normal files are up to 30kb with standard up to 4kb). Although such big files take a very long time to load on slower machines. Parser handles even KAR files (karaoke midi files with lyrics, although lyrics are not imported).

When player code will be ready and stable this will close up pre-alpha stage of the project. After that I’m planning to drink for the next two months from happiness, optimise player for speed and add support to other formats, especially for XMI and Doom MUS.

As I load midi data into custom data structure into memory there is alot of things that can be done like custom events with custom handlers. That means it is possible to insert for instance: commands for triggering events (in demo for example to synchronize display/effects with music), send notes to custom software modules like custom ym2149 sound engine or dsp sound engine (on Atari Falcon030), send data via rs232 to external controller which manages light system of your christmas tree or launches borrowed thermonuclear missiles. There is alot of possibilities. And everything in rhythm of the music ;)!

Here is little sample from end of May build (there was alot of changes since then). Program loads sequence from midi file to memory (on example it’s rather small 748 bytes only MIDI type 1 (multitrack)), parses it and loads into custom structure. After that we initialise our replay routine (currently it is hooked to timer B, but it can be hooked to any other).

AMIDILIB development snapshot from nokturnal on Vimeo.

Next we can play, stop, pause, unpause our sequence. MIDI sequence can be played in a loop or only once.
Program is demonstrated on real Atari Falcon 030 (CT60 accelerator board/RGB monitor) with Roland CM-500 sound module hooked to Atari’s midi port. It was developed as always under linux with gcc 4.5.3 cross compiler and VASM.
As you can hear delta times aren’t correctly translated to real time yet (sequence is replayed too quickly), but I’m working on it.

About this entry