I'm in the process of creating an app that reads a sheet and then generates a sequence of piano keys to be pressed in order for the sheet to be "played". I managed to get the MusicXML or MIDI file for my sheets. MIDI format is exactly what I need since there's a one to one correspondence between a MIDI number and a key on the piano (according to http://newt.phys.unsw.edu.au/jw/notes.html) and it simpler than mapping each note of in the MusicXML file to a key. However I cannot access MIDI numbers themselves and MIDI editors (like MuseScore) only show the notation not the actual numbers. Is there a way to generate the sequence of MIDI numbers for a MIDI file in python?