AMIDI lib progress report

I’ve made small progress with my home cooked Atari MIDI library. I’ve managed to work out the structure for storing MIDI events for easy replay and implemened full functionality connected with it. I have few ideas about the optimisation of events storage, but I want to incorporate them later after everything will be working nicely.
For now all the events will be stored in one linked list (for midi 0,1 and similar) and in several linked lists for midi 2 format (everything sorted by delta times). The player will be replaying all the events from the sequence list with currently set tempo and that’s it :).

I have few other ideas about the further events optimisation in the linked list (storage wise they can be packed in few less bytes (== more memory for other events) and it could lead to optimised MIDI binary storage format for tunes. The second idea that I had is to put all events in BST tree structure (or similar) with delta times as nodes and each node could have linked list of MIDI events, additionally in this approach additional pairs: [delta time, BST node pointer] stored in external table/linked list for easy replay could speed up things a little (in expense of additional memory of course). This could lead for faster event insertion during load time and faster replay. But these are just ideas, we will see how everything will be performing in first working version.

About this entry