Opl3 Soundfont

0 views
Skip to first unread message

Faith Lienhard

unread,
Aug 5, 2024, 11:34:13 AM8/5/24
to ontonmuner
iknow theres one out there but thats 128MB in size, i've trie dto set the ramboth dynamic and static in creatives soundbank managerto as precise it'll let me in one of my 98 machines w/ an Audigy 2but while it'll say "Loading..." it just refuses it after a few i manage dto find another but not exactly... that great either,

You need to allocate slightly more RAM than the size of your soundfont in order to get it working. As Audigy exposes two soundfont synths, you need to allocate more RAM than the soundfonts loaded on both synths combined. Assuming you'll keep the original 4MB soundfont bank on the other synth, you need to allocate at least 136MB just to be safe.


Wow! The linked "iffy" soundfont works, and it's good. I tested it in my host PC, with VirtualMIDISynth. More information here: ? Compared it to the SoundBlaster AWE32 OPL sound, it sounds surprisingly accurate. Just gonna use this soundfont for OPL now. (And only 3 MB, wow ?)


OPL-3_FM_128M.sf2 is a soundfont (.sf2) that emulates the sound of an original OPL3 Yamaha YMF262 chip, which was the original sound that was produced when playing a MIDI file on older computers from the 90s.


Possibly the closest you're going to get to replicating the original 90s midi sound produced by an OPL-3 chip without inserting a real OPL-3 chip inside your computer, getting Virtual PC (ew!) or DOSbox


Recently I read a blog post talking about how to get a classic OPL3/Adlib/Soundblaster sound via Windows midi playback.

Basically, anything midi you normally hear will sound like oldschool DOS music. It's pretty simple to follow and the programs mentioned don't cost any money. EDIT: The soundfont mentioned is not commercial, it was home made.



Someone mentioned to me that ASIO drivers might be required, though I'm not sure because I already had some installed.

I use ASIO4ALL, which you can get here:



I'll link a few sample recordings I made here(in ogg vorbis, not mp3, in case anyone was wondering):

Title from Doom 2

Grabbag from Duke Nukem 3D



You can also enable a reverb effect in the rgc:audio sfz program if you want, and even change the polyphony to the default 18 like on a real OPL3 chip(IIRC, at least, heh).



I ended up finding more info and choices here:

Including a soundfont based on The Fat Man's OPL2 bank/timbres.(direct link ) I'll have to try it in my Windows copy of The 7th Guest sometime.



EDIT: This is for General MIDI playback, and not emulation, in case the soundfonts didn't tip you off.


Sorry to break it for you (and the guys at that blog) but there's a much more elegant way to play midis with an FM sound, which I have pimped discussed many times here at DW, including this thread.



To make a long story short, get fmmidi, a free FM OPL4 emulator that plays MIDI files directly using programmable FM timbres and real-time (emulated) FM synthesis.



There's also Adplug, which is a plug-in module (also for Winamp) that allows real-time FM synthesis emulation, and the ability to play back a lot of classic DOS era FM music files in obscure and exotic format (dunno if they extended it to a complete MIDI driver though).



To anyone doubting the quality of the emulated FM synthesis: it's bit-accurate. Surprisingly, the OPL2/OPL3/OPL4 line didn't use any analog oscillators or filters: the waveforms were generated digitally via lookup tables, channel manipulation was purely digital, mixing was done digitally, and the result was played back by a DAC external to the chip, at over 48KHz. So, perfect emulation is possible (of course, it may not sound like your "1000W P.M.P.O. MULTIMEDIA SPEAKERS" sounded in 1995).



Also, remember that not all DOS games using "midi" sound used the same timbres ;-)



Doom used a particularly good set, other games used generic Miles/Voyetra timbres that sounded bland, and a rare minority used direct control of the FM chip with feedback etc.



Ask me about FM synthesis ;-)




Depends on the game: Doom used a lump somewhere in the IWADs, which however has to be mapped to the FM registers in a specific way.



In a few other DOS games there were aptly-named external "SOUNDS.OP2", "INSTR.OPL" or "TIMBRES.SND" files, the details of which were, again, hidden in some binary blob somewhere (although most were simply direct OPL2 register dumps).



An example is the GENMIDI lump used in Doom engine games (with the DMX sound library).



