Page 1 of 1

True Circuit Modeling (non-impulse-based) plug-ins

Posted: Wed Dec 28, 2016 12:29 am
by wallyaudio
Some time ago I decided to stop using samples in my musical productions and exclusively use virtual instruments that model the circuits and the results have been amazing. I want to do the same with the effects and not use anything based on impulse responses (convolution) but unfortunately the information about it is very poor. Apparently we have a lot of information here about guitar amp emulators but the most important thing which is hidden by most developers remains a mystery. Could we all put together a list to clarify the subject? I leave here an incomplete tentative list to start with:

AcmeBarGig - ?
Fractal Audio Systems - ?
Ignite Amps - ?
IK Amplitube - Circuit Modeling?
LePou Plugins - ?
Line6 - Circuit Modeling?
NI Guitar Rig - Circuit Modeling?
Overloud TH1/TH2/TH3 - Circuit Modeling?
Peavey ReValver - Circuit Modeling?
Positive grid - IR/Convolution?
Softube - IR/Convolution?
Studio Devil - Circuit Modeling?
TSE Plugins - ?
Waves GTR - Circuit Modeling?

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Wed Dec 28, 2016 3:05 pm
Where have you seen a distortion modeling involving impuse response? There is a lot of ways of implementing distortion but not with impulse responses. IRs are being used AFTER the moment signal gets distorted to make it sound like it was feed to a cabinet and captured via mic.

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Thu Jan 05, 2017 6:19 pm
by DaveClark

If you're really serious about committing to true circuit modelling, then your only real option is to use a circuit simulator such as SPICE for the electrical portion. For the mechanical portion (speaker + cabinet) you may want to look at COMSOL Multiphysics. You won't be able to render anything in real time or even close to it. If you are rendering in real time, then you are not doing what you are claiming you are doing.

Dave Clark

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Sun Jan 08, 2017 10:15 pm
by wallyaudio
Well, it seems that my question has not been understood. I am not referring only to products that model distortion but to all. I just want to know which ones are algorithmically modeled 100%, whether or not they include cabs or reverb.

As an example you can check out Magix Vandal...
...and this interview with the developer.

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Mon Jan 09, 2017 5:27 pm
by DaveClark

It seems that you didn't understand my answer:

No audio software developers are doing what you describe in your own choice of Subject ("True Circuit Modeling"). True circuit modelling is done by EE's using SPICE and other circuit simulators that step through circuit behavior in small time steps, usually resulting in non-realtime results.


You seem to be confounding "True Circuit Modeling" with "algorithmic." The term "algorithmic" is often used in reverb modelling to mean nearly the opposite of true physical modelling --- a shortcut that too often results in nonphysical and inconsistent acoustic behavior. Using impulse responses is more akin to true physical modeling than algorithmic reverbs, especially if you solve the acoustic wave equation to obtain them.

I understood your question perfectly well and am just pointing out that it is based on serious misperceptions. There isn't any reason to attempt to provide answers to questions that presume the opposite of reality.

Dave Clark

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Fri Jan 13, 2017 11:10 pm
by SnuggleKittens
That is not quite true DaveClark 8) .

The plugins i made are pure circuit models. I make them from the schematic of the amps and thats it. No wave shaping, just a state space circuit model and a non-linear tube model.

The catch is that they are very cpu heavy, but with modern CPU's you can run about 4 instances in real time.

unfortunately some people have trouble running them (might be the C++ redistributable dependency)

You can find them here.


Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Wed Jan 18, 2017 2:01 am
by DaveClark
Hi SnuggleKittens,

Although I applaud your efforts, I have some serious concerns about your claims:

1) I see from the thread you referenced that they don't work for those who posted about their experiences.

2) From Norton, I see that there are "many indications" that the file isn't trustworthy. Norton removed the two very small, even tiny dll's without even asking me anything.

3) You posted that you skip the tonestacks in some cases, and that these are pre-amp only --- no power amp, no phase-splitter, etc. You're also skipping the speaker and cab, admittedly an electromechanical system rather than purely electrical, but there is a non-resistive load after all. The circuits you are modelling are quite incomplete by the standards of "True Circuit Modeling" of a guitar amp as described by the OP.

4) You mention a nonlinear tube model, but you didn't describe how it works. This is where the problem becomes severe. As you should know, the usual approach in SPICE is to use an iterative solver with time steps that may need to become very small, especially when the gain is turned way up in my own experience. With four stages of gain in a pre-amp and several tubes in the power amp, and solving ALL of the equations simultaneously (not processing one stage at a time), this would normally take more than realtime. If you're not solving all of the equations simultaneously, then of course you may do better than realtime, but you certainly would not be solving the actual circuit; you would be solving something along the lines of a sequence of buffered circuits, for example.

