VOGONS

Common searches


First post, by ChairoNoMe

User metadata
Rank Newbie
Rank
Newbie

I am enjoying the emulated MIDI sound in dosbox, it's very authentic. Is there any way to get that authentic sound when playing MIDI files outside of dosbox with timidity? Right now my Privateer MIDIs that I downloaded sound really bizarre because timidity is using a modern soundfont.

Reply 1 of 29, by Snover

User metadata
Rank l33t++
Rank
l33t++

You are thinking of the "AdLib" sound, yes? That's what's called "FM synthesis". Modern MIDI uses "wavetable synthesis". (Thinking back, I can't believe that it wasn't always wavetable, but hey, memory used to be expensive.)

Yes, it’s my fault.

Reply 3 of 29, by ChairoNoMe

User metadata
Rank Newbie
Rank
Newbie

If adlib sound is what my old trusty Sound Blaster 16 MIDI sounded like back then, then yes. In other words, I want exactly what dosbox is using to play midi sound to play midi files. Is there a soundfont or timidity patch file available that does this?

Reply 4 of 29, by Guest

User metadata

I don't know what kind of sound card you have, but if it is a SBLive or Audigy then use the 2 meg soundfont 2mbgmgs.sf2 for that classic DOS game music. I had it loaded to reduce memory while recompiling my system and forgot to switch back to Unison. I loaded up Privateer and it sounds much the same as it used to, using General Midi and ALSA.

My question is what Midi IRQ do you give Privateer? When you select General Midi, it suggests address 0x330 and then asks for an IRQ. I am using IRQ 9 and it seems to be working, but there isn't any place in the DOSBox config file to specify the General Midi IRQ.

Reply 5 of 29, by ChairoNoMe

User metadata
Rank Newbie
Rank
Newbie

I can't really help you on your dosbox.conf question. I can show you my file if you'd like

I do have a SB Live lying around here. Are you suggesting that I can listen to MIDI files without using timidity if I install that?

Reply 6 of 29, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

ChairoNoMe: Unless your SB16 back in the day had a MIDI daughter board installed, you were using Adlib/OPL/FM synthesis music in the game. Try running the game's setup utility and picking that as an option instead of General MIDI or whatever you're using now.

General MIDI sounds more realistic, but to each his own 😀 (I almost prefer Firehawk in Adlib mode over MT-32 mode due to the nostalgia factor, so I understand)

Reply 7 of 29, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

I must agree with you. I have heard some oldies using MIDI under DOSBox and some of them sound better in ADLIB mode, in my humble opinion. Bloodnet comes to mind (dune too). I have even one that only has internal speaker and Roland sound support. Surprisingly enough, I prefer the internal speaker tune (Nightbreed arcade by Ocean). What a lame game. 😁

Reply 8 of 29, by ChairoNoMe

User metadata
Rank Newbie
Rank
Newbie

I wonder if adlib emulation code in dosbox is available as a soundfont. That might be the answer. Oh, and I tried using the 2mbgmgs.sf2 soundfont as recommended. Close, but not close enough.

Does anyone have an adlib sound font?

Reply 9 of 29, by Dou9st3r

User metadata
Rank Newbie
Rank
Newbie
ChairoNoMe wrote:

I wonder if adlib emulation code in dosbox is available as a soundfont. That might be the answer. Oh, and I tried using the 2mbgmgs.sf2 soundfont as recommended. Close, but not close enough.

Does anyone have an adlib sound font?

I doubt that there is an adlib soundfont. I know that I can use the adlib driver in dosbox, and it sounds like what I would expect. I'm running Gentoo Linux though, with a recent kernel, ALSA sound, and my main soundcard is a SBLive.

In Privateer at least, if I set oplmode=auto oplrate=22050 and then select Adlib music from the game setup menu it works and sounds authentic.

I do have a SB Live lying around here. Are you suggesting that I can listen to MIDI files without using timidity if I install that?

Well, I have hardware midi support on my system. I can load whatever soundfont I want and select General Midi from the game menu. I have Timidity installed also (the PyGame package currently needs it) but I don't usually run it because the hardware midi sounds better and is less resource-intensive.

Or, if you had an old midi keyboard around and had the proper joystick->midi plug, you could pipe the midi to the keyboard and let it play the music. That's pretty advanced and way beyond the scope of this thread though, and even that probably wouldn't sound like the Adlib chip.

Oh, that was my post above about the 2mbgmgs.sf2 soundfont. That's the closest thing to the Adlib that I am aware of, but when soundfont cards hit the market, they were considered an improvement over the FM Synthesis chips. Other than that, I don't know what else to suggest.

Reply 10 of 29, by oneirotekt

User metadata
Rank Member
Rank
Member

I wonder if it would be possible to write a MIDI driver for Windows / Linux etc, kind of like Canadacow et al's MT-32 driver, that used Adlib FM synthesis? You could play regular MID files and hear them as they played on an old machine (running Windows 3.1 or some such)!

The difference between FM synthesis and soundfont-based General MIDI is huge to my ear. Soundfonts are crappy recordings of real instruments, while FM Synthesis is often just pure electronic music, unless the composer is deliberately trying to emulate a real instrument. Even "good" soundfronts like Unison that gobble up 70MB of RAM or more are still just sad, lifeless recreations of live instruments.

