I'm writing a python program that uses mido to interpret midi notes. The problem is, I don't know how to handle instances where a midi file has multiple notes played by the same track at a single moment.

My questions are:

A. Is there a way I could take a midi file and make it so this isn't the case? Is there a program that exists that could automatically ensure that any note that is played/sustained at the same time as another note is moved to a seperate track?

B. Is there a way to handle this with mido?

C. How the heck could I use the "time" attribute in mido Messages to figure this out?

I've resorted to only accepting midi files that follow this rule. I've tried to do a lot of research on how mido Messages work, especially with their time variables, but I don't know how to make it so it works with what I'm doing.

0

There are 0 best solutions below