it wouldnt be that hard. king leo made a python script in 2010 that converts midi to events with a specific save and sound addon - the script was only like 50 or so lines long. the same could be done here (but pls dont use that old script cause it uses a super old version of python)
for anyone wanting to try this: you can convert midis to plaintext format to read from them. look it up