For that reason I almost always prefer the Adlib / FM version of a game tune versus the bland, generic soundfont MIDI. Viva chip music!

Reply 11 of 29, by Guest

User metadata
oneirotekt wrote:

I wonder if it would be possible to write a MIDI driver for Windows / Linux etc, kind of like Canadacow et al's MT-32 driver, that used Adlib FM synthesis? You could play regular MID files and hear them as they played on an old machine (running Windows 3.1 or some such)!

Good question. I don't know enough about the OPL chip to answer that question. I know that typical Midi tunes are written with the GS patchset in mind, which has something like 100 or so instruments, and I am not aware of any limitiation on the number of voices. On the other hand, the OPL chip may very well have a hardware limitation on the number of concurrent voices. I presume that the FM synthesis is similar to old analog synthesizers where you select waveform, attack, decay, etc. So, if the chip is in fact programmable, there would be no good way to make a patchset which would simulate all possible combinations. About the only way to do it would be to map the Midi instruments to FM synthesis parameters and play the midi through the actual OPL chip itself.

Reply 12 of 29, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Okay, I think something needs to be set straight here:

The only way to get an authentic reproduction of Adlib/OPL music in old DOS games is exactly the way DOSBox already does it: by emulating the Adlib *in* DOSBox.

Yes, you could make a MIDI driver for Windows that emulates an OPL chip, but *all* games that use Adlib/OPL music talk to the chip directly - NOT through MIDI commands! The OPL chip is a general sound synthesizer - it's not tied in any way to MIDI. Therefore, talking to a Windows MIDI driver that emulates an OPL chip would result in a different sound.

DOSBox already fully emulates Adlib/OPL hardware. All you have to do is tell the game in DOSBox to use an Adlib or Sound Blaster or OPL2/3 for music, and you'll get the exact same sounds you remember.

Reply 13 of 29, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Hmm... I'm sorry if my post was based on a misunderstanding. I see that you have MIDI files from games and want to use them to reproduce the Adlib music from games without running the game itself. Unfortunately, it's probably not possible to get a good reproduction of the sound that way. The best way would be for someone to add an OPL logging feature to DOSBox (if one doesn't already exist) to record the commands that games send to the virtual OPL chip. Then, an Adlib/OPL emulator could be made to play those recordings back.

Similar programs already exist for recording and playing back console game music.

Another option would be to play the games in DOSBox and have DOSBox log the sound to a WAV file, then compress it to MP3 to get an MP3 recording of Adlib music from games.

Reply 15 of 29, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
HunterZ wrote:

The best way would be for someone to add an OPL logging feature to DOSBox (if one doesn't already exist) to record the commands that games send to the virtual OPL chip.

It does exist already in DOSBOX. 😀

Mirek

Reply 16 of 29, by oneirotekt

User metadata
Rank Member
Rank
Member
HunterZ wrote:

Unfortunately, it's probably not possible to get a good reproduction of the sound that way.

That's true, accurate reproduction wasn't what I had in mind really, just an Adlib-flavored way to play MIDIs in a modern Windows situation. Of course, if playing MIDIs is all you need, you could just find a MIDI player for DOS that was written for Adlib cards.

Reply 17 of 29, by Guest

User metadata

I've asked this question before but I believe my topic got closed right after 😒

I've been looking for a synthesis soundfount for a long while. I found one for gameboy, it actually came a bit close, but it still wasn't the same.

I noticed that when selecting General MIDI in dosgames instead of soundblaster FM, it runs a lot faster (because it probably uses the windows driver).So if an OPL2 soundfont or anything close existed, people could enjoy near perfect adlib sound.

Actually, I believe that Dosbox is able to generate the sounds for the wavetable in some way. (by generating a lot FM samples, save them into wavs, en use those for a wavetable)
I know it's impossible to record all the combinations, but it would work somewhat for games that support General MIDI.
It would work for windows games that use MIDI (hexen, doom using the doomsday port) or for dosbox games that use general midi in their setup program IF dosbox uses the windows driver and doesn't sample them itself as it does with OPL2. I'm sure it would sound bad for a few games, but it is probably relatively easy to generate a wavetable with adlib sounds, and it would make a few fm Die Hards happy (and some dosbox games faster.)

Reply 19 of 29, by oneirotekt

User metadata
Rank Member
Rank
Member
Anonymous wrote:

So if an OPL2 soundfont or anything close existed, people could enjoy near perfect adlib sound.

See, this just isn't the case. If you've ever created or edited music for a chip like the OPL2, there are considerable differences between the way the music is stored and played back in MIDI versus whatever native-OPL2 implementation you're dealing with in a particular game, sequencer or otherwise.

Gross oversimplification time: unlike MIDI, FM synthesis isn't just a matter of playing notes on a staff with a particular "instrument", it includes realtime instrument programming (which is how you get all the neat effects) and generally working with the hardware on a much lower level. So even if you had a soundfont comprised of samples of an OPL2 playing common "instruments", it wouldn't sound anything like the original piece of music. At best you'd get OPL2-esque squarewaves and sawtooths, but the real character of that chip comes through in how it mixes those up and changes them over time.

So, long story short, there isn't an OPL2 soundfont for the same reason there isn't a C64 SID soundfont, an Amiga MOD soundfont, a SNES soundfont. Apples to oranjes to bananas.