I know where you're taking it, but no utility I know of can use those directly, with the exception of MUSplayer for GENMIDI lumps and of Doom source ports with FM synthesis emulation, such as ZDoom.\



With FM Midi you could define all instruments by hand, if you can master the interface to that degree.



Also, a few games didn't use static FM timbres at all: e.g. Body Blows had an unusually complex sound system which generated very rich FM music with sound feedback and direct speech synthesis without the use of samples. The only way to play those back are raw dump formats (Adplug supports those, though).




To the degree their FM engine is accurate ;-)



To the best of my knowledge, the FM emulator used in ZDoom is as good as FMMidi's, only not as versatile (an MCI driver version of either would be cool, though).



Being a digital system, there is One and Only One way to correctly implement it, and One and Only One output associated with a particular internal status. There are no analog parts in the OPL2 chips, so forget mythical stories about "analog warmth", about "different sounding chips" etc.



As long as the look-up tables for waveforms are identical , the same formulas and timings are used for applying effects etc. then each and every OPL2/OPL3 chip (and a properly made emulator) should just sound exactly the same, period.



Accounts of either sounding "different" is often due to one's being used to associating FM Sound with the particular speaker and soundcard setup he was using for years (most of us poor grunts used those nasty "1000 W PMPO Multimedia speakers", and older soundcards had on-board power amplifiers, which added their own distortion and colorizing to the sound). Some even had a built-in "3D" sound effect which did weird things to the sound like artificially widening channel separation or filtering the output.



Emulators just produce a "clean" output like the external output DAC of the OPL chips would produce.


And surprise, surprise, these sound nothing like how they actually sound when played in the actual games under DOS.



The problem with OPL playback is that the OPL chip is just a bunch of generic "noise making boxes" (voices). To play back MIDI, you have a collection of register values, one for each of the MIDI instruments. When you want to play an electric guitar sound, you load the appropriate register values for an electric guitar, and a noise somewhat like an electric guitar comes out.



The problem is that every game or other piece of software that plays OPL MIDI has a different set of register values that it uses. The same MIDI file played back under Doom and Windows will sound completely different, even though it's using the same hardware. You'll notice that if you're using Boom under DOS, even that plays back music differently to Vanilla Doom. It doesn't use the register values from the GENMIDI lump in the IWAD like Vanilla does.



I'm in the process of developing Chocolate Doom's OPL support, for which I'm aiming to do the exact same register writes that Vanilla Doom does. I'm also aiming to support hardware OPL passthrough (in addition to OPL emulation), so it should be possible to drive a real Soundblaster when it's all finished. I already have my Yamaha YMF724-based sound card playing back Dosbox raw OPL dumps :-)


I will definitely check that out, hopefully this new core is GPL compatible i.e. not using any of Jarek Burczynski's MAME code.



EDIT: omg they used Ken Silverman's ADLIBEMU code as a base.


Yeah, I already discussed this on IRC with the guy who's written the new code. The ADLIBEMU code isn't GPL compatible, but apparently there's basically nothing left of the original code anyway. It's all been rewritten.


Possibly, but it's written in C++ so I would have to adapt it. For the time being I'm going to proceed with the ScummVM emulator code and see how it goes. I want to get the actual playback code working first :-)


I just posted this to show that there's a way to make the Windows midi device sound like the old OPL/Adlib sounds we remember from years ago.

The things you suggest only play back midi files that are loaded, while this method, though not elegant, can be used in programs that just play back midi through the midi driver itself.



I actually haven't been using the OPL soundfont much, right now I've got the Airfont soundfont loaded, and I like having the ability to choose something other than the old Roland softsynth anyways. I also have Yamaha XG installed, but it gives me performance issues most of the time, and rgc:audio sfz does not, and lets me use whatever soundfonts I want.

Personally, I wish I could pry the sound card out of my old PC and shove it into this new one but I doubt it, especially since my current PC has one of those awful BTX motherboards.



It's nice to see these discussions going on, and to hear about stuff like Chocolate Doom's OPL support. :)


All (as far as I know?) sound cards with a "real" OPL in were ISA, and no modern motherboards have ISA slots, so that won't work. There are a few PCI cards that have legacy support that emulates OPL output (mentioned on the opl-branch page I linked to), but I'm not certain that the sound output is identical to a real OPL from these.

3a8082e126
Reply all
Reply to author
Forward
0 new messages