5) You didn't provide any information whatsoever about comparisons of accuracy and performance to SPICE or any other circuit simulator. All you provided is the dll's and an audio clip. To test what you are doing, it would be necessary to compare signals at internal nodes, among other things. You should know perfectly well that you cannot just say, "Wow! This sounds really good, so I must be truly simulating this circuit very accurately!"

In short, you have not shown to me that you have done "True Circuit Modeling" of a guitar amp, so I stand by my post.

On the other hand, if you actually have figured out how to model a complete four-stage pre-amp plus power amp with some non-resistive load and achieved SPICE-level accuracy, and can run four instances at 88.2 Ksamples/second, you will definitely be some sort of real guitar hero very soon. No doubt we all wish that this were true.

Dave Clark

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Wed Jan 18, 2017 12:50 pm
by SnuggleKittens
Hi again DaveClark

1) They work for me on two different machines (thats all i have to test them on at the moment). I get the feeling that maybe the people having problems are opposed to installing the C++ redistributable (which is fine) although i am not certain.

2) The dlls are tiny because its just the code. No GUI, no lookup tables, no other data. If i wanted to spread malicious code (if i even knew how to write such a thing) this would be an incredibly inefficient way to do it.

3) I can easily add tone stacks to any of my models, in fact the IIC+ model has the tone stack. I mainly made these for my own personal use, and i prefer without the tonestacks. I just wanted to make them available in case anyone found them useful.

Also there are no standards of "true circuit modelling" except your own. It just depends on what you require. The sims are "true circuit models" of preamp sections. Maybe someone else says it's not "true circuit modelling" until you model the coal fired powerstation generating the power that runs the amp (at least here in Australia :o ) Personally i like to play through my laptop and run the sims into a real poweramp thus i don't really want any power section simulation.

It is true that at this stage my high gain models (with a lot of preamp tubes) couldn't handle the inclusion of the power amp and transformer etc. But in a few years if CPU power increases this will be possible (and maybe some people are already doing it). It's probably possible now for amps with fewer tubes. Maybe if i get some time in the future i will try.

4) The problem is not as severe as you think. As far as the state space model goes, the capacitors are discretised and integrated via the trapezoidal rule. The timestep is naturally the sampling rate (in this case 88.1kHz since they run at 44.1KHz but are oversampled 2x). The tube model is this one by Dempwolf and Zolzer and is solved in real time (yes simultaneously) using Newton's method.

The problem with SPICE comparisons is that the SPICE solution is only as good as the tube model used in the SPICE simulation. You could implement the same tube model in SPICE but to be honest i can't be bothered / don't have the time. As far as the rest of the circuit components go, i have tested the frequency domain performance thoroughly and compared it to spice. The solutions are very very close over the entire spectrum.

5) Finally, accuracy is an interesting point. Accuracy with respect to what? components in real amps have tolerances of up to 20%. All individual tubes are also slightly different, voltages coming in from mains vary from outlet to outlet. I know from experience that two of the same model of amp can sound quite different. I guess you could painstakingly measure a single specimen and try to recreate that exact amp, but that kind of goes against my entire goal of simulating the circuits just from the schematics.

I feel the definition of accuracy for amp sims should be as follows: you are unable to say for certain whether the sound was produced by "some" instance of the real amp or by a simulation targeting the same amp model.

If that is not the case then that doesn't say much about any of the current commercial amp sims available. Most of the same amp models sound significantly different from product to product. This would imply that either: one is correct and any that sound different are inaccurate, or they are all inaccurate. Really at the end of the day, if an amp sim sounds good to you, then use it :cheers:.


Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Fri Jan 20, 2017 1:09 am
by DaveClark
Hi SnuggleKittens,

First, thanks for your detailed reply. What I write below (so others will understand) is mostly minor quibbles and not worth their time. I believe both of us know what we're doing and is well beyond most readers' experience and training. In other words, this is mostly just very specific differences between our points of view so we understand each other better. I would guess that if we had an extended conversation, we'd actually agree more than 90% of the time.

1) Lots of us have experience installing redistributables, and they are often installed by other software, so I'd be surprised if everyone who reported problems has merely objected to installing redistributables. But the sample size is small, so ....?

2) In trusting dll's, it's not just you but the whole chain of possession. The dll that people install may not be the dll you uploaded, for example.

