MIDI emulation over OPL3

Emulation of old PCs, PC hardware, or PC peripherals.

MIDI emulation over OPL3

Postby szevvy » 2019-7-29 @ 01:25

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!
szevvy
Newbie
 
Posts: 4
Joined: 2007-5-21 @ 02:58

Re: MIDI emulation over OPL3

Postby Jo22 » 2019-7-29 @ 06:59

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//
User avatar
Jo22
l33t
 
Posts: 3873
Joined: 2009-12-13 @ 07:06
Location: Europe

Re: MIDI emulation over OPL3

Postby ripa » 2019-7-29 @ 18:27

Maybe this OPL3 MIDI driver will be of use: viewtopic.php?t=36667

edit: improved fork at https://github.com/datajake1999/OPL3EMU
ripa
Oldbie
 
Posts: 558
Joined: 2005-4-18 @ 00:53
Location: Finland

Re: MIDI emulation over OPL3

Postby M-HT » 2019-7-31 @ 06:57

You can check libADLMIDI.
M-HT
Newbie
 
Posts: 68
Joined: 2008-9-01 @ 12:55
Location: Bratislava

Re: MIDI emulation over OPL3

Postby szevvy » 2019-8-02 @ 05:29

Thanks everyone - that gives me exactly what I need to get started.
szevvy
Newbie
 
Posts: 4
Joined: 2007-5-21 @ 02:58

Re: MIDI emulation over OPL3

Postby Jo22 » 2019-8-04 @ 13:53

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//
User avatar
Jo22
l33t
 
Posts: 3873
Joined: 2009-12-13 @ 07:06
Location: Europe


Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 1 guest