Hi. The OPL3 doesn't do understand MIDI, it needs a synthesizer driver to translate MIDI data to OPL3 commands.
MPU-401 is just a serial port that is wired to the WaveBlaster header and the Game/MIDI port.
DOS games used middleware drivers such as Miles Sound System or iMUSE to playback MIDI on the OPL3 chip.
https://en.wikipedia.org/wiki/Miles_Sound_System
https://en.wikipedia.org/wiki/IMUSE
Windows 3.1x had various FM drivers depending on the sound card driver.
The driver diskettes of ProAudioSpectrum 16 and SB16 (later) had used Voyetra Super SAPI OPL3 MIDI driver, for example.
If you really want to playback MIDI via OPL3 on plain DOS, please have a look at SEAL/2.
It's a GUI for DOS that uses Allegro library. It has a player that works.
Example: https://www.youtube.com/watch?v=JFo3luv-ByA
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel
//My video channel//