ID:266631
 
Say I have three MIDI files that I want to play one after the other and in a continuous loop (so if my MIDI files were named A, B, and C, the play order would go something like ABCABCABCABC...). How exactly would I accomplish this with the sound proc?

The best I can figure out is something like this...

spawn
for ()
sound('A.midi')
sound('B.midi',wait=1)
sound('C.midi',wait=1)
sleep(5400) //Where 5400 is slightly more than the runtime for all three songs

Is there a better way? Otherwise, I'm not quite sure how you determine when the sound queue needs to be refilled.

Regards,
Corporate Dog

I don't think there are any provisions to check how long a midi file is just yet (I'm sure they're planning on it, eventually, but there are more pressing things at the moment). The best you could do is just time them yourself and try to set the loop as close as you can to the midi times. (Probably best to compare with realtime, but that's another matter.)
In response to Foomer
Foomer wrote:
The best you could do is just time them yourself and try to set the loop as close as you can to the midi times. (Probably best to compare with realtime, but that's another matter.)

That's one way. If you have a MIDI editor, the easiest thing to do would probably be just concatenate all three files into one, then set it to loop.

As for using realtime, the problem with that is it only has a resolution of 6.4 seconds.