You know what? That explains a lot about the PolyAna GUI!AdmiralQuality wrote: You know what? I went to FILM SCHOOL.
Physical Modelling from a circuit schematic
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
-
- KVRian
- 866 posts since 30 Jul, 2004
To return more seriously to the original question, people *do* model circuits at the component level like this, and have for years with programs like SPICE and its derivatives. But it's not done in real time!
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
kevink wrote:To return more seriously to the original question, people *do* model circuits at the component level like this, and have for years with programs like SPICE and its derivatives. But it's not done in real time!
Sigh. Yes, of COURSE modern analog designers model and simulate their circuits in software! But (I assume anyway) that we were talking about real time music applications, considering he linked to a list of schematics for real time amps, instruments and effects! (And that this is a MUSIC board!)
So, you're just making my point for me. It's POSSIBLE, but not practical. And, take a look at those schematics... they're 1/2 to 1/3 power supply! And lots of impedance matching and op-amps that in software are nothing more than a single multiplication op. Only a small fraction of those analog designs has anything to do with the actual sound. And yes, you can argue that your amp with tube rectifier sags in it's power supply, and that has to be modeled in a software emulation... AND SURE! But still, I'm not going to model 60 Hz 110 mains, and a rectifier, and all of that... I'm just going to EMULATE the result, and suck some power from the loud bits. One or two lines of code vs. hundreds to model (and then throw away) all the invisible behind the scenes stuff that's actually happening in a "real" device.
So again, for the goal of emulation (and that's all any of us musicians actually want) simulation is unnecessary overkill.
S'all. Peace.
I'm still taking your Poly-Ana GUI comment as a compliment BTW.
-
- KVRAF
- 7540 posts since 7 Aug, 2003 from San Francisco Bay Area
Here is an online series of lectures on analog synth design, as well as some software.
http://users.ece.gatech.edu/~lanterma/ece4803/

http://users.ece.gatech.edu/~lanterma/ece4803/
Incomplete list of my gear: 1/8" audio input jack.
- KVRAF
- 12615 posts since 7 Dec, 2004
this is one point which is very important, it is the behaviour that matters, not the way in which you get there.
why use a function like: 1-((1-n)(1-n))
when you can use: n(2-n)
same behaviour, easier to calculate and easier to read and modify.
n(2-abs(n)) is useful in that it comes very close to tanh(2n), but you can not get that same behaviour using the first type of the function.
a majority of the behaviour of a circuit has nothing to do with electronics anyway, things like the power supply, the resistances used or anything like that. the circuit represents a mathematical function, and it often happens not to be the best function to use in order to express the same behaviour in software. rather than modeling a circuit which in my opinion is a huge waste of effort, including effort of your cpu, you should try to mimic the same behaviours which the circuit is actually attempting to model in the first place. your functions in software are designed as a mathematical model for a specific behaviour, as the electronic circuits are also.
electronics engineers do not design circuits just for the fact of having them act electronically. a majority of my time in circuit design as a hobby tends to be spent dealing with the troubles of electronics in an attempt to reach a more accurate model of a behaviour.
do the same in your software! there are too many problems to work around just to model behaviour in software, once you try modeling the 'bad behaviour' of electronics at the same time, you'll run into a lot of trouble.
why use a function like: 1-((1-n)(1-n))
when you can use: n(2-n)
same behaviour, easier to calculate and easier to read and modify.
n(2-abs(n)) is useful in that it comes very close to tanh(2n), but you can not get that same behaviour using the first type of the function.
a majority of the behaviour of a circuit has nothing to do with electronics anyway, things like the power supply, the resistances used or anything like that. the circuit represents a mathematical function, and it often happens not to be the best function to use in order to express the same behaviour in software. rather than modeling a circuit which in my opinion is a huge waste of effort, including effort of your cpu, you should try to mimic the same behaviours which the circuit is actually attempting to model in the first place. your functions in software are designed as a mathematical model for a specific behaviour, as the electronic circuits are also.
electronics engineers do not design circuits just for the fact of having them act electronically. a majority of my time in circuit design as a hobby tends to be spent dealing with the troubles of electronics in an attempt to reach a more accurate model of a behaviour.
do the same in your software! there are too many problems to work around just to model behaviour in software, once you try modeling the 'bad behaviour' of electronics at the same time, you'll run into a lot of trouble.
-
- KVRAF
- 3388 posts since 29 May, 2001 from New York, NY
-
- KVRian
- 1223 posts since 11 Aug, 2004 from France
The articles from Simulanalog are good too 
-
- KVRAF
- 3388 posts since 29 May, 2001 from New York, NY
- KVRian
- Topic Starter
- 759 posts since 10 Aug, 2004 from Fredericton NB
Much obliged to you all, thank you!
I should say that it's one of my life (not joking!) goals to recreate the sound of the Mesa Boogie Dual Rectifier in software. I've tried extensive analysis of the waveforms of guitars severly distorted with that amplifier - they're incomprehensibly complex, and too dynamic to possibly emulate with additive synthesis. It's hard to analyse them closely because a realtime FFT spectrum is too inaccurate in the frequency domain, especially with low notes; also because there's relevant sonic information all the way up to 6khz, so it's hard to view a whole waveform and see every peak and trough of those high harmonics... much less understand them. Physical modelling seems the only solution.
I should say that it's one of my life (not joking!) goals to recreate the sound of the Mesa Boogie Dual Rectifier in software. I've tried extensive analysis of the waveforms of guitars severly distorted with that amplifier - they're incomprehensibly complex, and too dynamic to possibly emulate with additive synthesis. It's hard to analyse them closely because a realtime FFT spectrum is too inaccurate in the frequency domain, especially with low notes; also because there's relevant sonic information all the way up to 6khz, so it's hard to view a whole waveform and see every peak and trough of those high harmonics... much less understand them. Physical modelling seems the only solution.
- KVRAF
- 12615 posts since 7 Dec, 2004
you need to learn how to take measurements of analog equipment correctly. you need a sweep generator, function generator, oscilliscope and a lot of time.
you'll also need to get directly into the circuit and take both linear and nonlinear (function generator for linear, sweep generator for nonlinear) measurements of individual sections.
look it up online, i know there isnt much to really tell you the proper way to do things, but once you look into what a sweep generator is and how to use it and etc, you'll figure it out.
playing a guitar through it is kind of the same as throwing a stone through the air and just watching it with the naked eye in order to figure out how gravity and other properities of physics work.. it just isnt enough. you have to measure and be very analytical about it.
actually, it would be best if you learn how the circuit works first. once you know that you wont need to take any measurements. i was just discribing the way you would measure a black-box to find it's function. here, the first reply you got suggesting years of study is the best way to go about it.
you'll also need to get directly into the circuit and take both linear and nonlinear (function generator for linear, sweep generator for nonlinear) measurements of individual sections.
look it up online, i know there isnt much to really tell you the proper way to do things, but once you look into what a sweep generator is and how to use it and etc, you'll figure it out.
playing a guitar through it is kind of the same as throwing a stone through the air and just watching it with the naked eye in order to figure out how gravity and other properities of physics work.. it just isnt enough. you have to measure and be very analytical about it.
actually, it would be best if you learn how the circuit works first. once you know that you wont need to take any measurements. i was just discribing the way you would measure a black-box to find it's function. here, the first reply you got suggesting years of study is the best way to go about it.
-
- KVRAF
- 2460 posts since 3 Oct, 2002 from SF CA USA NA Earth
Those look pretty nice, thanks for the link. Plus, the prof likes the Chamberlin book, so he must be brilliant.deastman wrote:Here is an online series of lectures on analog synth design, as well as some software.
http://users.ece.gatech.edu/~lanterma/ece4803/
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
Heh, my Roland Microcube amp has a great DSP "R-FIER" emulation for that crunchy Mesa Boogie tone. (Also does a great Fender Blackface tone, and a few others. Very impressive for a $150 box you can run off batteries and strap over your shoulder!) Roland calls this COSM - "composite object sound modelling", but again... it's all just marketing B.S. There's a DSP chip in there running the usual kinds of algorithms. S'all.DavenH wrote:Much obliged to you all, thank you!
I should say that it's one of my life (not joking!) goals to recreate the sound of the Mesa Boogie Dual Rectifier in software. I've tried extensive analysis of the waveforms of guitars severly distorted with that amplifier - they're incomprehensibly complex, and too dynamic to possibly emulate with additive synthesis. It's hard to analyse them closely because a realtime FFT spectrum is too inaccurate in the frequency domain, especially with low notes; also because there's relevant sonic information all the way up to 6khz, so it's hard to view a whole waveform and see every peak and trough of those high harmonics... much less understand them. Physical modelling seems the only solution.
aciddose is right. The way to analyze the distortion from a given device isn't by looking at the output with your instrument playing into it (well, you could learn something if you split the instrument signal before it went in and recorded that too for later comparison). But far better are test tones. And yes, learning about the device itself.
That is, unless you really ARE trying to SYNTHESIZE the sound... i.e. not create an effect but a synthesizer. You mentioned additive synthesis. So... not entirely sure what you mean.
Anyway, your incomprehensible complexity is just a bunch of clipping. Probably somewhat assymetrical. Some compression effect from the power tube saturation. And on the rectifier amps, I believe, lots of distortion at the zero crossings. You'll see it all pretty clearly on the 'scope if you run a sine wave in, rather than a guitar note (or even worse, a chord!)
Boro, I downloaded one of those synth lectures, and the prof was SO annoying I had to turn it off after about 45 seconds! He's one of those guys who thinks he's funny.
- KVRian
- Topic Starter
- 759 posts since 10 Aug, 2004 from Fredericton NB
AdmiralQuality wrote: That is, unless you really ARE trying to SYNTHESIZE the sound... i.e. not create an effect but a synthesizer. You mentioned additive synthesis. So... not entirely sure what you mean.
Synthesis is my goal certainly, but, if using physical modelling, the difference between emulating an amplifier and emulating the guitar and amplifier (guitar through the amp) is almost trivial. So I'm after an amp emulation, then a clean guitar emulation. I'm hoping the latter won't be much of a problem.
I'm skeptical... there must be more to the effect than simple clipping and compression - digitally clipping a guitar and compressing it sounds nothing like the sound of the amp. Neither of those add the complexity present in the desired sound, that's the conceptual problem I have - where does all the new information come from?AdmiralQuality wrote:Anyway, your incomprehensible complexity is just a bunch of clipping.
Heh, yep. Even worse, more instruments crowded around the guitar playing a chord. I don't have a mesa boogie myself to test with, just clips from songs. I'm pretty good at pattern recognition, but there are altogether too many variables for which to account when analysing such a complex sound in the midst of overlapping elements. Now if I had the monophonic, clean guitar tone and the distorted tone on their own, it'd be easier to derive the function to convert the two.AdmiralQuality wrote:And on the rectifier amps, I believe, lots of distortion at the zero crossings. You'll see it all pretty clearly on the 'scope if you run a sine wave in, rather than a guitar note (or even worse, a chord!)
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
WOAH! You've got that TOTALLY backwards. Amp emulation is what's trivial (or at least the easier part). Synthesis of convincing guitar tones (and even worse, a way to CONTROL it!) is like the holy grail. AFAIC nobody's even come close yet.. though many have tried.DavenH wrote:
Synthesis is my goal certainly, but, if using physical modelling, the difference between emulating an amplifier and emulating the guitar and amplifier (guitar through the amp) is almost trivial. So I'm after an amp emulation, then a clean guitar emulation. I'm hoping the latter won't be much of a problem.
I thought you just wanted an effect to process a real guitar through! Really, the sound doesn't come from the amp, it comes from the guitar. If I play flute through a Mesa Boogie, it won't come out sounding like a guitar. If I play square-ish waves from a synth, and know how to play keyboard in a convincing guitar style (not easy!), and maybe run a phaser on it... THEN run that through a Boogie... yeah, it might sound a LITTLE like a guitar. But it's not like an amp is a pitch detector that listens to an input then resynthesizes a guitar sound. The amp is just distorting the sound OF THE GUITAR, in a (hopefully) pleasing way.
The new "information" (in fact, you've lost information) is the extra harmonics from the sharp edges of the clips. Obviously this is an oversimplification, but that's where the new harmonics come from... that's what distortion IS.I'm skeptical... there must be more to the effect than simple clipping and compression - digitally clipping a guitar and compressing it sounds nothing like the sound of the amp. Neither of those add the complexity present in the desired sound, that's the conceptual problem I have - where does all the new information come from?
Oh, then you're screwed. Looking at recorded music on an oscilloscope or FFT won't do a THING for you. Your EARS are MUCH better at pattern recognition than your eyes.
Heh, yep. Even worse, more instruments crowded around the guitar playing a chord. I don't have a mesa boogie myself to test with, just clips from songs. I'm pretty good at pattern recognition, but there are altogether too many variables for which to account when analysing such a complex sound in the midst of overlapping elements. Now if I had the monophonic, clean guitar tone and the distorted tone on their own, it'd be easier to derive the function to convert the two.
Yeah, you're really trivializing this task. Keep your goal in mind as you go about your studies... but you've got a LOT of studying to do before you're going to see results.
Sorry. Stuff is hard.