3) Actually, it's not my own standard of "true circuit modeling," but what I believe that the OP meant by this, and I'm quite certain that he (I assume he) didn't mean incomplete guitar amps (i.e. preamp only without tonestack), for one thing. "True circuit modeling" of a guitar amp should be at the very least ALL of the electrical portions of a guitar amp. You aren't doing that. Your comment about the coal-fired power plant is a logical fallacy, a failed reductio ad absurdum argument --- an attempt to misdirect discussion of this particular point. You should have just agreed and let it go at that.

4) I've seen that paper a couple of times before, but thanks for providing the reference anyway. Let me see if I've understood you correctly: You use Newton's method but constrain the time step to that resulting from the sample rate of 88.2 KSamples/sec --- is that correct? That's pretty amazing to me, because that's not at all what I see with SPICE for high gains. With SPICE, the time steps are forced to become very small. This is why it takes way longer than realtime to solve. I haven't ever tried to force 88.2 KSamples/sec, but I don't think it would converge properly.

Also, just to confirm: By "simultaneously" do you mean the entire preamp? Of course this is just a piece of the entire amp, so it should be "entire guitar amp." But anyway, you do mean the whole thing, right?

Regarding frequency spectra matches: I'm not impressed, and you shouldn't be either. This is of course reassuring --- mismatches would be a horrible failure! But seriously, this is a sanity check, not a meaningful comparison.

5) You asked "Accuracy with respect to what?" I say, in the context of "True Circuit Modeling" : "Accuracy with respect to the standard, industry-accepted simulator." Your point about variations of devices isn't relevant in this context. Differences with respect to an industry-standard simulator should be easily explained, by examining differences between models, differences between limits of convergence, numerical accuracy, etc. --- i.e. straightforward technical explanations that everybody agrees about. I believe this to be a very reasonable expectation for "accuracy" in this context.

You posted: "I feel the definition of accuracy for amp sims should be as follows: you are unable to say for certain whether the sound was produced by 'some' instance of the real amp or by a simulation targeting the same amp model."

That's definitely not what the OP was saying. He is applying something close to the converse of this logic: He wants to use "True Circuit Modeling" to obtain what he believes will automatically be an accurate rendition and will, therefore, sound good --- an approach which he believes he has demonstrated to be valid for situations other than amp sims through comparisons.

He wants to know who does this for commercial amp sims. Answer: Nobody.

What you are saying here implies that he should ignore his findings --- believe that software that sounds good is good. Although he did appear to misunderstand what "algorithmic" meant and what "True Circuit Modeling" would entail, his desire is the fundamental basis of all engineering --- to do detailed calculations using validated methods instead of experiment after experiment, similar to what your definition would require.

Just to be clear, my own preference, in contrast to what the OP desires, is to ensure that an amp sim (my own or that of another) doesn't sound totally unacceptable in a mix (usually fails this test) and for my own amp sims, sounds reasonable after construction and produces acceptable sounds similar to SPICE renditions in some test mixes. My own most recent work suggests that for application in mixes, it's not necessary to go the full circuit simulator route of either SPICE or to do what you say you are doing. I've also found that what people call "wave shaping" actually works quite well for mixes, as long as you've got reasonable shapes. I focus on voicing. I think that what guitarists worry about has a much bigger effect on what most users buy than what they actually hear!

Dave Clark

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Sat Jan 21, 2017 1:59 am
by SnuggleKittens
1) Yeah i don't know, unfortunately i studied engineering and mathematics and not coding :D . I have tried compiling the plugins with GCC but the performance was horrendous. They didn't run anywhere near realtime.

2) True i suppose, but it seems to be the norm for guys like LePou etc.

3) I don't really want to argue any more about this, people can make up their own minds on this issue.

4) There are lots of ways to aid convergence, in my experience playing with the step size is one of the least efficient. Other than that, I write all of my code form scratch, all my calculations and numerical schemes are specific to each amp model and i make sure nothing is calculated twice and that everything that is calculated is actually needed. I'm sure this is nothing unexpected, but a general solver like SPICE possibly does a whole bunch of un-needed calculations like 0 multiplications etc (although i don't know the exact inner workings of SPICE).

And again, yes the whole preamp is solved simultaneously, a vector of grid voltages and anode voltages for each tube (size 2x no. of tubes).

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Sun Jan 22, 2017 12:17 am
by jorismak
all of this still means the answer the the original asker: There is no 'pure convolution' in amp modeling. There has to be some kind of circuit modeling _Somewhere_ at least. You can take some shortcuts here and there, and the cab-emulation is convolution based a lot of the time but you need to create some kind of distortion _somewhere_.

