Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Nam: Neural network emulator for guitar amplifiers (github.com/sdatkinson)
122 points by tonybeltramelli on April 9, 2023 | hide | past | favorite | 28 comments


This is cool, it's a little bit "batteries not included" so you need to get some Models for the amp part: https://github.com/pelennor2170/NAM_models and some Impulse Responses (IR files) for the cabinet emulation.

When you put them together you can get some good results, maybe a little bit noisy.

The important part is trying to develop a library of models for plugins to share and when paired with libraries of impulse responses and other FX you can build up common guitar tones. It's not especially user friendly, which is what you pay for with other commercial plugins


That's very exciting. Some day a a mere mortal might be able to play a facsimile of a dozen slightly-different hand-made Dumbles.

One thing that this approach (and profiling) might not be able to do is what Ben Adrian's sound design team in Line 6 did, where they've come up with some delightful "amps" in the Helix that don't have real-world equivalents. For example, my favorite, the Ventoux, which he describes like this:

"The idea was to create a “coveted boutique amp” that had a different origin story. Most coveted boutique amps come from modified black panel fenders or modified marshall circuits. I wanted to do the same thing, but base it on the early 70s Orange circuits and the mid-wattage Fender Tweed circuits."

I'm not sure how one would to that with a NN approach.

Edit: now I'm wondering if one could make a large model trained by all the amplifiers, and have it dream up amps that don't exist.


>Some day a a mere mortal might be able to play a facsimile of a dozen slightly-different hand-made Dumbles.

Fractal's AxeFx has been able to do that for a long time. It has a couple different Dumbles and you can tweak the modeled circuitry in a myriad of ways because it is not a profiler, but rather it models the audio impact of each component that makes up the amp.


The amplifier models are put to use with https://github.com/sdatkinson/NeuralAmpModelerPlugin, which links to videos of demos: https://www.youtube.com/user/RunawayThumbtack

It's still pretty unclear to me what it can and can't do.


Try guitarml, same thing but with everything included


Is there an explanation of what this is, what problems it solves, etc?


My understanding is that this is software using neural networks that can be trained to emulate any kind of guitar amplifier.

For a few decades now it has become popular to use software or electronics to emulate classic guitar amplifiers rather than having to own all the various large and expensive (and generally tube-based) guitar amplifiers of yore.

I believe this YouTube video is showing you how to use it:

https://www.youtube.com/live/KHIORngbzJE?feature=share&t=673

Another: https://youtu.be/PjgrYB-EPbE

This guy compares an actual amp with ToneX (a commercial amp modeler) and NAM:

https://youtu.be/aXSnQzF-liE?t=802


This is phenomenal. Thank you for the links with time stamps.


NAM lets you essentially copy the sound/tone of a guitar pedal (no time based effects like reverb) or guitar amplifier. This means I can share a copy of my $3500 amp to people for free.

Before this and a paid product called Tonex came out, it cost $1500+ to “profile”/copy digitally a guitar amp. The price floor for this stuff just became $0-400 depending on what solution you go with and what gear you have.

This will be highly disruptive to the market. People can also clone paid plugins with this software and share it on Facebook. This is like when mp3s came out, but for guitar gear.


Is it fair to say this clones a device with one specific set of knob positions? So if I want to clone a 5 knob fuzz pedal in every possible setting, that’s a lot of cloning to do? I may have misunderstood.


You understand correctly. All of the amp modeling and virtual analog stuff is still fairly limited and they largely focus on getting the stereotypical sounds of the source, not the full range. Modeling things more fully is not difficult but it is very processor intensive, many spice programs can do it quite well but are far from real time. So simple analog amp modelers like the sans-amp offerings still out perform the digital emulations in some ways, they might not be as accurate but they tend to be more versatile, which is best depends on what you are after.

I have been on again off again doing a fairly intensive write up on this topic going into all the technical details (primarily the hardware side) complete with a fairly full featured/accurate digital recreation of the original MiniMoog VCF in PureData but it is not exactly a priority and progress on that is rather slow.

Edit: I should mention that despite the models not providing the full range of the source they still do provide a full range of their own. You still have your volume and tone controls but they operate on the model, they are not part of the model. They have gotten fairly good at faking things and the tone controls do not sound so much like post recording EQ like they did in the early modeling amps but they also do not interact with the sound like they do in the real amps where changing the bass level does not only change the bass but also affects the gain/distortion/frequency characteristics of the tubes on either side of it as well.


You can build a neural network model of the whole device, but you have to collect a lot more data. Results depend on the number of parameter permutations you sample and on the independence of the controls. I trained a NN on an expensive analog EQ with millions of permutations, but because the controls are largely linear and independent, it can extrapolate well to unseen combinations.

You can also use differentiable DSP to obtain a decent “first pass” approximation using traditional methods, and then rely on the NN to make up the difference afterward. This dramatically reduces the NN parameter count and speeds up computation. I recently tried this on an analog compressor (LA2A) and got 95%+ of the way there with a very small model.


