I made this small script to convert midi files into FoxDot code (A python live coding framework) to generate covers through python commands.
You can see a demo on this youtube video: