Hi Clemens.I actually add the length using a lambda function in the ev_dict at line 24:
lambda ev: [len(ev.sysex)-1] + ev.sysex[1:-1]
SysEx events are not a problem per se, if you have a track with only SysEx events, it works like a charm; the issue happens when there are different event types in the same track, in a peculiar order.
More about this:
https://github.com/vishnubob/python-midi/issues/95(I actually closed that issue because wasn't directly related and was waiting for a confirmation from a guy on #ardour who was going to look into it.
If you can help us to shed some light on this, it'll be very appreciated!
Regards,
Maurizio