Comments (11)
from neuralampmodelerplugin.
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, 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, feel free to weigh in.
I think getting it out is priority so no biggie.
from neuralampmodelerplugin.
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
48 kHz: -44.0 LUFS
88.2 kHz: -43.7 LUFS
96 kHz: -40.5 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...
![image](https://private-user-images.githubusercontent.com/12240186/287909362-73cdb1f0-802f-40ad-993d-2da01a63d239.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDY1MjA4MjcsIm5iZiI6MTcwNjUyMDUyNywicGF0aCI6Ii8xMjI0MDE4Ni8yODc5MDkzNjItNzNjZGIxZjAtODAyZi00MGFkLTk5M2QtMmRhMDFhNjNkMjM5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTI5VDA5Mjg0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFiNTA1MGJlYmNiYjFjODBkY2YzYjkyYzUxY2M2NzFiZTA5MDJmMDEyZjRlOWQ4NmY4ZTEzYmNhZGYwODQzMDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cttcI9DaXFTwAlyJGXoSmaGlMa5OYkb6QJbgEBb3C38)
...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:
- Leave it alone and allow the user to do high-frequency treatment as they'd prefer (maximum flexibility, more user error)
- Add that LPF into the code (it "just works" but more modification of the signal than what a "NAM purist" might want? Technically we're already resampling, so that's out the window?)
- Perhaps the resampler can be tuned? I looked at the source code for the iPlug2 component I'm using but I don't see the parameters exposed in a way that suggests they were meant to be played with? (No initialization arguments or public methods). cc @olilarkin, lmk if I'm missing something here?
e.g. what's up with the magic numberI see its mathematical interpretation [thanks for the Wikipedia link!] but I'm interested by the fact that the article says a=2 or 3 is typical. Without going through the math, I'd guess higher values have better anti-aliasing properties but more latency?A=4
?
from neuralampmodelerplugin.
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, 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, feel free to weigh in.
from neuralampmodelerplugin.
Looking into it a little more, I have the sense that it would be appropriate for the choice of A
to depend on what sample rates the Lanczos sampler is resampling between. However, I'm not sure of the details yet.
from neuralampmodelerplugin.
I did a test with a sine sweep and i don't see any problems with the noise floor...
sweep.mov
you 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;
}
}
});
}
from neuralampmodelerplugin.
@olilarkin - Here's the difference between 48khz and 96khz.
I loaded up NAM and an amp model (any will do) and armed the track.
I recorded the 'output' twice, once at 48khz, next at 96khz.
The noise from the audio interface is being recorded through NAM.... but nothing is plugged into the audio interface.
The input and output controls on the NAM plugin are at maximum to exaggerate.
It's roughly 6db higher at 96khz.
2023-12-06.00-07-48.mp4
from neuralampmodelerplugin.
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.
from neuralampmodelerplugin.
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
from neuralampmodelerplugin.
To be fair, when no plugins are loaded on a track in reaper, and when you change sample rates - the noise floor of an armed track with instrument input selected (but with nothing physically connected to audio interface) - is louder at 96khz than at 48khz.
(I had to boost the track level by about 70db to exaggerate the result, but it seems to be consistent regardless of any plugins present on the track)
from neuralampmodelerplugin.
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
from neuralampmodelerplugin.
Related Issues (20)
- Cubase Crash[BUG] HOT 2
- [BUG]still cannot use standalone app, cannot select input 2 ONLY HOT 2
- [BUG] Resampling introduces latency, has some noise at start
- [BUG] Plugin Editor Scaling is not saved with DAW project HOT 2
- [BUG] In Logic Pro 10.8.1. - selecting/loading files doesn't work HOT 2
- [FEATURE] UI Reskin HOT 39
- Crash on startup or adding VST to Reaper[BUG] HOT 2
- [FEATURE] Proposal to rethink the UX HOT 3
- [BUG] Clicking noise on playback HOT 3
- Amps & IR's not loading / MacOS Sonoma 14.1.2 // Logic Pro 10.8.1 HOT 11
- Newer Versions, Older Systems [BUG]
- [BUG] Standalone app (0.77) crashes at startup on MacOS Big Sur HOT 1
- Standalone crashes HOT 1
- [BUG] Standalone allows for selecting buffer size not supported by interface HOT 4
- [FEATURE] Dialog warning that NAM is in beta HOT 1
- [BUG]String and caption are reversed in message boxes in macOS
- [FEATURE] Persisted information
- Revamp the distribution license
- [FEATURE] Toggle NAM on/off HOT 2
- [FEATURE] Alternative oversampling algorithms for the plugin (low latency vs. low alias) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neuralampmodelerplugin.