Well, demoscene tools are not highly appreciated in adventure creaters circles, but it may be an idea to check out the Farb-Rausch V2 Synthesizer system.
http://www.1337haxorz.de/products.htmlThe Synthesizer itself is a very mighty virtual analog synth, which is inspired by the access virus. It even includes a speech synthesizer.
It comes in two flavors: as a lib to link into Projects (read: the engine), which handles all the replay stuff on its own, and a VST version to create content in most of your favorite music applications. The application must be able to route several midi channels to ONE instrument, so ONE copy of V2 handles all the midi traffic. This way, the v2 can "record" the complete song and save it in its own storage format playable by the lib.
That's right, the drawback is that you cannot use other instruments than the V2 in your productions. But hey, we're talking about midi, and to some extent, this is better than general midi.
The synth is small, does not take a huge amount of processor load (hey, it's intendet for intense 3D real time applications, so it should be suitable here ;-)) and handles all the playback by itself.
From the license:
This program is freeware. This means you can use it as you wish, and
distribute it as long as all the contents of the archive including this
text file and the directory structure remain unmodified. You are not
allowed to charge any fee for redistributing this archive; of course this
excludes the usual copying costs.
This archive and all the contained programs are (C) 2004 Tammo "kb" Hinrichs,
all rights reserved. For any questions contact me at kb@1337haxorz.de
How this translates to using v2 in commercial games is to be investigated.
To see(hear) it in action, have a look at this videos:
http://www.youtube.com/watch?v=LkEsP9H2HGM (Rendered by a 64 kb executable with no external data)
http://www.youtube.com/watch?v=svGk_pF67gc (Rendered by a 64 kb executable with no external data)
http://www.youtube.com/watch?v=Z6Nh0PdknIM (Rendered by a 64 kb executable with no external data)
http://www.youtube.com/watch?v=v0Eg3dBnsHk (Rendered by a 179 kb executable with no external data)