VOGONS


First post, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

If anyone care about sound here are some results after careful measurement and comparison with real SB cards and SC-55.

If you are interested in the procedure go to this thread: FM and PCM Volume Balance of SB Cards
To measure the dB balance between PCM and FM with a real SB card in DOS I had to run a sinewave test tones for the PCM and FM using various DOS programs and measure the difference between them in dB, I did the exact same procedure in DOSBox.
DOSBox FM was around 2-3dB louder than with a real SB cards (SBPro,SB16,SB2.0).

To calibrate volume balance between a hardware SC-55 and SC-VA I used a midi file (attached) I created to adjust the output between them.
Then after careful listening with various games I found an output value for dosbox to be in balance with SC-VA and a real SC-55.

For DOSBox to have the perfect mixer balance between SC-VA and its output, one has to set the Master in DOSBox to 50.
To have a realistic balance between FM and PCM one has to set FM in DOSBox mixer to 75, edit: fixed in SVN r4012, keep it at 100.
The PC Speaker emulation in ECE is way louder than the rest, so a good value after careful testing is 25.

For S-YXG50 to be in balance with SC-VA and DOSBox (at 50), S-YXG50 "Output Level" inside the plugin setup should be set to -10db.

MUNT has to be set to 70 in windows mixer because there is not internal master volume control.

EDIT: FM volume is fixed in SVN r4012, no need to change FM volume, keep it 100, and use the latest SVN.
The final command that once has to place in DOSBox autoexec.bat section:

mixer master 50 spkr 25

Attachments

  • Filename
    Sinewave tone.7z
    File size
    461 Bytes
    Downloads
    75 downloads
    File license
    Fair use/fair dealing exception
Last edited by James-F on 2019-02-15, 06:54. Edited 7 times in total.


my important / useful posts are here

Reply 1 of 9, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

Another issue is DOSBox SDL (sound core) clips the audio signal when master is set to 100.

When DOSBox master set to 100 it clips the peaks of audio signal in games when PCM and FM (or other source like CD audio) playing together.
Many dos games use PCM samples right at the edge of digital scale -0.1dbFS, add FM/CD/SPKR/MT32 sounds on top of that and you clip some of the final mixed waveform, this actually happens in DOSBox.
With the hardware SB card the internal mixing has some headroom so nothing is clipped internally.
That's why it is wise to set the Master in DOSBox to 50 so you will have headroom when combining all other sound sources together.
I believe that 'master 50' should be the Default in DOSBox for the reason stated above, and because DOSBox is very loud as it is.

Here is an example of an explosion in Supaplex, it reaches full digital scale (but doesn't clip) WITHOUT any other source like FM music or CD audio.
Add FM music together with PCM sounds and you have clipping in DOSBox SDL, before it reaches Windows mixer.
74nyos4hai04glazg.jpg

Here is the very same explosion waveform (right) looks with "mixer master 50" together with some FM music (left):
x8qorgef2d5cgdizg.jpg

Notice there is content above the red line when there is PCM and FM together, this content is clipped when DOSBox master is set to 100.
Some games will reach 0.0dbFS even with "master 50" because the FM music (or CD audio) and PCM sound together are loud, but this is rare.
I don't have any idea how SDL handles audio peaks, whether it clips or compresses them, but I definitely know that to prevent that completely better have some headroom.
All this BEFORE Windows mixer which adds SC-VA (or MUNT) music on top of the already peaked DOSBox sounds at master 100, which distorts the windows mixer itself.
So it should be obvious that 'master 100' (default) in DOSBox is much too loud and results in many distortions down the chain.
As an audio enthusiast I care about proper gain staging and preventing distortion between them.

The following command should be added in your autoexec.bat at bottom of dosbox configuration file.

mixer master 50 spkr 25

Keep the separate volumes in Windows mixer at maximum for SC-VA, MUNT, S-YXG50 and DOSBox, but you can still tweak the master volume in widows.

In my experience this will produce a good balance between FM, PC-Speaker, and MIDI (SC-VA).
Games that use PC Speaker and FM together should sound balanced with ECE and the PC-Speaker patch.

Last edited by James-F on 2017-05-11, 17:10. Edited 2 times in total.


my important / useful posts are here

Reply 2 of 9, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

This is very important, not just from an audio quality perspective but from an equipment perspective. High energy content at high frequencies due to the square wave from clipping can wreak havoc with tweeters. Bottom line, check your levels.

All hail the Great Capacitor Brand Finder

Reply 3 of 9, by James-F

User metadata
Rank Oldbie
Rank
Oldbie
gdjacobs wrote:

This is very important...Bottom line, check your levels.

The problem is that Default levels in DOSBox are already way into clipping/distortion territory, and your average Joe is completely oblivious to that.
DOSBox basically mixes multiple sources that each one of them already reaches full digital scale; the resulting mix is clipped by default because the master mix has zero headroom.
The hardware SB does NOT clip the master mix that goes out from the analog mixer chip, the audio signal has plenty of headroom before the amplifier chip.


my important / useful posts are here

Reply 4 of 9, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

I wonder if instead of or in addition to adjusting default levels, DOSBox could include a software clipping detector with warning output as with most mixer tables.

All hail the Great Capacitor Brand Finder

Reply 6 of 9, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

Dosbox with 'master 50' balanced to SC-VA with other synths balanced to them.
MUNT sounds quite balanced at default settings but 70 in windows mixer might sound more balanced with other synths in games that support FM, MT-32 and General MIDI.
Yes, DOSBox master is always at 50 with all the plugins.

Here are some waveform of games that support all the formats:
tvuim9h8xt228h2zg.jpg
a04a0obif2h0kt1zg.jpg

I also tested Supaplex, DOTT and Monkey Island.


my important / useful posts are here

Reply 7 of 9, by lukeman3000

User metadata
Rank Member
Rank
Member

Hi James -

What about, for example, in King's Quest VI; if I'm using ECE with integrated MUNT and I set mixer master to 50, it lowers both MUNT and the sound blaster sound effects to the point where the music is way too soft.

So, would it be correct to instead use mixer sb 50, so that the music level stays the same and the sound blaster sound effects are the only thing that are lowered?

Or in other words, what mixer setting(s) should I use to correctly mix the music and the sound effects when using the integrated MUNT (in DOSBox ECE r4025)?

Reply 8 of 9, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

I haven't used the integrated MUNT so I can say nothing about it volume-wise.
The problem with lowering SB channel is the game can change it back.
I suggest using the external MUNT or FSMP with Munt32 VSTi which are up-to-date.


my important / useful posts are here

Reply 9 of 9, by lukeman3000

User metadata
Rank Member
Rank
Member
James-F wrote:

I haven't used the integrated MUNT so I can say nothing about it volume-wise.
The problem with lowering SB channel is the game can change it back.
I suggest using the external MUNT or FSMP with Munt32 VSTi which are up-to-date.

After I set Munt VSTi to 70, does this mean that no additional settings need to be changed for the DOSBox mixer? In other words, Munt VSTi set to 70 means that mixer master is set to 100?

Also, if I want to lower the volume of Munt, how do I lower the master accordingly? For example, if I lower munt to 50, do I lower the master to 80 (100 - 20)?

Also, if you're using Tandy as a machine type, I think you might want it to look like this:

mixer master 50 spkr 25 tandy 50

That seems to provide a good balance, although I'm not sure if this is "correct" or not.