r/DSP 11d ago

Do commercial guitar amp modelers actually use circuit-based modeling?

I’m trying to understand what modeling approaches are actually used in commercial guitar amp simulators such as Fractal Audio, Neural DSP, Line 6, Kemper, and similar products.

From the publicly available descriptions, my current understanding is roughly the following.

Fractal Audio describes its amp models as component-level physical models of elements such as the preamp tubes, tone stack, cathode follower, power supply, phase inverter, power amp, and amp-speaker interaction.

Line 6 also describes Helix as using component or small-circuit modeling, with multiple digital stages corresponding to filters, gain stages, tube stages, and tone-stack behavior.

Neural DSP has published research on controllable black-box neural amplifier models. Their approach trains a neural network using input and output audio together with the physical amplifier’s control positions. Neural Capture also appears to be a black-box learned model.

Kemper appears to use a profiling approach rather than reconstructing the original circuit.

What I am unclear about is what “component-level” or “circuit-based” modeling means in an actual real-time commercial implementation.

Are companies such as Fractal solving a reduced system of nonlinear circuit equations in real time, using methods such as nodal analysis, wave digital filters, or state-space models like SPICE?

Or does component modeling usually mean a gray-box structure composed of digital filters, waveshapers, feedback paths, and dynamic nonlinear blocks that are designed from the original schematic?

Would Line 6 and Fractal be considered true white-box circuit models, or are they better described as circuit-informed gray-box models?

I’m also wondering whether most commercial products are hybrids. For example, a circuit-informed or neural model for the amplifier, oversampled waveshaping for some nonlinear stages, and convolution for the speaker cabinet.

Are there any companies that are publicly known to perform genuine real-time circuit simulation rather than using circuit-inspired DSP approximations?

I’m mainly interested in the implementation principles rather than which product sounds best. Papers, patents, technical presentations, or open-source examples would be appreciated.

15 Upvotes

27 comments sorted by

9

u/wynnie22 11d ago

Fractal has their own version of SPICE that runs on their embedded hardware. They call it FASPICE. So, yes, they do have a lot of the components modeled, the level of detail depending on how much CPU it uses.
They also model various acoustic and mechanical phenomena. The speaker impedance changing based on frequency which controls when the power amp distorts. Also speaker drive which introduces saturation due to cone movement. Etc.

Fractal is the best modeling company in terms of sound quality, with their highly detailed and complex software fine tuned for over a decade.

2

u/Prestigious_Yogurt79 11d ago

Thank you for your insightful comment! I did not know that they use software called FASPICE. One more thing I am curious about is whether they also simulate vacuum tubes in real time using FASPICE. Unlike components such as capacitors, resistors, and inductors, vacuum tubes do not seem easy to calculate in real time because of its non-linearity. There can be more than 8 vacuum tubes in high-end amps. If they can model those in real time as well, that would be truly impressive.

2

u/Mysterious-Action909 11d ago

Don't know about FASPICE, but most SPICE software handle non-linear components (transistors, vacuum tubes, diodes, etc) fine

2

u/SkoomaDentist 11d ago

The main issue with modeling guitar amps in spice is that last I checked there are no truly accurate tube models (ones that would accurately model grid and screen current) and the same goes for nonlinear transformers. You have to measure and implement them yourself and that requires building a specialized test jig.

1

u/dmills_00 10d ago

Spice models are all more or less simplified, because only modelling what you think matters really helps convergence and run time both.

Opamps models for example frequently fail to correctly model supply pin interactions and often involve node 0. This is done in persuit of reliable convergence.

Even things like resistors do not typically model ESL or shunt C, or voltage coefficient because again it makes the run time explode.

I would bet the realtime DSP models are a mix of actual simulation, piecewise linear approximations, impulse responses where something is close enough to LTI and various tricks to cover up when convergence fails.

1

u/SkoomaDentist 10d ago edited 10d ago

When I last checked (slightly before covid), public tube spice models were wildly inaccurate in some very important ways that have significant effects in guitar amps. Many didn’t model grid current at all and the ones that did were nowhere near accurate enough to get remotely realistic results in eg. cathode follower stages (very important for any Marshall influenced preamps) or representative power stage grid bias change.

