The technical modelling thread

Orvillain

Goatlord
Richard Cranium
Messages
10,190
I guess this might go down like a lead balloon, but I'm interested in discussing purely the technical aspects of modelling amplifiers.

So you have white box modelling - what we all refer to as schematic or circuit based modelling. The idea being you build a schematic in the digital domain, mathmatically solving voltage and current signals for each node in the circuit.

They're often represented using wave digital filters. These do not propogate the signals directly. Instead, every connection between circuit elements carries two wave variables - the incident wave, corresponding to energy arriving at a component, and the reflected wave, energy leaving a component. These waves represent energy flow; not just signal values.

Traditional nodal analysis solves a big system of nonlinear equations on a per-sample basis. That is extremely taxing for a real-time system. WDF's turn the circuit into a series of localized solvers, rather than one global one.

I've not gotten too far down this route, and I don't always understand the mathematics behind it. But this seems like the direction to go in, to start modelling guitar amplifiers and other studio components.

There's a FAUST library: https://faustlibraries.grame.fr/libs/wdmodels/

This might be good to experiment with! But essentially.. I think I get why you'd need a schematic and the real amp now .... coz all of these elements in the WDF tree essentially need tuning according to measurements you take from the amp directly, and according to what the schematic says.

So ultimately.... don't think of building a guitar amp model. Think of building leaf components that sit within a tree structure. The upward and backward passes take care of the actual physics.


Anyway... that's one way to do it - represent your guitar amplifier as a WDF tree, tune the tree parameters until it matches the reference.
 
[pokes finger in nose]

I use mine to write dumb fight riffs and make stupid annoying noises


lol all you guys are smarter than me I'll see myself out haha
 
  • 100%
Reactions: Dez
I think we’ll find a lot more people like these conversations when they can speculate without knowing anything. Certainly well beyond my depth, but I usually find this stuff interesting. I always wondered about the component modeling and the quest for accuracy where accurate might not always be equal to sounding better. Traditional guitar sounds are a whole system of things that sound bad on their own that then gets filtered by a speaker/microphone/eq. Why not virtually use components that just sound good from input on?
 
Why not virtually use components that just sound good from input on?
I guess in theory, if you had an accurate schematic for an amp and knew every single component value, tolerance drift, etc... and if computers could literally run that schematic on a per-sample basis, without any approximations ... then this work would.

But there are always approximations, cheats, and CPU-saving strategies that do effectively reduce the accuracy at the "virtual electronic" level.

A super common one is replacing sin or cos calculations with look up tables, and linear interpolation. sin and cos are expensive. Division is more expensive than multiplication. Things like this affect the decisions an engineer makes, because ultimately their goal is never exactly just "make it sound like the real thing".
 
I think we’ll find a lot more people like these conversations when they can speculate without knowing anything. Certainly well beyond my depth, but I usually find this stuff interesting. I always wondered about the component modeling and the quest for accuracy where accurate might not always be equal to sounding better. Traditional guitar sounds are a whole system of things that sound bad on their own that then gets filtered by a speaker/microphone/eq. Why not virtually use components that just sound good from input on?
For a schematic/circuit based emulation I can’t really see the point in not striving for accuracy, otherwise what’s the point in using a particular circuit in the first place? I think if you’ve already gone to the trouble of emulating an amp, you may as well get it as close as possible first and only then decide if it’s worth veering off course (or adding extras/modifying).
 
It depends what you mean by accuracy.
The software model of the circuit producing a similar sounding output as the real world circuit. Ideally the accuracy would be there on a component based level, as well as on the circuit in actual use (combining components and them interacting with each other as well as their physical properties).

If the software circuit gives a different sounding result to the real world circuit, its somewhat moot to bother using a circuit based approach to begin with.
 
The software model of the circuit producing a similar sounding output as the real world circuit. Ideally the accuracy would be there on a component based level, as well as on the circuit in actual use (combining components and them interacting with each other as well as their physical properties).

If the software circuit gives a different sounding result to the real world circuit, its somewhat moot to bother using a circuit based approach to begin with.
My first flippant response is to say, it depends what you mean by similar.

But fundamentally, there is a truism at the heart of this - at the moment in DSP and computing, there isn't enough power to run an amp model to 1:1 accuracy. There just isn't. There will always be differences with the current technology. The real question is about at what point is it audibly different; and that is a very different threshold.

I'm gonna experiment with some WDF designs. I've not done it before really. I guess the sensible way to do it would be to take a bottom up approach; design the network node classes first, before even thinking about how it all fits together.

