Haven't checked your code, but every version of Blitz has had issues with mids because it uses fmod for sound.
Somewhere in the code archives should be some userlibs for using winmm to play sounds. You can play MID & WAV through that and it should work fine on most PCs.
Somewhere in the code archives should be some userlibs for using winmm to play sounds. You can play MID & WAV through that and it should work fine on most PCs.