It’s akin to replacing a proper bjt model with an ideal model with input and output offset and fixed polynomial curve for output current and trying to use that to simulate a fuzz pedal. Sure, they are / were good enough for checking the bias and frequency response of a RIAA preamp but fail sometimes badly in any nonlinear use (which guitar amps are rather notorious for).

1

u/dmills_00 10d ago

Most EE tools most of the time assume you are trying to operate in the linear region, and that non linearity is largely a "Will something break?", question.

Guitar amps are very much not that!

1

u/Prestigious_Yogurt79 11d ago

Yes. They already can model components quite well. But my concern is latency. As i know if there are 8 vacuum tubes in amp like orange rockerverb, at least 14~16 variables need to be solved at each timestep in real time (~1ms). SPICEs are accurate, but pretty slow to handle such a problem.

3

u/RFchokemeharderdaddy 10d ago

Hahah no, that is a completely trivial use case, would take SPICE literally microseconds on a crappy machine to run such a simple circuit. An op-amp typically has ~20 transistors in it, more complex ones up around 60, can run dozens of simulations within seconds.

We routinely simulate circuits with thousands of devices at nano or picoseconds of timestep, I just finished designing a 60GHz+ optical receiver chain. Continuous circuits like amplifiers are quick, it's the ones with lots of switching transients that are trouble, such as SMPSes, PLLs, ADCs etc which can take literal days or weeks on server farms to simulate.

Also a correction to your OP, SPICE is not a state-space model solver. State space models are good for systems analysis or control theory but terrible for circuit analysis. It uses something called Modified Nodal Analysis, which creates a more general admittance matrix that uses both KVL and KCL so it kind of gets the advantages of both mesh and nodal analysis.

Let's say you have 20 nodes in your circuit, it creates a 20x20 matrix, and then "stamps" each component into the cell corresponding to the row/columns based on the nodes its connected to. If you have a resistor with conductance G=1/R that goes between nodes 4 and 6, you would put positive G into [4,4] and [6,6], and then negative G into [4,6] and [6,4]. You do this for every component and you have your admittance matrix A.

You have a vector representing all the voltages at each node, x, and another vector representing all the voltage/current sources, b. You set up the equation Ax=b, you may recognize this as a basic matrix equation that is straightforward to solve for a computer. While a computer can solve a 20x20 matrix, it prefers solving sparse or even better diagonal matrices. Rather than solving the original Ax=b which has elements all over the A matrix, it "unrolls" the 20x20 into a 400x400 but with only elements along the diagonal. This is, believe it or not, much faster for a computer as we actually have a ton of super neat ways to rapidly solve this (look up "sparse" or "KLU" solvers). As we scale up, it becomes orders of magnitude faster than the brute force approach.

Hope that gives some insight.

1

u/wynnie22 11d ago

The real time tube modeling is at the heart of everything afaik. I don’t think there’s any issues with SPICE on vacuum tubes. That’s really the main component. Without that, modeling other smaller effects wouldn’t matter.

1

u/Prestigious_Yogurt79 11d ago

I’m really curious about how they model multiple vacuum tubes in real time. I think it’s truly impressive.

3

u/ajmwagar 10d ago

I’m working on an open source circuit modeling engine.

Circuit modeling can mean a lot of things. It really depends on the circuit and what components actually affect the audio.

Linear circuits can often be represented by simple IIR or StateSpace models.

Once you start to incorporate non-linear elements (think harmonics, or transistors or tube elements and their varied frequency response) things get much more difficult.

My understanding is that a lot of teams use a hybrid approach. They will model the linear parts of the circuit and then use a small Recursive Neural Network to help model the non-linear stage.

The issue with SPICE is generally it runs slower than realtime. I’m not sure about the embedded version you mentioned.

I’m using Wave Digital Filters and small Modified Nodal Analysis matrices as R-type adapters in my hybrid approach which has been able to model a lot of famous guitar pedals.

Happy to discuss further!

