Two initial thoughts on it are the best I have.Artcfox wrote:So it's not possible to store the different sections as different midi songs, and just start one when another finishes?
It might be less work to remake it as a MOD, a total guess there, but MOD is essentially the format you stated with predefined patterns and tokens to indicate order/repitition of the patterns. OpenMPT can apparently import MIDI, and if some messing with quantification yields decent results, it could then presumably export to MOD in a format usable by the converter. I have not even looked if the code was ever added to midiconv, as Alec is the only one that has ever made MOD songs on Uzebox. The only plus here is that I am pretty sure the MOD player which is in the current kernel does what you want without modification/custom music player, as Alec had made some large songs fit in very little flash by this method. I have been meaning to look into all this for a while but never got around to it, so I am saying all that is theoretical at best.
The other idea you mentioned is clever, and I never considered that in all the years I have been saddened by the massive space music takes. I think it can work, and you would need to of course convert the songs sections without any -s -e tokens. Then you would need to check the kernel's song pointer to see where it was to do the repetition counting and redirection of the song pointer. I don't see any obvious complications with that except for possible some timing aspect. I do imagine the idea could be made to work, if MIDI->MOD conversion proved to be impractical. You probably just need to:
Code: Select all
extern const char *songPos;//from uzeboxSoundEngine.c