I am trying to read a midi file in C ++, and I am stuck in an error that appears to be an event that is not defined in the standard midi specification (retrieved from many sites, including this: http://www.sonicspot.com/ guide / midifiles.html )
I opened midi in the HEX editor and indicated an error. This happens before the very first note on event. The file was generated using Sibelius 6 software, and I was wondering if I publish a section of the file, here someone will help me get around this.
This is the start of the third track:
4D 54 72 6B (MTrk magic number) 00 00 1F F5 (track size in bytes - 8181) 00 FF 03 04 (4 bytes follows) (track sequence name) 00 FF 04 0B (11 bytes follows) (instrument name) 00 C0 34 (program change event) 00 B0 79 00 (controller event) 00 5B <- (what the heck is that?!)
It cannot be deltas, since the first value is 00 (there is no MSB set to 1), this is also an unrecognized event. After 10 bytes I recognize the event "note on" This goes:
00 5B 30 00 40 00 00 07 64 00 0A 10 00 90 3E 47 <- note on
I have no idea what these 12 bytes before "note on" represent and therefore cannot read the file. I know that the very first note is quite long, maybe the reason. I also noticed that I could not find an event to represent the pauses. Maybe this is the code for the bar + length? Should I read them like tics?
Thanks, any help would be appreciated.
source share