This might be a bit of overkill but AAF only supports MIDI 1 export of a single file. You'll need to export the MIDI files for the tracks separately in most cases and then remap them to the proper instruments in the new application.
9.2 Referencing and embedding MIDI files
A standard MIDI file may be referenced from a composition and embedded in an AAF file as an auxiliary file, as described in Section 9.
No more than one MIDI auxiliary file shall be referenced from a given composition. The MIDI file shall conform to the standard MIDI specification version 1.
The AuxiliaryDescriptor::MimeType property shall be “audio/midi”.
The beginning of the composition and the beginning of the MIDI file are assumed to be co-timed. The importing application shall parse the MIDI file, including tempo maps, to determine synchronization at further points in the composition.
https://www.amwa.tv/downloads/specifications/aafeditprotocol.pdf
https://www.amwa.tv/developers.shtml