Flip one midi file
Flip several midi files
What is all this?
This is the Automatic MIDI Inverter! Inspired by Andrew Huang, the basic idea is to start from the first note and pivot every note from above to below, and vice versa, while keeping the same interval. For a more detailed explanation and example, watch Andrew's video about it.
As an improvement on Andrew's original idea, where the first note stays the same and all the notes are flipped around that note, my code finds the pitch in the center of the range and flips everything around that pitch, which keeps the range of the inversion the same as that of the original. With Andrew's method, it's possible to get notes that are too high or low for midi files.