Closed CNelias closed 5 years ago
This is because mido
reports the file as having a ticks_per_beat
of -10096:
t = mido.MidiFile("ChrisPotter_InASentimentalMood_FINAL.mid")
print(t.ticks_per_beat)
gives -10096
. The MIDI file probably has a corrupt header. You can either fix the header or see if there's a way to make mido
more robust to this issue.
Ok thanks for you reply !
I guess i'll just delete all the files of the database that are corrupt in this manner because there are not that much anyway.
Best,
Corentin
On Wed, Aug 21, 2019 at 5:13 PM Colin Raffel notifications@github.com wrote:
Closed #173 https://github.com/craffel/pretty-midi/issues/173.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/craffel/pretty-midi/issues/173?email_source=notifications&email_token=AIJFCUA3DPZEJEWJPECGAWTQFVLQPA5CNFSM4IOHG2W2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTFR76QQ#event-2573467458, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJFCUAG6CKDVN5LOWZZL7LQFVLQPANCNFSM4IOHG2WQ .
I am trying to process a database of MIDI jazz solos, and I noticed that the package pretty_MIDI returns negative onset times for the following MIDI piece : https://jazzomat.hfm-weimar.de/dbformat/synopsis/solo80.html The problem is also appearing with this one : https://jazzomat.hfm-weimar.de/dbformat/synopsis/solo120.html
My code is the following :
Do you know what is going on ? It could be that the way they generated their MIDI files was non-standard...