Convert Midi files to Wav files, sounds similar to early 90s Soundblaster.
This tool converts general midi (.mid) files to RAW PCM (.wav) files using something very similar to OPL2 synthesis. I lifted some information about the OPL2/3 synthesizers from the internet (M.A.M.E. is the best!) and about the OP2 file format MS-DOS games stored their OPL2 instrument data in.
You need cmake. You need a C compiler supported by cmake. You need a C standard library for memory allocation and file I/O.
./midi2wav_app <midi_file> <wav_file>
Some precision and small features can be turned off at compile time with a #define to trade quality for speed. I did some DooM E1M1 compares against YouTube videos of different soundcards and midi2wav is pretty close to the Soundblaster Pro - but seems to have more voices - to me.
If you have a different OP2 instrument file from somewhere, there is a small tool, op2_parse, that can be used to generate the instrument table from such a file.
There is a structure "s_midi_render_ctx_rom" that gets initialized at init and then only gets read from when playing the midi. If you have a platform with a ROM you might want to precalc it on a development machine and put it in read only memory to save RAM.