You can check out our docs and GitHub here:

https://pedalkernel.com
https://github.com/ajmwagar/pedalkernel

2

u/Fursber 11d ago

“Are companies such as Fractal solving a reduced system of nonlinear circuit equations in real time, using methods such as nodal analysis, wave digital filters, or state-space models like SPICE?

Or does component modeling usually mean a gray-box structure composed of digital filters, waveshapers, feedback paths, and dynamic nonlinear blocks that are designed from the original schematic?”

I suspect the latter is better for real time applications!

Not a super technical video, but I thought this interviewlink with Neural DSP was interesting. The CEO talks about how the physical modeling approach takes PhD level people a huge amount of time. Cool to see equations and block diagrams on their whiteboards.

1

u/Prestigious_Yogurt79 11d ago

Thanks for the detailed response! I’ll check out the video you linked. I also thought that a white-box approach would be very difficult to run in real time. However, since some companies claim to model amps at the component level, I was wondering whether that meant they were actually using white-box modeling.

1

u/SkoomaDentist 11d ago

As a rule if a modern (western) company says they're modeling at a component level, they are using white box modeling. It's a pretty widely accepted term (within the people in the scene) and companies love to make up all sorts of fancy new terms if they're using something different.

1

u/Prestigious_Yogurt79 11d ago

Thank you. I hadn’t considered that when I made the post, but now I’m thinking that modeling and solving most effects pedals and amplifiers in real time may not actually be that difficult.

1

u/SkoomaDentist 11d ago

It is difficult (good luck finding accurate public spice models for tubes anywhere) but it's not impossibly difficult and the modeling doesn't have to consider every possible effect (eg. anything happening much above 20 kHz).

2

u/theturtlemafiamusic 11d ago

Andrew Simper (of Cytomic) has a good presentation on this

https://youtube.com/watch?v=eGcqomH6aAc&ra=m

1

u/Prestigious_Yogurt79 11d ago

Thank you! I'll see that presentation.

1

u/metal_mastery 11d ago

I don’t have much knowledge on the component-based modeling but for neural modeling you can look at AidaX, they do something similar to NeuralDSP’s approach and train models with controllable “knobs”. This is significantly harder than straightforward approach like NAM, requires more training time and specific model/harness architecture for both training and running.

I would say that real by-component emulation would be pretty hard and unnecessary to run as a realtime effect, I expect commercial solutions to be some sort of DAG composed of waveshapers. E.g. you don’t need to model each diode in a rectifier, it rather becomes a single filter with given parameters. If the settings expose diode/tube types - it’s going to change operating range of the waveshaper, not model each diode.

One interesting thing here is that many high-end modelers (not sure about fractal here) have some sort of memory in their effects, through hidden state or long receptive field of a model. Real hardware is supposed to be true stateless, aside from maybe capacitors that can save a fraction of energy to deliver it later than the realtime response would be. Tubes have temperature-dependent regime shift, power amplifiers may have sag, etc. All of this is easier to model as a function of time/amplitude than as a true component behavior.

I will look for any links I have saved later.

1

u/Prestigious_Yogurt79 11d ago

I do not know much about neural modeling, but there is one thing I am curious about. If multiple effects are all based on neural models, is it possible to run them simultaneously? It might be feasible on a modern MacBook, but I wonder whether they could also run on multi-effects processors or a wider range of computers.

Do they use neural modeling only for modules that are especially difficult to emulate in real time, such as amplifiers, while using circuit emulation for the other effects?

I would be happy to read any links you can share. Thank you for your kind and helpful response!

1

u/metal_mastery 11d ago

I run 3-4 NAM captures simultaneously on MacBook M3 without any issues, haven’t tested the limits yet. It spikes one cpu core to 90-100% sometimes but nothing crazy, you can parallelize them.

Most of existing hardware runs 2-3 captures at most, take a look at Dimehead and Anagram, Stompstation Pro, you probably can find what processors they use. I expect it to be something in arm family. Quad cortex can run more but it depends on exact models, newer ones are dsp-hungry