But effectively, from what I've been able to glean through some Gemini3 reading, WDF systems don't deal with voltages, currents, or any outwardly "electronic" definitions. Rather it is about influence, or waves. Waves travel into a component, get absorbed, reflected, and travel back out.

Your ohmage or resistance level becomes the nodes port resistance. So you need a node class that describes:

- A resistor
- A capacitor
- An inductor
These are the linear components. Then you'd have a series of adaptors - 3-port series and parallel adaptors - and you could then make basic RC networks with these. Take a resistor and a capacitor and interface them with the series adaptor, and there you go... a small RC filtering network where if you change the resistance or capacitance values, the reflection coefficient (aka gamma) updates, and the circuits frequency response shifts instantly.

I need to do more reading. But fundamentally, 1:1 accuracy is not possible. The model is always an approximation. How close can we get it? Fractal knows.
 
But fundamentally, there is a truism at the heart of this - at the moment in DSP and computing, there isn't enough power to run an amp model to 1:1 accuracy. There just isn't. There will always be differences with the current technology. The real question is about at what point is it audibly different; and that is a very different threshold.
Absolutely. I think the challenge of amp modelling is to be able to find the most optimal compromises and minimising the trade offs. I still think the gold standard of circuit based modelling is to be as close as possible to the real world circuit - not necessarily by modelling each component 1:1 and having a fully realised 1:1 match on a micro level, but to create a model that gives the same behaviours as the original circuit.
 
Here's another thing .....

Typically you'd process audio in blocks. For efficiency reasons. You can really benefit by doing this, especially when coupling it with SIMD or vectorization optimizations in the code.

But WDF processing inherently depends on per-sample processing in order to keep the state realistic. So you need to interpolate values in order to keep things running smooth. This could involve data being lost; because the "steps" of the blocks isn't fine enough.

So why might one platform be less accurate than another? It could literally come down to the block size they use. And why might they use too large a block size?? CPU/DSP chip constraints.
 
Yeah, I suppose it doesn’t make sense to try to find the component values if you’re not trying to exactly match the sound, good or bad. I’m thinking less “let’s make a digital JCM 800” and more “lets make a digital amp that’s an immediately enjoyable experience”. Something more like what the new Quilter thing is doing, maybe. It seems more like you pick your textures for the sound than picking an amp. I’d love to see what’s going on inside the Boss X-amps, as those definitely seem like idealized circuits. But maybe that’s also not really the scope of the thread, either. It’s not really “modeling” once there’s no analog counterpart?
 
If you want to read how Hotone does it, they have a whitepaper on their modeling tech:
https://res.hotoneaudio.com/prod/support/CDCM HD_White Paper_V01_200323.1584955064392.pdf

They use white box (component modeling, e.g tone stack) modeling for linear stuff, and black box modeling (e.g neural network) for non-linearities like distortion.

In my experience it works surprisingly well. You get to adjust everything like the amp, and it behaves a lot like the real amp. I find their modeling to be a bit darker sounding than e.g Line6 or Fractal so it's far from perfect, but we are talking about a cheaper range of products here so it's punching above its price point.
 
Last edited:
“lets make a digital amp that’s an immediately enjoyable experience”
I think it’s a tough sell to customers, although there are a few out there. Even among those though, can we be sure that they aren’t tweaked versions of real amps? I’d (generally speaking) prefer DSP developers to stick to what they’re good at, rather than trying to design amps. Real amps go through a lot of R&D and revisions to get to where they are, so I don’t think DSP devs should just assume they can improve things off the bat.

And if the model is circuit based, you’re pretty much going to base it off a design that’s already out there, even if you decide to tweak it from there. So if it’s circuit based, you’d still ultimately want the circuit to behave the way a real circuit would (even if you go beyond what might be possible in the real world).
 
I think it’s a tough sell to customers, although there are a few out there. Even among those though, can we be sure that they aren’t tweaked versions of real amps? I’d (generally speaking) prefer DSP developers to stick to what they’re good at, rather than trying to design amps. Real amps go through a lot of R&D and revisions to get to where they are, so I don’t think DSP devs should just assume they can improve things off the bat.