Sure, but you still have an infinite number of possible inputs, your model will only show that on certain note combinations at just the right volumes you get sub harmonics through intermodulation distortion if you find those note combinations when you build it. Musicians are very good at finding and exploiting these quirks of equipment, they are what ultimately define the characteristic sound of given bits of gear (and the musician's) and are what companies in the modeling business aim for, they get a dozen or so of those characteristic sounds and fudge the rest through a mix of techniques like interpolaitng the difference. But you can not get them all and the only people who end up buying the tech are the ones that primarily want those stereotypical sounds and that is getting to be a very crowded market.

If someone really wanted to use such technologies to be a game changer they would forget about the past and use it to design something new that exploits its strengths in a way that is natural to the musician instead of showing off its weaknesses. The potential of the technology is quite amazing and yet everyone uses it to chase nostalgia.


> I have been on again off again doing a fairly intensive write up on this topic going into all the technical details (primarily the hardware side) complete with a fairly full featured/accurate digital recreation of the original MiniMoog VCF in PureData but it is not exactly a priority and progress on that is rather slow.

I'd be very interested to see your approach. So far, the most promising (non-NN) technique I've seen requires taking a symbolic inverse of a sparse matrix, which is just barely possible for a simplified pedal model.


I am doing things in just about the most idiotic and inefficient way, break the circuit down into easy to emulate blocks then emulating how they interact by adding in stuff which mimics that interaction.

Essentially I break down the circuit into a series of blocks which are easy to model in isolation and then show how the interactions between these blocks are very complex and difficult to model. The starting point is essentially the classic simple moog model with some extra stuff and I add in bits between those blocks to mimic the interactions while comparing it to various digital models of the filter, spice simulations and the real deal.

So I slowly make up a big massive mess of a patch in PureData that eats my entire CPU but does a fairly solid job of the emulation then try and simplify things down to show how each part affects the whole.


> The starting point is essentially the classic simple moog model with some extra stuff and I add in bits between those blocks to mimic the interactions while comparing it to various digital models of the filter, spice simulations and the real deal.

Yup, there are two main philosophies: start from a very accurate (e.g. SPICE) model and simplify it enough that it runs in real-time or start from a simple model (e.g. biquad) and add nonlinearities as required.

If you want talk more about the other approach, I just added an email in my profile. ;)


The problem is that everyone implements those nonlinearities as isolated and largely static things, which they are not, they are dynamic and interact in complex ways. From what I can tell the vast majority of people who implement these models don't seem to really understand the analog world, they model the circuit in spice and run a simulation at a static setting with a single source and call it good, this kills the dynamics which are a fairly important part of the sound. This is also why many amp modelers are often said to do the high gain or clean sounds well but fail in some vague way on everything else, the simplified dynamics used for modeling are close enough to reality for those sounds.

The mini VCF is not the best option for my needs but it is useful in that I have a good many implementations to use as controls as the patch advances and I can show why it all matters well enough, I can provide musical examples which most anyone will be able to hear the differences between. Ultimately I think the software folks are making the wrong sacrifices which is why pedals like the Sans-Amp series and even the somewhat naive Run Off Groove [0] DIY offerings maintain a solid following despite not sounding much like the amps they attempt to mimic, they do respond like the amps, they maintain the dynamics or at least something close enough.

I am not sure we will have much to talk about but I will give you an email when I am back on the computer.

0) https://runoffgroove.com


>All of the amp modeling and virtual analog stuff is still fairly limited and they largely focus on getting the stereotypical sounds of the source, not the full range.

Except for Fractal, which models based on the component level.


A very simplified version of the component level. Component level is very good but not real time unless you sacrifice a fair amount. Ultimately it is a bit of a wash between other methods, just shifts were it fails and where it succeeds to somewhere else.


With the current state of the tech it’s best to do several captures with the various “sweet spots” a player is likely to use. You will often see files describe the gain or tone knob position or what channel was used on an amp.

It’s also not uncommon to create a capture with your pedal plugged into the amp as well. Popular for high gain heavy metal profiles to have a tube screamer in front of the amp. Stuff like the Kemper/Tonex/NAM work great with this kind of setup.


With the Kemper Amp (a profiling amp) it goes through a series of "noises" to get a profile: https://www.youtube.com/watch?v=iL7tWFhH8E8

But yes, you get the sound of a specific EQ settings.


The Kemper amp is mathematically super elegant. Two matrices A and B, and one nonlinearity in between. That’s it. All the noise profiling does is figure out A and B, which correspond to the impulse response before and after the distortion.

When you send through a clean signal, you measure A*B. When you get distortions, you know you’re only measuring B (because they are introduced after A). Then you derive A from that.


Yeah the newer approach NAM used is much more accurate. Especially for high gain stuff. There are still some aliasing problems with NAM though. Even with that most would never hear about the difference of the real $3500 amp and the free NAM plug-in.

Playing feel on the other hand I guess is a different argument. Not sure if that is a placebo though. I do prefer the zero latency of all analog gear.


I always think part of the ongoing use of valve amps is because of their transient response. It would be impossible to check in practice, but I think the transient latency is lower than solid state, because they're amplifying in a free field inside the tubes. I'm not sure how digital physical modelling and class-D power amplifiers is ever going to fully replicate this. The Kemper is naturally more convenient and feature-packed, but a valve amplifier will always do the one job that really counts, basically perfectly (until it breaks or catches fire).


90% of the reason tube amps live on is because all the cool kids use them because the cool kids are in bands and tube amps are easy to fix. A dozen tube types and a good supply of resistors and capacitors is all that is needed to fix most tube amps which means you can get your amp fixed asap at any repair shop, common parts they all have in stock. With solid state there is a very high probability that parts will need to be ordered since no one can keep the very large number of possible parts those amps use in stock so you end up buying a new amp to finish the tour with and ship the old one home or abandon/sell it.


That is very interesting. So you have any resources to learn more about this approach to modelling?


I recently got myself a Variax guitar and have been pleasantly surprised at how good it sounds. I've also been using bias FX for years when recording for my indie doom metal. Software really is the next frontier in music performance, and I'm glad someone's doing what I can't be bothered doing and making an open source alternative


I actually wish there was a neural net alternative to IRs, they also just don't sound right to me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: