I don't think you can. A MIDI file isn't really an audio file as such - it's more like a set of instructions created by a musical instument which can be played by another midi instrument or device. So to take a song or track and reduce that to the notes to be played by each instument would be extremly difficult. I guess you may be able to for a simple piano piece or something but not for anything more complex. You'd be better off searching for a mdi version of the song you want. Loads of them out there and don't think they're covered by the same levels of copyright as standard audio files.