Falcosoft wrote:Hi,
As xjas has written loop points are not a standardized feature in case of Standard Midi Files (*.mid). But there are multipl […]
Show full quote
Hi,
As xjas has written loop points are not a standardized feature in case of Standard Midi Files (*.mid). But there are multiple non-standard loop extensions (from more simple to more versatile extensions):
1. RPG Maker style loops use Common Controller 111 (CC#111) to designate loop start. This extension does not use dedicated loop end points, the loop end is always the end of song.
2. Final Fantasy style marker meta events. This extension use 'loopStart' meta marker events to designate loop start and 'loopEnd' meta events to designate loop end. There is no way to define the amount of loops, so loops created this way can be considered infinite.
3. EMIDI/XMI style loops use CC#116 to designate loop start and CC#117 to designate loop end. With this extension you can also define the amount of loops by using the 2nd data byte of the loop start controller.
So CC#116 2nd byte 0 means infinite loops, 1-127 means finite loops and the loop amount. The 2nd byte of loop end controller (CC#117) should always be 127.
I personally recommend to try the 3. variant since it is the most versatile and your engine uses XMI files anyway as you have written. You can use any DAW/Editor that can insert arbitrary Common Controller messages.
As a general rule loops work the following way: loop start point indicates the point where playback jumps to when loop end point is reached.
@Edit:
Under Windows you can use my Midi player (FSMP) to try your different looped MIdi files. There is also an integrated Midi Event Viewer/Debugger in FSMP with loop support so you can check what kind of loops a given midi file uses. You can even use the debugger as primitive editor to insert CC#116/117 style loops.
https://youtu.be/eJwfvv38gv0
So this is what's interesting. I actually found your midi player while google searching before I made this post, but it didn't not loop back my MIDIs at the correct point while using the correct settings. Neither would any of my other players on my Windows 10 machine. But just for the hell of it, I copied the converted XMI into the MegaMan X directory anyway and launched the game with DOSBOX... and it worked as intended in-game, and in-game alone. I'm gonna dig out my Pentium machine and try it natively to see if this is consistent. If so, no need to further tinker, as far as the mod is concerned.
Update/Edit: I just tried it out on my Pentium 133 with a Roland SCP-55 and I was... partially correct. Just as before, my loop point after the Title Screen music prevents the song from starting back at the beginning, and gives the illusion of an endless silence.
However, when I get to the part where Vile kicks my butt and Zero appears, the song that plays during the pep talk does NOT loop back to where I told it to, and instead does start all the way at the beginning when it's over.
On a side note, sound effects start to crackle right around the part where Vile's ship looms overhead, and gets progressively worse until the game is exited and restarted. I chalk this up to a Sound Blaster Clone (ESS) issue, however, and not a problem with the MIDIs themselves. The abnormality progresses slower with regular Sound Blaster selected instead of Sound Blaster Pro, and music clarity is unaffected - just sound effects.
Is there any free editor you can recommend that supports those CC#116/CC#117 parameters you mentioned? Windows 10, 2000, 98, or DOS, it doesn't matter. I have access to each. GUI preferred. Yes, I can definitely learn how to type the command to make it happen, but clicking and saving is still much easier.