My midi instrument editor was cruising along for a while, but it has been slow going as of late. I have gone back to work, so I have less time to get fully immersed in working on it, plus I've run in to quite a few position tracking issues when writing out my edited files. I finally have most of them sorted out after weeks and weeks of troubleshooting, debugging, pulling my hair out, throwing my laptop in the ocean, and then finally having some flashes of brilliance to help me fix them. I am finally able to (as far as I can tell and have tested) insert program changes and bank selects and not cause any corruption to the MIDI files or cause any erroneous data from things being byte-shifted either too far or not far enough.
So, now that that's all settled, I'd like to revisit inserting some SYSEX resets. I originally planned a few months ago to allow changing any MIDI file type (GM, GS, XG) to any other, but found this to not be practical if, for example, you have a complex XG file with literally hundreds of SYSEX events. I had written code to REPLACE the initial SYSEX reset, so didn't need to worry about choosing placement or modifying delta times around it. It worked when there weren't other resets and things that cancelled it out. So I may keep that code, but I also need to know where I should INSERT a SYSEX reset if there is not one. Should I go for track 0? Or track 1? How much delta time do I need to have before/after a reset for it to be most compatible? And, as an example, say I need to insert it at 1 second's worth of delta time, would I then need to shift all other tracks starting time over a second as well? I can check my XG files for general "time spacing" between a GM reset and an XG reset (as they usually have both).