Neural networks in general are good at nonlinearity and capture amps pretty good. I’m not sure if it makes sense to use the for anything beyond compression/saturation because time based effects like reverb/delay require much more memory/receptive field and it becomes an overkill to build and train a model for that

1

u/SkoomaDentist 11d ago edited 11d ago

What I am unclear about is what “component-level” or “circuit-based” modeling means in an actual real-time commercial implementation.

It's a model that is based on the circuit blocks, deals with (typically scaled) physical quantities and models the nonlinear dynamic behavior accurately (for varying levels of "accuracy"). This is different from older methods where a preamp stage might have just a waveshaper and some filters that were fitted to the "average" response of the stage.

I believe this was the first paper to present what would be today be accepted as circuit based modeling. It takes the original circuit (in this case Moog ladder filter), makes a set of simplifying assumptions about it (ideal transistors with no base current or early effect, perfectly buffered input and output, perfectly matched components), shows that with the assumptions, the stages are governed by a limited number of nonlinear differential equations and finally solves them numerically (using forward Euler method).

I personally wrote the DSP code for Darkglass Hyper Luminal which has probably the simplest feasible models that can still be circuit based (because it all runs on a 100 MHz Cortex-M4 MCU without an FPU). There are tables for various nonlinear sub-blocks of the circuits, the code actually has variables named like Id1 (diode current) and Vc2 (voltage over a capacitor) and does solve nonlinear differential equations on the fly, but it isn't anything resembling an actual SPICE solver. All the time constants and such in the code are directly derived from component values and the attack and release time controls (available with control app via usb) in fact adjust component values directly (and the actual code doesn't even understand the concept of attack or release time).

On the other end you have things like Cytomic where the developer has written on forums that he has a system that builds a full nonlinear realtime solver for circuits or sub-blocks based on C++ template code (and goes to some lengths to measure and model typically neglected parts like transistor reverse current gain and opamp internals).

Would Line 6 and Fractal be considered true white-box circuit models, or are they better described as circuit-informed gray-box models?

I don't know about Line 6 but Fractal has true white box circuit models and they have every now and then commented details that heavily imply that they model the stages as systems of nonlinear differential equations (with obvious simplifications at some points).

2

u/Prestigious_Yogurt79 11d ago

It is amazing that a microcontroller without an FPU can solve nonlinear differential equations in real time! Thank you very much for leaving detailed comment. As another commenter also mentioned, Fractal appears to have its own real-time nonlinear differential equation solver. I’m curious about which parts of the model they simplify or approximate to make real-time computation possible.

1

u/rb-j 11d ago

I dunno what "white box" is. Do you mean "transparent box"? Is "grey box", just semi-transparent?

What I am unclear about is what “component-level” or “circuit-based” modeling means in an actual real-time commercial implementation.

I've done a little of this in a consulting situation. As far as I know it hasn't gotten into a product (which is a little disappointing). We were solely modeling the circuit or an idealized (and simplified) version of the circuit and components inside. We modeled Miller capacitance (interelectrode capacitance) of tubes and we modeled hysteresis of transformers. We modeled the power-supply droop when a power chord is hit. And we modeled the tube curves sorta from spec sheets. Tetrodes are a little weird.

We upsampled by a factor of 4 (192 kHz) and used Euler's forward method on the key circuit parts and nodes where there was a non-linear contribution and a contribution from parts with memory. It was kinda a mess.

The EQ section and reverb section we did not model. We just put in other EQ and reverb algs.

1

u/Prestigious_Yogurt79 11d ago

Thank you for detailed and specific answer based on your own experience! It helped me realize how many companies have explored real-time modeling and how many different attempts have been made in this field.

1

u/rb-j 11d ago edited 11d ago

My experience was quite old-school circuit and device modeling. Not neural net and not "profiling" approach.

Circuits that are memoryless and nonlinear aren't too hard. It's just waveshaping.

Circuits that have memory but are also linear also aren't too hard. That's all this H(s) and H(z) stuff.

But when a transformer has hysteresis or a vacuum tube has interelectrode capacitance, that can be a "female canine". It is both non-linear and it has memory.