This is a newer, cleaner version of the idea I had back in 2016-2017. I've decided to use a different library (music21 instead of MIDIutil) because I could notmake it work. There are still some things to be fixed, though.
You can watch some examples of MIDI art I made some years ago: