Re: MidiKit showing length in Meta-Event

Posted by madGambol on
URL: https://forum.mixagesoftware.com/MidiKit-showing-length-in-Meta-Event-tp1657p1660.html

I'm using the library MidiFile to encode the midi output file.

MidiKit is not displaying blocks of text > 127 bytes correctly. I wrote a MIDI test file that should have text starting with "ABCDEFG ... XYZ1234567890... <then special chars> <loop counter value as decimal number", repeated and extended 31 times.

The first two meta event text  values are OK because they're under 128 bytes. The third one is wrong as it begins with "4ABC...". The text under each event is stopping incorrectly after the first one on the .LF. I terminated the text with for each line of the string.

The library I'm using to encode the data is correctly formatting the length as a variable width field. The third meta-event has the length 180, which is encoded as the bytes 0x81 0x34 in the file. Those bytes re-packed become 0xb4 or 180 (decimal). I can't tell exactly what's being done with the 0x81, but the 0x34 is showing up as the first byte of the text, followed by the actual text of the text meta event, ending on the .LF..

I don't see how to attach files in this post, but I put my test MIDI file under this dropbox link:

https://www.dropbox.com/s/7r0klcv2g3dcye7/test-long-midi-text.midi?dl=0">https://www.dropbox.com/s/7r0klcv2g3dcye7/test-long-midi-text.midi?dl=0

What are the chances of a patch/correction for this?

Thanks,
madGambol