VOGONS


Real MIDI emulation?

Topic actions

First post, by jez

User metadata
Rank Member
Rank
Member

DOSBox's current MIDI support simply passes MIDI data through to a system MIDI interface. This is fine as far as it goes, but unless you have nice MIDI sound hardware, things can sound rather terrible. For example, the default Windows XP MIDI synth is 'Microsoft GS Wavetable SW Synth', possibly the most terrible synthesizer of all time. Unsurprisingly, MIDI from DOSBox sounds terrible with this synth.

So, how about DOSBox having the option to actually emulate MIDI well, instead of passing it through? I know it varied between soundcards but perhaps we could aim for emulating one of the best, like AWE64 or something... so most games sound good?

On a related note... does anyone know of any decent free software synthesizers for Windows XP that actually use the Win32 plugin architecture? I mean there are tons that appear in their own software players, but I can't find any free ones that actually appear in the 'Sounds and Audio Devices' MIDI music playback dropdown. 😀

== Jez ==

Reply 1 of 38, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

Timidity++ and some manual work. Can't see why DOSBox needs its own MIDI rendering functionality. Maybe for mobile/handheld devices without native MIDI playback.

Reply 2 of 38, by Great Hierophant

User metadata
Rank l33t
Rank
l33t
jez wrote:

DOSBox's current MIDI support simply passes MIDI data through to a system MIDI interface. This is fine as far as it goes, but unless you have nice MIDI sound hardware, things can sound rather terrible. For example, the default Windows XP MIDI synth is 'Microsoft GS Wavetable SW Synth', possibly the most terrible synthesizer of all time. Unsurprisingly, MIDI from DOSBox sounds terrible with this synth.

So, how about DOSBox having the option to actually emulate MIDI well, instead of passing it through? [/quote]

The legal, performance, and accurate emulation issues surronding Munt are among the principal reasons why midi sound hardware will not be emulated in DOSBox.

jez wrote:

I know it varied between soundcards but perhaps we could aim for emulating one of the best, like AWE64 or something... so most games sound good?

On a related note... does anyone know of any decent free software synthesizers for Windows XP that actually use the Win32 plugin architecture? I mean there are tons that appear in their own software players, but I can't find any free ones that actually appear in the 'Sounds and Audio Devices' MIDI music playback dropdown. 😀

The Sound Blaster AWE sound cards's ROM samples are not widely considered good. Their RAM samples are contained in Soundfonts and vary widely in quality. Any sound card that is compatible with sountfonts (including all Creative cards from the AWE32 to the X-Fi) should be able to work almost as well as a hardware AWE32/64. By selecting the soundfont midi in the Control Panel, you can get the same or a very similar experience.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 3 of 38, by jez

User metadata
Rank Member
Rank
Member
ADDiCT wrote:

Timidity++ and some manual work. Can't see why DOSBox needs its own MIDI rendering functionality. Maybe for mobile/handheld devices without native MIDI playback.

