NAM: Neural Amp Modeler

Do we know at which point the capture resolves the output, and whether we can tell it to remove everything above a certain frequency?
 
Do we know at which point the capture resolves the output, and whether we can tell it to remove everything above a certain frequency?
Afaik these AI generated models are basically a "black-box" so there might be no way to implement oversampling in the plugin or capture itself. But I know nothing about how neural networks work so I might be completely wrong, just reporting what I've read around regarding this.

I tried to do it with nam just by feeding it some 192 kHz test and reamp files, hoping I would then be able to run it at that frequency in the daw (which would basically be 4x oversampling, and probably 4x the cpu usage as well), but for some reason the trainer only accepts 48 kHz files at the moment, so I couldn't test this idea.
 
I tried to do it with nam just by feeding it some 192 kHz test and reamp files, hoping I would then be able to run it at that frequency in the daw (which would basically be 4x oversampling, and probably 4x the cpu usage as well), but for some reason the trainer only accepts 48 kHz files at the moment, so I couldn't test this idea.

Keep in mind that not only would it be 4x the cpu usage, but the model's receptive field will still be the same size in samples (so 4x smaller in actual time).
 
But the strangest thing is that all lines have some copies above and below. These are basically the same as the fundamental and harmonics but shifted in time (both backward and forward) and at a lower level.
At first sight I didn't know what was happening and this is why I repeated the measurements today. But after thinking a bit about it I suspect this might be due to some linear phase processing inside the plugin causing (pre and post) ringing. This is just my assumption though, it could even be some by-product of the neural network used by Tonex. Anyway, if you have a more convincing explanation let me know.
It doesn’t look shifted in time to me…? There’s no horizontal shift in the copies, just vertical. Weird.
 
It doesn’t look shifted in time to me…? There’s no horizontal shift in the copies, just vertical. Weird.
Yeah, I was just editing the post to say the same thing, actually it seems shifted in frequency (a copy every ~4000 Hz) rather than in time. I don't know if ringing would behave like that. More testing needed 😬
 
Last edited:
Found the culprit
Season 3 Radio GIF by The Simpsons
 
The copies are likely due to a tone present at the input. This is intermodulation distortion. The copies are the sum and difference frequencies between the sweep and this "static tone". The tone could be due to poor power supply filtering (tone introduced into the front end electronics via the supply rails) or it could be EMI (conduction into the input via coupling).

It's possible that the tone is actually not 400 Hz but much higher than that and being aliased by the converter. IOW it's a high frequency switching component from the power supply or a switching regulator that's being aliased to 400 Hz. Or it could be a spur from a clock.

Board layout is critical in modeling products. The more compact the product the more critical layout becomes.

I guess what I'm saying is I'm inclined to think this is a hardware issue rather than an algorithm flaw although the latter is certainly a possibility.
 
The copies are likely due to a tone present at the input. This is intermodulation distortion. The copies are the sum and difference frequencies between the sweep and this "static tone". The tone could be due to poor power supply filtering (tone introduced into the front end electronics via the supply rails) or it could be EMI (conduction into the input via coupling).

It's possible that the tone is actually not 400 Hz but much higher than that and being aliased by the converter. IOW it's a high frequency switching component from the power supply or a switching regulator that's being aliased to 400 Hz. Or it could be a spur from a clock.

Board layout is critical in modeling products. The more compact the product the more critical layout becomes.

I guess what I'm saying is I'm inclined to think this is a hardware issue rather than an algorithm flaw although the latter is certainly a possibility.
Well it must be an algorithm flaw then for sure, cuz there's no hardware involved in these measurements. Just a sine sweep file rendered in place in cubase thru the plugin, the same file used for nam and fm9 and literally the same track in the daw too.

PS: could it be caused by clipping too? Cuz I've experienced it with other "capture" softwares (e.g. some Acustica Audio plugins) which usually run at an integer bit depth, so whenever they exceed 0dBFS the signal is clipped, even when the daw runs at 64 bit FP.
 
Last edited:
Well it must be an algorithm flaw then for sure, cuz there's no hardware involved in these measurements. Just a sine sweep file rendered in place in cubase thru the plugin, the same file used for nam and fm9 and literally the same track in the daw too.

PS: could it be caused by clipping too? Cuz I've experienced it with other "capture" softwares (e.g. some Acustica Audio plugins) which usually run at an integer bit depth, so whenever they exceed 0dBFS the signal is clipped, even when the daw runs at 64 bit FP.
Fascinating. My first reaction wouldn't be that clipping would cause this.
 
