Page 1 of 1

Amp simulation and circuit modeling

PostPosted: Wed Jan 30, 2008 7:13 pm
by Consul
I decided to break this off of a discussion in the "new engine" forum, as it was getting off-topic there.

To summarize, I've been putting my mind to the problem of how to make a guitar amp simulator. The traditional methods are very difficult, and aren't really producing results that I would call first-rate, though some do, like the Waves GTR and Softube Amp Room, the latter of which I consider the top of the bunch. This all leaves me wondering if a more behavioral approach might be called for.

There are two ways to model a system. One is the black-box approach, where you feed known inputs into a system, get known outputs from that system, and then create a best-fit algorithm of your own to go in-between. The problem with this approach is that it is not parametizable; you can't change an input and get the same result as you would on the original system, and it also does not model interactions between the components of the original system. However, for your one curve-fitted instance, this method is likely to provide really good results.

The other method is via physical or component modeling, where the system components are known, and models of each component are combined in a system where they can interact with each other. This has the advantage of being parameterizable in the same way as the original system, complete with interactions of components. However, these systems are extremely complicated to put together, and don't always guarantee good sounding results across a range of parameters.

I'm wondering if we can't take a hybrid approach, though I don't know exactly how to put it into words.

One of the ways that the "tube" sound is often simulated is with a simple waveshaper using the tanh (hyperbolic tangent) function. You can tweak the sound by applying different bias to the input signal to emphasize one class of harmonics over another. It's not an actual model of a tube, though it does get some of the behavior right: it has a fairly linear range until you push it hard, then the overtones kick in.

Looking at the graphs of various tube datasheets, I can't help but wonder if a more complex waveshaper couldn't be made which matches the curves on the datasheets. It's not true modeling, but combining several of these waveshapers together with other modeled components (EQ and filter networks, DC filtering, etc.) in order to create a complex interacting system that is predictable, like a real guitar amp. Basically, it would be black-box modeling the tube, and component modeling everything else and creating the matrix from that (it remains to be decided how an output transformer would be handled, but I imagine a filter plus a transfer function would work there). As for the cabinet and speakers, I'm wondering if physical waveguide modeling wouldn't be a good way to go there.

It's a lot to think about, and I want to try my hand at a few things. We'll see how it all goes.

Re: Amp simulation and circuit modeling

PostPosted: Wed Jan 30, 2008 9:53 pm
by dahnielson
To me, the hybrid approach makes most sense and let you divide and conquer the problem domain.

The best way to start is to make some simple prototypes of the "components" using Faust (which I'm still trying to grok) or something similar that already have the all the necessary opcodes to play around with.

Re: Amp simulation and circuit modeling

PostPosted: Thu Jan 31, 2008 12:56 am
by dahnielson
I went through my old bookmarks.html file and added some of them to tagged dsp, will add more resources when I find them.

Re: Amp simulation and circuit modeling

PostPosted: Sun Feb 17, 2008 6:10 am
by Consul
It looks like I'm not alone in my thinking: ... ortion.pdf

He has the same idea: simulate the circuits on a perceptual level, using waveshapers for the non-linear components. Designing the waveshaper becomes a trick, though, because what you want to simulate is the distortion introduced by the non-linear response of certain parts of the circuit. He describes a method by which to do that, but I'm still wrapping my head around it. It certainly looks doable, though.

Re: Amp simulation and circuit modeling

PostPosted: Fri Mar 21, 2008 10:32 pm
by Consul
Thanks to Anders in another thread, I have another, simpler idea on how to go about speaker and cabinet emulation.

1) Define an IIR filter to mimic the response of the speaker in question. I remember finding the curve and code for a 12" Celestion on-line somewhere, which would fit the bill perfectly.

2) Define two or three comb filters, corresponding to the size of the guitar cabinet being modeled, taking the speed of sound into consideration, etc.

3) Capture the impulse response of a nice piece of birch plywood corresponding to the largest dimension of the cabinet.

4) The incoming audio from the amp sim goes through the IIR defined for the speaker, and then splits to go through the comb filters and convolution. Both signals are then mixed wet/dry based upon desired "microphone" placement.

5) Profit?

I'm still working on where and how to simulate cone break-up in all of this. It would have to be either before or after (most likely after) the filter defining the speaker driver. I'd have to take a look at some time- and frequency domain graphs of what the break-up actually does to think of a way to simulate it.

Re: Amp simulation and circuit modeling

PostPosted: Sat Mar 22, 2008 12:04 am
by dahnielson
No, you jumped over the intermediate fifth step, profit is sixth:

5) ...?

6) Profit!

Re: Amp simulation and circuit modeling

PostPosted: Sat Mar 22, 2008 12:40 am
by Consul
Ah, okay. :D I guess the unknown #5 then is, "figure out how to simulate cone break-up."

Re: Amp simulation and circuit modeling

PostPosted: Wed Jul 22, 2009 9:25 pm
by cricky
interesting thanks a lot for this one...

commission de surendettement
- commission de surendettement, vous pouvez demander un dossier de surendettement.