If you think about 'convolution based amp sims' as plugins that create a heap of distortion, then shape it into something that sounds like 'xxxxx amp' then I don't think any of these plugins are still around. Pod Farm maybe, but I think from around the time of Amplitube3/GuitarRig5 and onwards everything is circuit based _somewhere_.

For sure, it's nothing new. The marketing-hype-train may have discovered the term one or two years ago, but it was being done for a long time already.

Now, if you're asking about cab-emulators that do not use convolution (or an other form of plain simple EQ) then you're asking a better question.. but unfortunately not many answers. I know of Vandal, but I never played through it (seems lost as standalone and only available included in the premium Magix bundles these days?).

So flip the question around.. which plugins (on your list) may be the ones using 'dirty EQ tricks' to get their sound in shape.. I'm pretty confident Softube isn't. I know TSE, Studio Devil, Revalver, Overloud, Amplitube, Ignite, Fractal are not. If I would have to pick out 'candidates' then I do that mostly on age or my gut feeling / experience with the product then _maybe_ GTR and PositiveGrid stuff is not based of 'modeling every individual component'. Line6 Pod Farm maybe, Line6 Pod DSP maybe, Line6 Helix is component for sure. The older LePou stuff and AcmeBarGig stuff I have no clue how it's coded but since people have loved it ever since I doubt it's shaping a wall-of-sound.

I'm actually interested in how Kazrog Thermionik works under the hood. There have been traces of IR-stuff there, but Kazrog was for me the moment that I stopped thinking about it. It felt just a joy to play through that I stopped caring.

I'm just pretty confident that from pure IR standpoint you can't make an amp sim. IR / Convolution is 'shaping something A into B' . You need to 'create something A' first. In other words, IR-convolution can't create something out of nothing. It's just very precise EQ, you need to clip / distort somewhere and in a tubey-way to come a bit close :). And I'm pretty sure the 'looking at the each component-thing' has been done for years way way back. I've seen amp-sim-coders work first in splice to get an emulation of a circuit right and sounding like the amp, then the trick is to optimize and recode parts of that splice emulation to get it running cpu-efficient without sacrificing (too much) of the sound.

Amp sims are at the stage that you can re-amp a DI through a real amp and record it's speaker-out (converted to line level by a DI box) and then send that DI through the amp sim and you get the exact same sound that people in ABX testing can't tell apart. That means it's 'done'. The sim is doing is job perfectly. If people like it, and if they get the whole chain of interface into DAW into cab sim out of monitors to do what they like is more the question these days :).

If an amp sim produces a sound that is not different from the real amp in blind tests, I don't care how the amp sim is made :). Now just to get the sound out of an amp sim in such a way in the room so that it gives the same sensation as standing in front of that half-stack :)

Re: True Circuit Modeling (non-impulse-based) plug-ins

Posted: Fri Feb 10, 2017 6:20 pm
by DaveClark
Hello once again SnuggleKittens,

Thanks for your last post. Sorry for my tardiness in reply, but it's a busy time of year for us.

1) It is somewhat suspicious that you are having trouble with GNU/FSF compilers. Are you using MINGW? If so, have you also compiled the numerical stuff under Linux to see if it's actually working correctly as a double-check for the Windows version? I've done a lot of numerical work under Linux over the years and have never run into such a discrepancy as you described that wasn't immediately resolved.

3) There isn't anything to argue about nor anything for people to make up their minds about. I'm stating the simple fact that you are modelling a (proper) subset of that which the OP is asking about. I'm not saying that you are not doing “true circuit modelling,” just that it's incomplete.

4) In case you are under some mistaken impressions: SPICE is not a general-purpose solver for ODE systems of all types. SPICE assembles sparse matrices on-the-fly as it reads the input deck or file, using the concept of “stamps” to accomplish this task, these stamps being specific to circuit elements. It then uses sparse matrix techniques for solution. The solvers have been worked on for over forty years. You can read about all this in Farid Najm's book, ISBN 978-0-470-56120-1. Another reference is ISBN 0-442-28108-0 (1983 version) by Jiri Vlach and Kishore Singhal. What you are doing with state-space methods is rather unusual for straightforward EE circuit analysis, although probably simpler than constructing a stripped-down SPICE-like dll from scratch for a handful of amps.

The main time sink in SPICE is usually purported to be model evaluations, not performing useless multiplications by zero. Another problem is poor choices of solution parameters which can easily slow it way down, even by orders of magnitude.

As many people have shown over decades, it is very difficult to outperform SPICE in doing what SPICE does when the problem is set up properly.

Dave Clark