python-midi icon indicating copy to clipboard operation
python-midi copied to clipboard

Eliminate corruption when writing MIDIs due to RunningStatus

Open MrCheeze opened this issue 9 years ago • 1 comments

When writing midis, a running state is used so that if multiple messages of the same type are used in a row, the message type only has to be specified once. This is fine, except for the fact that MetaEvents and SysexEvents does not cause the state to reset. This can cause the generated midis to be unreadable by some (but not all) software, so here's a quick fix.

MrCheeze avatar Jan 30 '16 09:01 MrCheeze

Incidentally, I notice the python3 branch instead opts to eliminate the use of RunningStatus entirely, with the following comment:

why in the heeeeeeeeelp would you not write the status message here? doesn't matter if it's the same as last time. the byte needs to be there!

MrCheeze avatar Jan 30 '16 23:01 MrCheeze