VOGONS


MIDI emulation over OPL3

Topic actions

First post, by szevvy

User metadata
Rank Newbie
Rank
Newbie

Hey all,

I'm the author of Wombat, which is an asset extractor for a bunch of old DOS games - the full list is at https://szevvy.com

One area that my tool has always been less-good at is music. I support IMF (Monster Bash, Commander Keen etc) as it's just a stream of OPL3 instructions that I pump out to a NukedOPL dll and pull back in as raw audio data that can then be saved as a .wav

However, most of the games I handle use midi/ctmf/xmi, which are all midi-like. I'd like to be able to be able to do the same with these (get the full song back out as baked audio data).

I understand that most games that use these kinds of music have soundbanks, which I'm happy to handle. The bits that I don't know:

- Would OPL3 be a reasonable way to bake out midi-like data? If so, is there an example somewhere of how to convert MIDI data to data OPL3 emulation can handle? It's fine if it's specific to a particular file format, I can work the rest out. I'm assuming soundbanks from say a ctmf file are basically data that can be thrown directly at an OPL3 emulator and have it ready to go? I'm totally happy to write soundbank loading for each game that I support.
- If not OPL3, what's a better alternative? Is there an opensource library that I can build out to a dll and distribute with my program that would be better than OPL3 for this job?
- If the better solution is 'soundblaster emulation'...is there a default set of instruments that should be loaded in? Where can I see what those are?

Thanks in advance!

Reply 1 of 5, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi, I'm not sure if this helpful to you, but a DOS shell named SEAL2 has a nice sounding MIDI player that supports OPL3.
Strictly speaking, the OPL3 support is done via Allegro library, which also is the soruce code available of.

http://sealsystem.sourceforge.net/
https://liballeg.org/old.html

Good luck! 😀

PS: I've did a quick recording of some Cave Story tunes (*.mid) which were played back via SEAL2/OPL3.
You can find it here -> https://youtu.be/wELcFW9u2V4

"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//

Reply 3 of 5, by M-HT

User metadata
Rank Newbie
Rank
Newbie

You can check libADLMIDI.

Reply 4 of 5, by szevvy

User metadata
Rank Newbie
Rank
Newbie

Thanks everyone - that gives me exactly what I need to get started.

Reply 5 of 5, by Jo22

User metadata
Rank l33t++
Rank
l33t++

You're welcome - Good luck! 😀

"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//