VOGONS


First post, by SkyHawk

User metadata
Rank Newbie
Rank
Newbie

If I have a game or music that is causing MUNTs output to clip (And I very nearly have one), what's the best way to resolve that in terms of maintaining as close to hardware fidelity as possible?

edit: Correction - One of Ultima Underworld's tracks does cause MUNTs output to clip. It's not audible, but Audacity shows the red bar of failure.

I can imagine turning down Master Volume a bit, but I could see that causing issues, especially with old MT-32 games that abuse bugs like Dune 2.

Does the balance between Output and Reverb remain correct if both are adjusted equally? Say dialing both back to 0.95 for instance.

Reply 1 of 10, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

I am not entirely sure what you want to achieve, but if you want to avoid overdrive distortion of the output signal, then your best friend is the Master Volume knob. The output gain is applied in the emulation of the analogue path, thus it won't help anyhow if the input signal is already distorted during mixing.

Another viable option to reduce distortions as much as possible would be to work with floating point samples. See the "Rendered Type" property. When "DAC Emulation Mode" is set to "High quality", the floating point signal is mixed without distortion, but potentially with some overshoot in case the volume is too high - in this configuration lowering the output gain will surely help.

Reply 2 of 10, by SkyHawk

User metadata
Rank Newbie
Rank
Newbie

Sorry for a bit of necromancy here, but I would like to confirm something if possible

tl;dr - I understand the concept of reducing output gain, but having separate output gain controls for reverb and non-reverb is breaking my brain. Can you confirm that applying identical settings for both will do what one would intuitively expect, without changing the relationship between the two in unforeseen ways?

non-tl;dr - If I was to adjust both "Output Gain" and "Reverb Output Gain" equally, say for example dialing both back to 0.8, would I get identical sound relative to having both at 1.0? I want to reduce the gain to avoid clipping, but I don't want to change the relationship between the non-reverb (what's the correct phraseology here?) and the reverb. Does this make sense? I'd like to be able to take, for example, a recording from both at 0.8, apply an Amplify in Audacity, and have functionally identical audio (relative to not tampering with output gains) come out the other end.

Would these settings work for this?

DAC Emulation Mode - High Quality
Analogue Output - Accurate analogue path emulation
Renderer Type - Float 32-bit
Output Gain and Reverb Output Gain - Adjust as needed, keeping both the same

If my understanding is correct, Master Volume could then be left alone at whatever the game or composition in question sets it to, regardless of the synth-type/romset being emulated, and the recording will remain "authentic-ish" with regards to reverb?

Reply 3 of 10, by NeoG_

User metadata
Rank Member
Rank
Member

The reverb gain adjusts the wet mix and shouldn't be changed unless you want to change the relative strength of the reverb effect as compared to the dry instruments. To avoid clipping you only need to adjust the output gain.

Or to put it another way, the output gain applies to everything, the reverb gain applies only to reverb

98/DOS Rig: BabyAT AladdinV, K6-2+/550, V3 2000, 128MB PC100, 20GB HDD, 128GB SD2IDE, SB Live!, SB16-SCSI, PicoGUS, WP32 McCake, iNFRA CD, ZIP100
XP Rig: Lian Li PC-10 ATX, Gigabyte X38-DQ6, Core2Duo E6850, ATi HD5870, 2GB DDR2, 2TB HDD, X-Fi XtremeGamer

Reply 4 of 10, by Falcosoft

User metadata
Rank l33t
Rank
l33t
SkyHawk wrote on Today, 10:35:

...
Output Gain and Reverb Output Gain - Adjust as needed, keeping both the same.
...

NeoG_ wrote on Today, 11:21:

...To avoid clipping you only need to adjust the output gain...

Output gain cannot prevent clipping if the clipping occurs earlier in the digital synth engine (e.g due to many Midi Note On messages with high velocity values). As Sergm said earlier:

...The output gain is applied in the emulation of the analogue path, thus it won't help anyhow if the input signal is already distorted during mixing.

On the contrary the Master Volume can prevent such clipping since it affects the overall volume of the synth engine itself so the attenuation occurs earlier.

Using floating point samples can also prevent clipping (but only indirectly) because unlike integer samples (that have hard limits) floating point samples have only soft limits.
Normalized floating point samples have values between -1.0 and +1.0 by convention but values outside of this range can also be stored so clipping never occurs in the strict sense.
In case of 16-bit integer samples there is no way to store values outside of the -32768 ..+32767 range so clipping can and does occur.

If you also record in floating point format then you can always re-normalize the samples e.g. in Audacity without loosing any information.
This way the 'clipped' samples with the highest value outside of the -1.0..+1.0 range become the new peak values (-1.0 or +1.0). Your overall volume will decrease somewhat but signal quality and dynamics are preserved.

Website, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper
x86 microarchitecture benchmark (MandelX)

Reply 5 of 10, by SkyHawk

User metadata
Rank Newbie
Rank
Newbie
NeoG_ wrote on Today, 11:21:

The reverb gain adjusts the wet mix and shouldn't be changed unless you want to change the relative strength of the reverb effect as compared to the dry instruments. To avoid clipping you only need to adjust the output gain.

Or to put it another way, the output gain applies to everything, the reverb gain applies only to reverb

