Adlib stereo in DOSBox?

Getting old DOS games working on modern hardware. (DOSBox topics belong in DOSBox areas below, not here).

Adlib stereo in DOSBox?

Postby Spikey » 2016-9-08 @ 14:41

Hey folks,

I know with real hardware, some players of (for example) Apogee games were able to get amazing stereo sound by using two OPL3 cards simultaneously. It sounded way better than the usual mono sound.
Also, emulated Adlib sound such as in the AdPlug WinAmp plugin and the DSx86 project feature Adlib pseudo-stereo.

My question is- is there a fork of DOSBox that features forced dual OPL3 Adlib, or allows pseudo-stereo effects so you can hear Adlib music in stereo? I know technically that would not be accurate emulation, but I'm not after that- I'm after the best gameplay experience. I love playing on my DS with stereo sound, but hate the screen limitations.

(To be clear, I'm asking for stereo playback in games that, emulated accurately and basically, would play in mono.)

Thanks in advance. :)
User avatar
Spikey
Member
 
Posts: 254
Joined: 2003-2-04 @ 10:36
Location: South Australia

Re: Adlib stereo in DOSBox?

Postby Jepael » 2016-9-08 @ 14:45

I've never heard of a game using two OPL3 cards simultaneously. Which games would that be?

Cards with dual OPL2 for stereo do exist, and single OPL3 is kind of two OPL2 chips in one package, but more features.
Jepael
Oldbie
 
Posts: 1195
Joined: 2005-6-15 @ 19:28
Location: Finland

Re: Adlib stereo in DOSBox?

Postby NewRisingSun » 2016-9-08 @ 18:05

You can either use a fake stereo similar to 1960's U.S. Beatles LPs, by making one channel louder than the other (thereby seemingly panning towards that channel) while delaying that same channel a millisecond or two (thereby seemingly panning it back to the center). That's processing on the level of the output waveform.

Or you could use a fancy FM player (or add to DOSBox that same functionality) that assigns each of the 9 OPL2 channels to a different panpot position, and possibly also reassign notes from 9 OPL2 channels to 18 OPL3 channels, to allow all notes to properly sound out. That's why my FMPLAYER utility does. Consider these examples (FLAC files):

The Armageddon Machine, from Commander Keen 5. Note how reassigning channels stops the clarinet at the beginning from exhibiting those annoying clicks heard in the original game.
The Cloud, from AdLib Music Synthesizer Card Song Disk #7 "New Age Echoes", and badly stolen and ruined by Creative Labs for their cheesy "Sound Blaster 16 Features" demo.

But no, I don't think a DOSBox fork like that exists.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Adlib stereo in DOSBox?

Postby Spikey » 2016-9-12 @ 11:08

There has been cases of Apogee fans using two OPL3 chips to get stereo sound:
http://publiccommanderkeenforum.yuku.co ... ect-OPL3X2

To be more precise about my original post, I'm talking about the techniques used in AdPlug, which were used in DSx86, basically DOSBox for Nintendo DS. I figured it would be easy to put the code in, as an optional feature or fork.
The concepts here are essentially the same as the above old thread, use two synths either which are generating slightly different waveforms, or which are slightly delayed from each other, and play them on left and right channels to create rich stereo.

From the AdPlug readme:
"Output Tab:
-----------
- Emulator 1 -
This output method uses a very accurate OPL emulator, which was originally
written by Tatsuyuki Satoh, but was later improved by Jarek Burczynski.

- Harmonic Effect -
This option fully utilizes a process that pitch-shifts OPL2 data very
slightly on one channel in order to produce a psuedo-stereo Phaser-like
effect from a mono source. Two copies of "Emulator 1" are generated for it
to accomplish this goal. Note that a prerequisite for this option to work
is that "Emulator 1" must be selected as the chosen emulator. Also note
that this option will force 16-Bits Stereo modes, and you will not be able
to change either of those options unless this option and "Dueling Synths"
are both disabled.

- Emulator 2 -
This output method uses a somewhat inaccurate OPL emulator, which was written
by Ken Silverman.

- Dueling Synths -
This option utilizes the OPL2 Synth Wrapper's ability to host two separate
streams of OPL2 data simultaneously and output the combination as 16-Bits
Stereo PCM data. One copy each of Mr. Satoh's and Mr. Silverman's
emulators are generated for it to accomplish this goal, with them being
heard respectively on the left and right channels. Please note that a
prerequisite for this option to work is that "Emulator 2" must be selected
as the chosen emulator. Also note that this option will force 16-Bits
Stereo modes, and you will not be able to change either of those options
unless this option and "Harmonic Effect" are both disabled. "


For me, both are more enjoyable ways to listen to OPL audio, and one of which is implemented in DSx86 (forget which). Of course, I would rather play on a big screen than a DS :)

Also worth noting that both DOSBox and DSx86 credit Satoh/Jarek and Silverman for FM synthesis application, although DSx86 author Patrick Aalto mentions he "heavily optimized" it.
User avatar
Spikey
Member
 
Posts: 254
Joined: 2003-2-04 @ 10:36
Location: South Australia


Return to DOS

Who is online

Users browsing this forum: No registered users and 9 guests