-
Notifications
You must be signed in to change notification settings - Fork 146
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
[BUG] White noise when resampling 48K model to 96K in DAW #398
Comments
I'm seeing this too. Looping a DI that's just my guitar with volume knob all the way off, and a super-gainy model (expecting 48k) and the noise gate disabled, I get these integrated LUFS: 44.1 kHz: -44.0 LUFS Interesting that it really takes off with 96k with +3.5 dB. I also don't see any difference when playing. Looping a DI with some strumming, all 4 sample rates converge to -17.6 LUFS. That's kind of interesting. Out of curiosity, I benchmarked it against Tonocracy's NAM player running the same model. Theirs also sees the noise floor go up, but less (only +0.7 dB). With a 20 kHz LPF like this... ...the difference disappears. So it seems to me that the culprit is how the highest-frequency signals are being handled by the resampling algorithm. There are a few options:
|
A few other observations:
Another thought: I can already imagine having to answer this question again and again. I'm not very keen on option (1) in my comment above. I certainly could do something like a first-order LPF at the Nyquist before feeding the signal into the resampler (only on the resampling path). Anything to make this less noticeable would probably be good. I'm also wondering whether I should consider this a must-fix for this release or if it'd be okay to get it out there and patch it in the next one if I can get it tuned up. My bet is that the majority of users will benefit from this because they're using 44.1. For them, this isn't an issue. @2-dor, feel free to weigh in. |
I think getting it out is priority so no biggie. |
There may well be a problem with the resampler when going from 96 to 48,
will have to test it in isolation.
…On Tue, 5 Dec 2023 at 06:33, 2-dor ***@***.***> wrote:
A few other observations:
- This shouldn't affect the noise gate--the resampling only happens
around the NAM; the rest of the DSP is done in the external sample rate.
- Something like the Bertom Denoiser
<https://www.bertomaudio.com/denoiser-classic.html>, cutting highs,
also makes things work fine...
Another thought: I can already imagine having to answer this question
again and again. I'm not very keen on option (1) in my comment above. I
certainly could do something like a first-order LPF at the Nyquist before
feeding the signal into the resampler (only on the resampling path).
Anything to make this less noticeable would probably be good.
I'm also wondering whether I should consider this a must-fix for this
release or if it'd be okay to get it out there and patch it in the next one
if I can get it tuned up. My bet is that the majority of users will benefit
from this because they're using 44.1. For them, this isn't an issue.
@2-dor <https://github.com/2-dor>, feel free to weigh in.
I think getting it out is priority so no biggie.
—
Reply to this email directly, view it on GitHub
<#398 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFACLSW3MH5QEJ3PX5NULLYH2W2RAVCNFSM6AAAAABAGP6DCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBQGA2DGOBUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Looking into it a little more, I have the sense that it would be appropriate for the choice of |
I did a test with a sine sweep and i don't see any problems with the noise floor... sweep.movyou can do the same with IPlugEffect... #pragma once
#include "IPlug_include_in_plug_hdr.h"
#include "NonIntegerResampler.h"
const int kNumPresets = 1;
enum EParams
{
kGain = 0,
kNumParams
};
using namespace iplug;
class IPlugEffect final : public Plugin
{
public:
IPlugEffect(const InstanceInfo& info);
void ProcessBlock(sample** inputs, sample** outputs, int nFrames) override;
void OnReset() override;
NonIntegerResampler<> mNonIntegerResampler;
}; #include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPresets))
, mNonIntegerResampler(48000, ESRCMode::kLancsoz)
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");
}
void IPlugEffect::OnReset()
{
mNonIntegerResampler.Reset(GetSampleRate(), GetBlockSize());
}
void IPlugEffect::ProcessBlock(sample** inputs, sample** outputs, int nFrames)
{
const double gain = GetParam(kGain)->Value() / 100.;
const int nChans = NOutChansConnected();
mNonIntegerResampler.ProcessBlock(inputs, outputs, nFrames,
[nChans, gain](sample** inputs, sample** outputs, int nFrames){
for (int s = 0; s < nFrames; s++) {
for (int c = 0; c < nChans; c++) {
outputs[c][s] = inputs[c][s] * gain;
}
}
});
} |
@olilarkin - Here's the difference between 48khz and 96khz. 2023-12-06.00-07-48.mp4 |
could someone share a .nam where i can easily reproduce the problem? I just tried it with a guitar here and i am not noticing much of a difference in the volume of the noise when i switch the host samplerate between 48 and 96k. |
https://tonehunt.org/2dor/9115b091-7858-4f69-ae42-a324edc3b527 This should cover it. It's 1 DI profile and 2 that have cooked in IRs |
I think setting A=12 is a big improvement for 44.1khz -> 48khz as well as 96khz->48khz. I've reworked the iPlug2 resampling classes to default to this value. I've also renamed the class... iPlug2/iPlug2@4bfc3e1 @sdatkinson if you define IPLUG_SIMDE you can get some extra performance too since i think you were using the scalar version before |
Noticeable increase in apparent noise floor when using a 48k .nam model in a 96k project.
To reproduce:
The text was updated successfully, but these errors were encountered: