I've run across a hand full of GS MIDI files that are crashing my editor because the values in the percussion assignment SYSEX commands are not within the bounds expected.
To my knowledge, GS assigns custom percussion channels using
F0 0A 41 (10) 42 12 40 1x 15 0y 0F F7
where "x" is the "part number".
However, in these particular files (SC-88Pro midi collection), I am seeing
F0 41 10 42 12 40 03 15 00 28 F7 <---
F0 41 10 42 12 40 10 15 01 1A F7
So when I do the part number byte (0x1x) - 0xF, I'm getting negative values, because it is 0x instead of 1x.
I'm curious if anyone can shed some light on this. Even in the manual specifically for the SC-88Pro, it says...
** The 03 in the SYSEX above is actually EFX Parameter 19 in the SC-88Pro SYSEX table, meaning that I need to be more narrow in my check of that field, and only accept the value as a percussion part number if it is between 10 and 1F. Currently (or previously by the time you read this) I check the value, and assume it is always going to be 1x, when it can actually be 0x, 1x, 2x, or 4x (at least with the SC-88Pro).