sdatkinson / NeuralAmpModelerPlugin

Plugin for Neural Amp Modeler
MIT License
1.98k stars 133 forks source link

[BUG] Output in 0.7.3 is MUCH hotter than in 0.7.2 (especially in Right Channel) #251

Closed vvasilikos closed 1 year ago

vvasilikos commented 1 year ago

The output level in 0.7.3 is MUCH hotter than in 0.7.2 especially on the right channel.

(In my situation, have not tried changing things around yet). Details on my particular setup at the end of this write-up.

To Reproduce Steps to reproduce the behavior: Simply load a previous project that was using 0.7.2 after upgrading to 0.7.3, the difference in levels should be noticeable immediately. See also screenshot below.

Expected behavior I was expecting the output level to not be affected, I guess :) Even though the entire signal chain is actually mono, the right channel seems MUCH more affected than the left. See also screenshot.

Screenshots image

Desktop (please complete the following information):

Additional context The FX Chain I was using:

Signal is already way too hot before NadIR and ReEQ.

Initial attempts at isolating the issue

vvasilikos commented 1 year ago

Perhaps there is a channel division missing here:

https://github.com/sdatkinson/NeuralAmpModelerPlugin/blob/56a3a3228432cb9668af677c2bbc8f153ef0c7a1/NeuralAmpModeler/NeuralAmpModeler.cpp#L925

const double gain = pow(10.0, GetParam(kOutputLevel)->Value() / 20.0);

Should (maybe?) be:

#ifdef APP_API
  const double gain = pow(10.0, GetParam(kOutputLevel)->Value() / 20.0);
#else
  const double gain = pow(10.0, GetParam(kOutputLevel)->Value() / 20.0) / (float)nChansIn;
#endif
sdatkinson commented 1 year ago

I'll look into this.

@vvasilikos it shouldn't be in the output. The previous behavior was to apply the gain then copy to all of the connected output channels; this release doesn't change that.

sdatkinson commented 1 year ago

First test: an instance of the plugin with no models correctly outputs the same as its input.

Bypassed:

image

Active but no model loaded, no IR loaded, noise gate, EQ, and normalize disabled, input/output at 0:

image

Only plugin on the signal chain, input track is mono (first few seconds of v1_1_1.wav).

sdatkinson commented 1 year ago

Test 2: Using DR Pedal Platform.

Installed v0.7.2 VST3 and rendered:

image

Installed v0.7.3 and:

image

So, it's replicated.

Lemme pop these into Python and have a closer look

sdatkinson commented 1 year ago

Left channel appears to match

image

But this is different from what you're seeing--visually, it looks like the left channel is different (not only where there's clipping).

Edit: I'm guessing the left channel discrepancy is because your example had two plugin instances involved.

sdatkinson commented 1 year ago

Inspecting with the debugger while playing the standalone, things seem correct: output is the same for both channels.

(Still running the DR pedal platform model)

image

Gotta say this is odd--I could've sworn I've spent a fair amount of time playing the plugin in a state that should have been functionally equivalent to what I'm looking at right now and never noticed this.

Unfortunately, I'm currently away from home until Sunday and don't have an interface nor even a pair of headphones, so I'm limited in what I can do. I'm going to put up a "help wanted" on this Issue and see if I can't get a hand from the community. 0.7.3 is a really exciting release and I'd love for folks to not have to downgrade in the meantime 💔

sdatkinson commented 1 year ago

Right channel, v0.7.3 seems exactly twice as loud (unless it clips obv)

Plotting around the first spike in v1_1_1.wav

image
sdatkinson commented 1 year ago

Think I figured it out:

Can you check out the Plug-in pin connector?

I opened it up and found an extra conenctions from Output 1 to L:

image

Unchecking it like so...

image

...results in something that nulls out perfectly as expected:

image image

Let me know if that's what happened for you too

vvasilikos commented 1 year ago

That seems to be it indeed!

That is so weird, I never messed with that configuration. Here's what it looks like if I have 0.7.2 loaded:

image

It's already different than what I would expect to be the default and Reaper will put it back to normal if you hit Reset there. I wonder how this setting got this configuration...

This is what it looks like after upgrading to 0.7.3:

image

The problem I assume was because Reaper somehow tried to "upgrade" the previous config to Stereo, and this resulted in this clipping or something?

Anyway, I think it's fixed now, I just have to go back to the normal full mix projects and reset the Plugin Connector...

EDIT: I'm wondering why this did not happen for you with NO model loaded. Reaper had the same wrong routing setup even without the model loaded, shouldn't that also occur in that scenario?