- changed status to open
Fix midi export
SMF.write() does not work:
There is a wrong type hint in the signature (SMF instead of SMFData).
Also, the sorting method can lead to note_on events being sorted before note_off events when they have the same timestamp. This can corrupt the output file.
Attached is a diff for the fixes.
Thanks for the great work!
Comments (5)
-
repo owner -
repo owner - changed status to resolved
-
reporter There is another issue here I did spot at first: If you have a program change or other control change at the same time as a note-on, you want these to be processed before the note-on.
So the logic here should rather be: If several events have the same timestamp, note-on must always come last.
-
repo owner In the first place, it is best to allow sorting to be turned on or off.
They should have been originally generated in sequence. -
repo owner I implemented sort toggle argument at 60d578bb80fede1db51e09f8d0cf393175505ee4.
- Log in to comment
Thanks for report. and I will implement for running status that note_on velocity 0 as note_off.