Thank you. This is why I ask questions.

Falcosoft wrote on Today, 14:13:
Output gain cannot prevent clipping if the clipping occurs earlier in the digital synth engine (e.g due to many Midi Note On mes […]
Show full quote
SkyHawk wrote on Today, 10:35:

...
Output Gain and Reverb Output Gain - Adjust as needed, keeping both the same.
...

NeoG_ wrote on Today, 11:21:

...To avoid clipping you only need to adjust the output gain...

Output gain cannot prevent clipping if the clipping occurs earlier in the digital synth engine (e.g due to many Midi Note On messages with high velocity values). As Sergm said earlier:

...The output gain is applied in the emulation of the analogue path, thus it won't help anyhow if the input signal is already distorted during mixing.

On the contrary the Master Volume can prevent such clipping since it affects the overall volume of the synth engine itself so the attenuation occurs earlier.

Using floating point samples can also prevent clipping (but only indirectly) because unlike integer samples (that have hard limits) floating point samples have only soft limits.
Normalized floating point samples have values between -1.0 and +1.0 by convention but values outside of this range can also be stored so clipping never occurs in the strict sense.
In case of 16-bit integer samples there is no way to store values outside of the -32768 ..+32767 range so clipping can and does occur.

If you also record in floating point format then you can always re-normalize the samples e.g. in Audacity without loosing any information.
This way the 'clipped' samples with the highest value outside of the -1.0..+1.0 range become the new peak values (-1.0 or +1.0). Your overall volume will decrease somewhat but signal quality and dynamics are preserved.

Thank you also. I understood that using floating-point somehow "avoided" clipping, but I didn't really understand how or why - now I understand that it doesn't avoid the clipping, but it does allow you to store the clipping and fix it in post (by attenuating or normalizing the audio) without distortion to the audio. Adjusting munt's output gain is effectively doing exactly that, right at the source rather than doing it later, and that can only work if the synth engine itself is working in floating point.

I think some of my confusion might have been avoided had the "Output Gain" control been called perhaps "Master Output Gain", and if the "Reverb Output Gain" control was further up in the Synth Properties dialog, along with the rest of the Reverb parameters. Would these be reasonable enhancement requests for munt?

Reply 6 of 10, by Falcosoft

User metadata
Rank l33t
Rank
l33t
SkyHawk wrote on Today, 18:34:

...Adjusting munt's output gain is effectively doing exactly that, right at the source rather than doing it later, and that can only work if the synth engine itself is working in floating point.

No, as I and Sergm also said 'Output Gain' does NOT do that. Only the 'Master Volume' does that.

Website, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper
x86 microarchitecture benchmark (MandelX)

Reply 7 of 10, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

After some time passed by, I feel that these gain settings look rather confusing. Also their relation to the Master Volume isn't very intuitive. Marking this as an urge to improve the documentation.

Note, this topic should be covered by the recent feature, so that one could simply make the Master Volume fixed at a level that doesn't induce the integer overflow / clipping (depending on the DAC emulation mode). Yet we've always had reverb settings overrides, which enables one to prevent clipping in the emulated reverb circuit. I believe, all three controls ought to be placed in the same area, under the LCD, for added convenience and to reduce confusion a bit.

Reply 8 of 10, by SkyHawk

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on Today, 18:38:
SkyHawk wrote on Today, 18:34:

...Adjusting munt's output gain is effectively doing exactly that, right at the source rather than doing it later, and that can only work if the synth engine itself is working in floating point.

No, as I and Sergm also said 'Output Gain' does NOT do that. Only the 'Master Volume' does that.

Okay, now I'm confused. I thought:
a) Master Volume would allow you to avoid clipping in the first place, at the potential consequence of screwing up games that abuse bugs and assume maximum Master Volume like Dune 2.
b) Output Gain would allow you to handle and store clipping during generation, but attenuate the audio to eliminate the clipping before it leaves munt. Using Output Gain in this way requires the synth engine is using floating point internally, which means both (DAC Emulation Mode - High Quality) and (Renderer Type - Float 32-bit) settings.

Reply 9 of 10, by SkyHawk

User metadata
Rank Newbie
Rank
Newbie
sergm wrote on Today, 18:59:

After some time passed by, I feel that these gain settings look rather confusing. Also their relation to the Master Volume isn't very intuitive. Marking this as an urge to improve the documentation.

I think the thing I'd most like to see is some headings and groupings in the Synth Properties dialog. For example:

-- Render Engine --
DAC Emulation Mode
Renderer Type
[Master Volume Set/Lock?]
[Master] Output Gain
Max Partials
Nice Amp Ramp / Nice Partial Mixing

-- Reverb Engine --
Reverb Enabled
Reverb Mode
Reverb Time
Reverb Level
Reverb Output Gain

-- MIDI Tweaks --
[or perhaps a Master Volume lock belongs here?]
MIDI Delay Mode
Reverse Stereo / Nice Panning
Set channels
Use Alternative Channel assignments on start

Last edited by SkyHawk on 2026-02-07, 22:32. Edited 1 time in total.

Reply 10 of 10, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Yes, re-grouping settings or moving to separate dialogs would make stuff clearer, I hope. OTOH, the gain / volume controls should be accessible easier, that's my gut feeling.