Care to point me somewhere that tells me what that 'some manual work' is? I remember reading a while back (annoyingly I can't find it now) that MS totally changed the MIDI plugin architecture from 98 to NT/XP, and so now it's quite hard to develop MIDI plugins for Windows (it either used to use DLS or now uses DLS).

Great Hierophant wrote:

The legal, performance, and accurate emulation issues surronding Munt are among the principal reasons why midi sound hardware will not be emulated in DOSBox.

What legal issues? I can't find anything relating to that. As to accuracy and performance, suraly that's the kind of thing that can just improve over time?

By selecting the soundfont midi in the Control Panel, you can get the same or a very similar experience.

I have onboard sound! 😀 No chance of any custom sound-card driver being installed on this box, or any laptop for that matter. Software emulation is needed.

== Jez ==

Reply 5 of 38, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I have onboard sound! 😀 No chance of any custom sound-card driver being installed on this box, or any laptop for that matter. Software emulation is needed.

You don't have a PCI/PCI Express/PCMCIA/USB port? Odd....

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 6 of 38, by collector

User metadata
Rank l33t
Rank
l33t
DosFreak wrote:

I have onboard sound! 😀 No chance of any custom sound-card driver being installed on this box, or any laptop for that matter. Software emulation is needed.

You don't have a PCI/PCI Express/PCMCIA/USB port? Odd....

I was thinking the same thing. There is a PCMCIA version of the XFi which I believe has SoundFont support.

http://us.store.creative.com/Sound-Blaster-XF … /B001BS3A3E.htm

Reply 7 of 38, by robertmo

User metadata
Rank l33t++
Rank
l33t++

Timidity++ works in every windows version.
Windows 7 + DOSBox MIDI = Problems!
The only problem is I don't know any good sound font to load 😀
Dune 2 intro doesn't play sfx correctly in any sound font i tried.
Does anyone know a sound font that will handle Dune 2?

Reply 8 of 38, by jez

User metadata
Rank Member
Rank
Member

Well I have Timidity++ installed on XP now and selected as the default MIDI output, but for some reason DOSBox locks up when I try to play monkey island 2 with MIDI enabled, even though I can play MIDI files fine through Media Player Classic or Winamp. 😀 Oh well.

== Jez ==

Reply 10 of 38, by Zirias

User metadata
Rank Newbie
Rank
Newbie

When I first dropped my AWE32, I installed timidity and thee "eaw patches", and i'm still quite happy with this sound. You could download them for example here: "http://gentoo.mirrors.pair.com/distfiles/eawp … s12_full.tar.gz"

No idea how exactly timidity hooks into a windows system, on my linux box, it just shows up as an ALSA midi device. dosbox just used it after selecting MIDI device "128:0".

And in my opinion, adding a software synthesizer to dosbox would be a really bad idea. There are projects perfectly suited for this, like timidity or fluidsynth, and don't forget -- one job, one tool.

Reply 12 of 38, by jez

User metadata
Rank Member
Rank
Member
robertmo wrote:

BTW - I had to use MIDI Yoke. I guess you are using some timidity driver. So try timidity program with MIDI Yoke driver.

OK, well it doesn't seem to lock up when I use MIDI Yoke. Turns out Monkey Island 2 sounds better with Adlib...

Anyhow, all the screwing around I had to do to get MIDI to work with a relatively common OS goes to show how good it'd be if DOSBox had built-in MIDI emulation. I understand that it's hard to do quickly but I don't see why it shouldn't be a long-term goal of the project.

Zirias wrote:

And in my opinion, adding a software synthesizer to dosbox would be a really bad idea. There are projects perfectly suited for this, like timidity or fluidsynth, and don't forget -- one job, one tool.

Not really. With DOSBox right now, you get a 'DOS machine emulator', including a CPU, multiple graphics cards, a few sound cards, mouse, joystick, serial ports, and more. This is not a tool, it's a virtual machine. 😀

Adlib and the PC speaker were emulated by DOSBox because some machines using DOSBox mightn't have devices that supported playback of them, and they frequently made playing DOS games more enjoyable. I don't see how any of that fails to apply to MIDI, either. As was said before; I had a hard time getting halfway-decent MIDI to work. Many systems won't have any native MIDI support at all.

== Jez ==

Reply 13 of 38, by Zirias

User metadata
Rank Newbie
Rank
Newbie

It is a virtual machine, emulating some standard opl/fm-synthesizer, that's fair enough. If you want more, just install a decent software synthesizer, that's really not much to do. As I said before, dosbox just worked in a environment where I had already set up timidity. Such a high quality synthesis is in no way paret of a "typical dos machine" emulation and should better left handled by specialized tools.

Reply 14 of 38, by jez

User metadata
Rank Member
Rank
Member

Of course it is - most later DOS machines would've had sound cards in with built-in MIDI support. And you haven't tackled devices for which there simply isn't MIDI synth software written.

== Jez ==

Reply 15 of 38, by Kisai

User metadata
Rank Member
Rank
Member

Just to add my 2 cents,

Older games that supported MT-32, did so because that's what the music was developed on. The games usually contained completely separate adlib/soundblaster (OPL-2) tracks, and later games had a generic "General Midi" driver.

So getting a "real MIDI" synth with dosbox is kinda going into hardware that the average person didn't have when they played these games. The Gravis Ultrasound (If you could ever get it to work back in the day) was the only wavetable sound card that forced adlib/soundblaster emulation through it's wavetable. If you had a real AWE32 or 64 (I did) when you played a dos game that expected an adlib or sound blaster, you got adlib/soundblaster OPL-2 music, not wavetable.

So the only real target's are MT-32, General Midi (and use an external synth independent of DosBox), or Adlib emulation.

If someone wanted to actually make a legal MT-32 romset without using any of Roland's material, they could very well do so, but that's also outside the scope of dosbox, and I wouldn't expect it. One of the advantages ScummVM has is that it emulates the virtualmachines of the game, and can remap the play music functions, this can include remapping the sound to play a FLAC/OGG of what the music is supposed to sound like, and thus never having to worry about emulating a synth.

Reply 16 of 38, by jez

User metadata
Rank Member
Rank
Member
Kisai wrote:

Just to add my 2 cents,

Older games that supported MT-32, did so because that's what the music was developed on. The games usually contained completely separate adlib/soundblaster (OPL-2) tracks, and later games had a generic "General Midi" driver.

Why did they offer Adlib *and* MIDI as an option? Were there soundcards that only supported MIDI?

So getting a "real MIDI" synth with dosbox is kinda going into hardware that the average person didn't have when they played these games.

Huh? There are numerous DOS games from the later era that *only* offer music via MIDI. Mad TV 2 and Daggerfall are two that come to mind right off the top of my head, I'm sure there were many more.

The Gravis Ultrasound (If you could ever get it to work back in the day) was the only wavetable sound card that forced adlib/soundblaster emulation through it's wavetable. If you had a real AWE32 or 64 (I did) when you played a dos game that expected an adlib or sound blaster, you got adlib/soundblaster OPL-2 music, not wavetable.

Given that I'm not suggesting emulating Adlib through MIDI, I'm not sure what this has to do with anything. 😀

So the only real target's are MT-32, General Midi (and use an external synth independent of DosBox), or Adlib emulation.

Adlib is already emulated. Why must general MIDI be through an external synth? And as for MT-32 (which by the way is just another MIDI synth, albeit a famous one)...

If someone wanted to actually make a legal MT-32 romset without using any of Roland's material, they could very well do so, but that's also outside the scope of dosbox, and I wouldn't expect it.

Why? It seems to fit very comfortably inside the scope of DOSBox to me; PC speaker, GUS, SoundBlaster, and Adlib (OPL) cards are already emulated. What's so different about MIDI?

One of the advantages ScummVM has is that it emulates the virtualmachines of the game, and can remap the play music functions, this can include remapping the sound to play a FLAC/OGG of what the music is supposed to sound like, and thus never having to worry about emulating a synth.

Well yeah. That's obviously totally different because they can focus on getting a few specific games exactly right rather than being a general-purpose emulator.

By the way, it looks like there was a project to do just that, and integrate MT-32 emulation into DOSBox here, but for some reason it was abandoned years ago. Perhaps the code there could be picked up? I'm not demanding this now or anything, just asking why it shouldn't be a long-term goal. 😉

== Jez ==

Reply 18 of 38, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

mt32 emulation was developed using the dosbox codebase,
however because of possible legal issues and the fact that more people /projects could benefit from it if it was a seperate emulator, caused it to become a seperate emu.

Water flows down the stream
How to ask questions the smart way!

Reply 19 of 38, by Kisai

User metadata
Rank Member
Rank
Member
jez wrote:
Kisai wrote:

Just to add my 2 cents,

Older games that supported MT-32, did so because that's what the music was developed on. The games usually contained completely separate adlib/soundblaster (OPL-2) tracks, and later games had a generic "General Midi" driver.

Why did they offer Adlib *and* MIDI as an option? Were there soundcards that only supported MIDI?

Take something like the Sierra Command Interperter (SCI), every game has a "map" of how to play the midi data. This map and how to interface with the hardware is in the driver.

So if you select 'MT-32' in the driver, it's going to send out midi commands assuming there is a MT-32 device. If there's no device, you get nothing, and if the device is something else, the instruments won't match up. This is what happens when you select MT-32, but only have the Windows GS wavetable, is that the instrument patch map doesn't match, and what you get is some awful music.

And the MT-32 wasn't just a "wavetable" device, it had it's own synth's and was programmable, which is why you can't simply map it's instruments into General Midi.

If the game only has an Adlib/OPL-2 track, then there is nothing you can really do get general midi out of it that doesn't involve significant effort.

If the game was developed specifically to use General Midi, then the Windows GS synth would be passable, and there are options to use other types of softsyths like Timidity http://timidity.sourceforge.net/ ( see Timidity++ and DosBox? )

Adlib is already emulated. Why must general MIDI be through an external synth?

Because Dosbox doesn't emulate a full blown softsynth.