Another idea: something to do with SRC maybe? Cuz iirc I read somewhere that the neural network used by tonex runs only at 44.1 kHz, and those almost 4000 Hz (I meant to type 4000 and not 400 in my previous post) could be 3900 Hz, which is the difference between 48 and 44.1 kHz, that would be a weird coincidence.

PS: I'll test all these ideas as I get home anyway
 
Last edited:
Yeah, I was just editing the post to say the same thing, actually it seems shifted in frequency (a copy every ~4000 Hz) rather than in time. I don't know if ringing would behave like that. More testing needed 😬
Yeah, that's not just aliasing, something super weird is going on.
 
Looks like the capture is running at 32kHz inside a 44.1kHz container without sampling rate conversion.
By looking a bit more into the graph I'm pretty sure it runs at 44.1 kHz at this point. Look at the big yellow "V" roughly at the center, that's the aliasing coming from the 3rd harmonic and the point where it reflects at 0Hz is centered around the 6.15 seconds point, which is also the timing where various other lines intersect above.
In the NAM graph it is centered around 6.7 seconds.
6.7/6.15=1.09
48/44.1=1.09
 
IK multimedia probably just added a low pass filter to tame it on the highs, but that also reduces hi frequency content that should be there.

I got called out at the other place for saying the first TomeX examples lacked top end vs the real examples.
FWIW, this was the first thing I noticed about Tonex in A/B comparisons against the real gear too. The detail in the highest frequencies is slightly attenuated compared to the real gear.

It’s also something I hear to an extent with the Helix in comparisons against real amps. The only modeler that seems to cleanly produce the high frequency stuff and retain all its detail and clarity is the Axe FX.

I suspect the reason some don’t notice is because loud amps and years of playing have damaged a lot of people’s hearing in higher frequencies.
 
It seems my last hypothesis was the right one, as soon as I switched the project to 44.1 kHz this is what the graph looks like:

Tonex 44.1.jpg


The copies disappeared and even the brickwall low-pass filter, still some attenuation above 15-16 kHz but not as sever as before, now we can clearly see that harmonics reflect at 22.05 kHz.
Expectably aliasing still looks pretty bad since it runs at a lower sample-rate than NAM, and still something weird with the level of aliasing at lower frequencies and after the 3rd harmonic reflects back from 0 Hz.

So the problem seems to be some issue with the SRC.
To be fair I'm not running the latest version of the plugin currently, just saw now there's an update available. I'll check if they corrected this eventually.
 
Afaik these AI generated models are basically a "black-box" so there might be no way to implement oversampling in the plugin or capture itself. But I know nothing about how neural networks work so I might be completely wrong, just reporting what I've read around regarding this.

I tried to do it with nam just by feeding it some 192 kHz test and reamp files, hoping I would then be able to run it at that frequency in the daw (which would basically be 4x oversampling, and probably 4x the cpu usage as well), but for some reason the trainer only accepts 48 kHz files at the moment, so I couldn't test this idea.

You'd have to modify the code - which you could do, but I have no idea what model adjustments would need to be made for this. I think it is perfectly possible to do, but 48khz is currently hardcoded. You're definitely into the 'on your own' territory there for now. FWIW, this is probably not an easy problem to solve. The sample rate changes Steve is planning to implement will affect the plugin I/O so that it's more compatible, but it is _not_ an attempt at oversampling anything.

The reason it's frequency locked at 48khz right now is because the model is trained on 48khz, and it expects to get the input data at that rate when playing back. If you use a different frequency, it all has to be at that frequency or it won't sound as intended (frequency shifted, as you said). It's at 48khz I think now because that happened to be what he used based on other hardware, and doubling or 4xing that will also double/4x the CPU use on playback. And I suspect that there might not be a way to "oversample" this stuff at runtime, because of the blackbox nature, but maybe there are some ways to reduce it - I have no idea. But drop them on Github if you do, because that's where Steve will see them.

Also FWIW there is some work in progress on improving full rig captures, the result of which I found to reduce the high frequency aliasing compared to 0.5.2 today (by a small amount and just in a very basic single case test). It's not clear if that will have any effect on normal amp captures though. The goal wasn't really to reduce aliasing there, but it seems to be a positive side effect (maybe).
 
Last edited:
Thanks DLC86 for all the work !

I'm totally out of my depth here, but is it therefore the case that AI generated Capturing techniques from Tonex or NAM cant be oversampled to mitigate aliasing (?) whereas component modelers like the Axe and Helix can be and are oversampled to mitigate aliasing (?)

Ben
 
Back
Top