And if the model is circuit based, you’re pretty much going to base it off a design that’s already out there, even if you decide to tweak it from there. So if it’s circuit based, you’d still ultimately want the circuit to behave the way a real circuit would (even if you go beyond what might be possible in the real world).
I get that, I guess in my head I don’t care about “an amp” so nobody needs to design an amp. I need a responsive processing with pleasing sonic characteristics for my guitar signal. I don’t need to think about it as a computerized version of a wooden box or for it to start with the characteristics of that box. I’ll probably just observe this thread for the most part because I think I might be obfuscating the goal, but ultimately to me “classic” guitar gear is all based off stuff that wasn’t really designed for the purpose and a lot of the later iterations were trying to fix that without changing it too much because people are used to it. I like the idea of shitting on tradition just to do it, lol.
 
Then there's "analog modeling" by BluGuitar. They've never called it such, but considering how many Marshall style amps you can closely match with it, I think it counts.

This is a diagram of the Amp 1 Mercury Edition signal flow:

Screenshot 2026-01-01 at 20.29.48.png


The amp has a 100% solid-state preamp.

As you can see, there is no traditional tone stack on these amps. It's fixed, and afaik the "custom tone" knob on the Clean/Classic/Modern channels basically blends between two different tone-stacks instead.
  • The Clean channel can be dialed between Fender Blackface vs Tweed. Custom tone knob counter-clockwise is more tweed-ish smooth and midrangy, and turning it up makes it more brighter and scooped Blackface-ish. I run it smack in the middle for my preferred cleans through 4x10 GBs.
  • Vintage is like a Marshall JTM, based on Thomas Blug's modded JTM50 "Black Flag". No custom tone on this one because it sounds perfect as is!
  • Classic can be dialed between Plexi, JCM800 and beyond. Basically gets angrier the more you turn up the custom tone knob.
  • Modern starts from Soldano SLO and goes into ENGL territory.
The 3-band EQ is more like post-EQ: low/high shelf filters and a 600 Hz midrange filter. It has more in common with the Mesa Mark GEQ than with a typical 3-band tone stack.

Finally the poweramp utilizes the subminiature tube not for amplification, but for poweramp behavior. You can crank the amp and it will go into poweramp distortion. But it's not very necessary as the amp has a shitload of preamp gain on tap even on the Vintage channel.

The actual amplification is done by BluGuitar's own Class D poweramp design. That 100W rating is as if it was rated like a tube amp - and it does get to similar volume levels.

If you want it to be authentic vintage Marshall then you can crank it and use the internal powersoak to dial the volume down, but I tend to just run it like a modern master volume amp.
 
I think it’s a tough sell to customers, although there are a few out there. Even among those though, can we be sure that they aren’t tweaked versions of real amps? I’d (generally speaking) prefer DSP developers to stick to what they’re good at, rather than trying to design amps. Real amps go through a lot of R&D and revisions to get to where they are, so I don’t think DSP devs should just assume they can improve things off the bat.

And if the model is circuit based, you’re pretty much going to base it off a design that’s already out there, even if you decide to tweak it from there. So if it’s circuit based, you’d still ultimately want the circuit to behave the way a real circuit would (even if you go beyond what might be possible in the real world).

1767293244642.png


My favorite modeler design of all time, the Yamaha DG amps, used generic amp model names. But under the hood, you could clearly trace all of them back to classic amp designs.

Lead 1 was Soldano SLOish, Lead 2 tried to be like a Dual Rectifier, you could find the Fender, Marshall and Vox influences in the Clean, Drive and Crunch models.

I think this was a clever move, because nobody who ever tried the amp said anything like "It doesn't sound like a real tube amp". It was always "Hey, that amp sounds really cool! I like this mode the most!"

Meanwhile a friend back then had a Line6 Flextone 2 and people were saying how it doesn't sound like the real tube amps.

That's why I feel we should have more products that don't try to explicitly emulate specific real tube amps, but borrow their signature characteristics to make the digital amp manufacturer's own thing. I get that the "Ooh look it emulates this and that famous amp!" sells way, way better...but I still hate that modelers often don't get evaluated on their own merits.
 
Try it. I think you might be surprised at how fast a typical C library sin()/cos() is compared to an interpolated LUT
:cool: .
std::cos and std::sin are certainly slower than a LUT. I'm aware of phase accumulation and polyblep approaches - what else is there?

std::cos and sin are too slow to be running on a per sample basis across an entire amp schematic IMO.
 
Wonder if @FractalAudio reads this, chuckles, and says what a bunch of morons.

Seems as though he’d have more knowledge on this than any singular person on the planet.

The thought has crossed my mind…What’s his retirement plan? Will the fractal equations be passed down secretly like the KFC spice blend? Or would he want to see his work continued on like mathematicians/physicists and release it all for the next gen to further.
 
Last edited:
Back
Top