python-midi
python-midi copied to clipboard
Bug when trying to import one midi file
Hi!
When trying to import the following midi file https://www.dropbox.com/s/9cstdu2l5zxia6h/track1.mid?dl=0
I get the first NoteOnEvent tick at 4294967168L which was a bit unexpected. The midi file has been exported from Ableton live 9, and should look like this :

I agree, this is strange, but that's what the data in the MIDI file says. I tried two other MIDI libraries, and they reported the same value. The varlen data for this tick in the track is ['0x8f', '0xff', '0xff', '0xff', '0x0'] which encodes 4294967168. It's possible that Ableton is taking advantage of some kind of trick that I'm just not aware of.
I've also tried in different midi editors and so on ... I've tried also to export differently in Ableton. Strange thing is that I've been working with midi clips exported from Ableton for about a week now, and that's the first time I get this strange thing... but probably you're right, and it's an Ableton bug ...
"I've also tried in different midi editors and so on" -- Which programs did you try and what was the result?
Audacity, and some free windows software. In Audacity, the first note is missing, but the rest loads fine
Another weird thing is there are two TimeSignature events at the beginning of the track, but no Tempo event. What is the tempo of the track?
Yes ... I thought that was strange too. Tempo is 80. However I've also tried with a few softwares (seq24 on linux) which didn't export any time signature either, so I guess this is not that rare
On Thu, Sep 3, 2015 at 3:57 PM, Giles Hall [email protected] wrote:
Another weird thing is there are two TimeSignature events at the beginning of the track, but no Tempo event. What is the tempo of the track?
— Reply to this email directly or view it on GitHub https://github.com/vishnubob/python-midi/issues/70#issuecomment-137431246 .
Sébastien Piquemal
-----* @sebpiq* ----- http://github.com/sebpiq ----- http://funktion.fm
I think you have it backwards; This track has two time signature events and no tempo event. Without a tempo event, most sequencers will assume the tempo is 120 BPM. Everything I've seen points to bug in Ableton.
Yes sorry, I meant seq24 didn't export any tempo event.
On Thu, Sep 3, 2015 at 4:16 PM, Giles Hall [email protected] wrote:
I think you have it backwards; This track has two time signature events and no tempo event. Without a tempo event, most sequencers will assume the tempo is 120 BPM. Everything I've seen points to bug in Ableton.
— Reply to this email directly or view it on GitHub https://github.com/vishnubob/python-midi/issues/70#issuecomment-137439870 .
Sébastien Piquemal
-----* @sebpiq* ----- http://github.com/sebpiq ----- http://funktion.fm