kshoji / javax.sound.midi-for-Android

Package javax.sound.midi porting for Android
Apache License 2.0
75 stars 34 forks source link

File Reader is parsing Midi Events F1-F6, and F8-FE #15

Open dalewking opened 5 years ago

dalewking commented 5 years ago

Looking through the code I see this comment which is basically asking how do you handle this in a running status case.

The answer is you don't because none of the messages in the F1-F6 and F8-FE range are actually allowed in a midi file and make no sense to have in a file.

See the spec here. You will see that only channel events (80-EF), sysex events (F0, F7) and meta events (FF) are allowed in a file and running status only applies to channel events.

This document even makes it more explicit:

Note that the status bytes associated with System Common messages (0xF1 to 0xF6 inclusive) and System Real Time messages (0xF8 to 0xFE inclusive) are not valid within a MIDI file. Generally none of these messages are relevant within a MIDI file, though for the rare occasion when you do need to include one, it should be embedded within a SysEx escape sequence.