What is the difference between a BAM and a MIDI file?
BAM is a music format designed to make good use of the FM/Adlib/OPL2 synthesis chip in a sound card. Back in the mid 90's, all sound card supported FM/Adlib/OPL2, and playing music in that way requires very little memory, so it was a good choice for music at the time. Modern sound cards in computers running Windows XP seldom support FM/Adlib/OPL2, so BAM is no longer a good format.
MIDI is a music format and a music standard designed to control a wide variety of electronic musical instruments (usually keyboards, but also electric guitars, drumsets, and other things). MIDI is also popular for storing music to be played on a computer's sound card.
The Windows and Linux versions of the OHRRPGCE play BAM by converting it into MIDI (which is imperfect; instruments cannot be converted accurately). The DOS version of the OHRRPGCE was only able to play BAM.
However, note that MIDI does not contain loop points (except as a non-standard extension) nor parameters for the instruments; it can only select which instrument you want by a 7-bit index number (for example, 0 means a piano, etc). OPL2 music can still be played on an emulator, although OHRRPGCE does not currently include an emulator for this purpose. (You can still play the music on an external emulator, such as DOSBOX or VGMPlay.)