I am re-writing the core of my midi editor, MID-MIS. The old code was a cobbled-together mess of stuff that I built as I learned about how the internals of a MIDI file work, and then learned about additional features I wanted my editor to be able to handle.
That made it much harder than it should be to update things in the editor and keep track of other things like file location indexes and such. I finally got fed up enough with it a few months ago to re-write the core from scratch. The new code is so much more efficient, organized, and flexible.
As I'm running all of my old test files through the new editor, I'm occasionally finding things that either weren't a problem in my old code, or were and I couldn't fix, or were things that I never realized were a problem.
The most recent that I just discovered is that, unbeknownst to me, running status is NOT ended if you hit a META event. It just picks right back up after the META event! Took me a bit to figure out what was happening, as I have always assumed that META events could not be running (they can't) and as such, the running status flag should be disabled. So I disabled it and always wrote the command byte for the next event. But a test file I have has only a single Note-On command in the whole file and all the rest are running status, with META text events between groups of notes. My saved copy of this file should have been near-identical, except now it had a bunch of Note-Ons that weren't present in the original. Now that I've realized how running status ACTUALLY behaves around META events, I am able to reproduce an exact copy of the test file after loading, parsing, sorting events, and then rebuilding at the end.
Just thought it was interesting and a good bit of information to know for those who are working on their own software.
The new version of my editor will be posted on my Google Drive when it is "ready", and then I can finally finish up the next soundtrack-in-progress for the SNES MIDI Remaster Project. If you are more interested about the inner workings of the editor, you can check some of my older posts on this forum as well as posts over on the Gamemaker forums.
https://forum.gamemaker.io/index.php
More to come.
running status is NOT ended if you hit a META event. It just picks right back up after the META event!
Be aware that the Standard MIDI Files specification clearly states that meta events cancel Running Status: In the Standard MIDI Files specification printed page 7, PDF page 9 says "Sysex events and meta-events cancel any running status which was in effect. Running status does not apply to and may not be used for these messages." If you make a MIDI file that uses Running Status after a meta event, be aware it might cause problems with some MIDI file software that is following the specification in this regard.
However, when I tested various MIDI file software, 11 out of the 12 things I tested work with Running Status after a meta event:
Works Sekaiju 8.3 Windows Media Player 12.0.9600.19482 Notation Player 4.0.3.2 Synthesia 10.9.5903 Cakewalk 2022.06 (Build 034, 64 bit) vanBasco's Karaoke Player 2.53 MuseScore 3.6.2.548021803 Revision 3224f34 MIDITrail 1.4.0 (64 bit) VLC Media Player 3.0.23 SynthFont 1.770 Signal MIDI Editor (website as of 2026-04-06) Crashed Music Animation Machine (MAMPlayer)
Hmm, interesting, you are correct. So it is just a general lax implementation that allows it to work. Haha, well, I guess I will revert those changes.
It does work with Winamp via CoolSoft VirtualMIDISynth as well.
Interestingly enough, the test file that brought this to my attention was created by someone we know 😉
https://github.com/jazz-soft/test-midi-files/raw/main/midi/test-all-gm-percussion.mid
But looking at a fresh downloaded copy, it seems to have been updated since the version I have, which was from mid-2021. It now contains both note on and off, and has the 99 code after every META event, as the specs say it should.