Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverb width range discrepency between effect behavior and documentation #1455

Open
mrbumpy409 opened this issue Dec 22, 2024 · 4 comments · May be fixed by #1460
Open

reverb width range discrepency between effect behavior and documentation #1455

mrbumpy409 opened this issue Dec 22, 2024 · 4 comments · May be fixed by #1460
Labels
Milestone

Comments

@mrbumpy409
Copy link

FluidSynth version

2.4.1

Describe the bug

All of FluidSynth's reverb parameters have a range of 0–1, with the exception of width, which has a range of 0–100. However, the effective range for this parameter is actually 0–1, with 1 being 100% effect width. Values above 1 begin introducing an odd feedback into the reverb, and should be avoided.

At the very least, I believe this should be mentioned in the documentation, as the developers of software using FluidSynth frequently set the controls to the full 0–100 range. This often leads to control knobs where setting values between 0–1 is difficult or impossible due to the granularity of the control, and most of the usable knob range is in the weird feedback zone. QSynth has since limited its reverb width control to 0–1 based on my advice, and Drumstick MIDI Player will now also be doing the same.

Here is a test MIDI file and FluidSynth recordings rendered at the following reverb width settings:

  • 0 – 0% stereo width in the reverb effect (mono)
  • 0.5 – 50% stereo width in the reverb effect
  • 1 – 100% stereo width in the reverb effect
  • 5 – strange feedback/delay introduced into the effect
  • 10 – even more feedback
  • 50 – ...and more
  • 100 – ...a crap ton of feedback

Expected behavior

One of the following should happen, IMO:

  1. Clearly document that a reverb width setting of 0–1 corresponds to 0%–100% reverb stereo width and above that goes into undesired jank territory.
  2. Change the documentation to report the reverb width range as 0–1, leaving support for values up to 100 in the synthesizer for compatibility purposes.
@mrbumpy409 mrbumpy409 added the bug label Dec 22, 2024
@derselbst derselbst linked a pull request Jan 1, 2025 that will close this issue
@derselbst
Copy link
Member

0 – 0% stereo width in the reverb effect (mono)
0.5 – 50% stereo width in the reverb effect
1 – 100% stereo width in the reverb effect

I don't think this is actually intended here. AFAIK, the range 0-100 exists for historical reasons, because it was the default range of the corresponding shell command. And I just applied that range when turning it into a true setting in #49. In the reverb's code there's the following comment:

* - width (0 to 100): controls the left/right output separation.
* When 0, there are no separation and the signal on left and right.
* output is the same. This sounds like a monophonic signal.
* When 100, the separation between left and right is maximum.

There is also a comment about values >1:

/* The stereo amplitude equation (wet1 and wet2 below) have a
tendency to produce high amplitude with high width values ( 1 < width < 100).
This results in an unwanted noisy output clipped by the audio card.

I think whether or not a "ton of feedback" is induced also depends on the soundfont. E.g. take this tune, which I just added to the testsuite: MIDI + SF2 - even with width=100 it still sounds quite fine to me.

Yet I agree about the docs. #1460 elaborates on the synth.reverb.width setting, pls. have a look.


PS: Happy new year :)

@derselbst derselbst added this to the 2.4 milestone Jan 1, 2025
@mrbumpy409
Copy link
Author

The update to the documentation states "A value of 100 indicates maximum separation between left and right channels.", but I would argue the maximum separation is already achieved at 1. In fact, FluidSynth's reverb width between 0 and 1 behaves exactly like other reverb engines I've used when setting between 0% and 100% effect stereo width. Going above 1 doesn't really seem to increase the stereo width, at least as I can perceive it, but instead introduces the other attributes we've already discussed (louder, almost a "doubling" type attribute to the sound).

@derselbst
Copy link
Member

Looks like we need a third opinion. @jjceresa Happy new year to you! Since you've implemented the current FDN reverbator, what's your opinion on the meaning of the "reverb width" range?

@jjceresa
Copy link
Collaborator

jjceresa commented Jan 3, 2025

First of all happy new year to every one. Thanks for the work done in fluidsynth !
A few points of note related to reverb width meaning.

  1. The stereo unit comes directly from the previous reverb (freeverb) with width in the historical range [1..100].
    outR = 0.5(1 + width) inR + 0.5 (1 – width) inL
    outL = 0.5(1 + width) inL + 0.5 (1 – width) inR

  2. This unit receives at its input inR and inL which are very uncorrelated signals (i.e out of phase) resulting from FDN reverb.

I would argue the maximum separation is already achieved at 1.

That is right, and the formula in point (1) shows that. So width sub range [0..1] meaning should be perceived as a stereo width effect with 1 being the maximum stereo width.

Going above 1 doesn't really seem to increase the stereo width, at least as I can perceive it.

Yes, it increases the perception of uncorrelated signals inR, inL which aren't stereo channels because the reverb is a monophonic reverb. So width subrange ]1..100] meaning produces other resonnant effect.

As Tom , I noticed that subrange ]1..100] effect is input music material dependant. Sometimes it sounds fine, in other situation it sounds muddy.

It turns out that width has two meaning. As Chris said for documentation clarity, perhaps subrange [0..1] should be the only one prefered for stereo width meaning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants