Convert MIDI files into piano roll images and back with this Python script. Full code here.
Here is a video demonstration using the program to generate midis and images, then we use it for an artistic performance.
People like Gwern and Shawn Presser used ABC notation to convert midi files into text. I thought it was too verbouse so I tried my own.