Circuit modeled filter, how to?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

oh but i need to clarify a bit here. i believe that when you use the "approximations", you're actually getting closer to the real function the electronic circuit itself is only making an approximation of. when you try to model a circuit, you're not going for the function itself, you're making a software approximation of an electronic approximation of an ideal function.

there are many things in a circuit which influence the sound in a positive way, and many things which influence the sound in a negative way. it would be most productive in my opinion if we could isolate those components of the circuits which change the fundamental ideal function and start from scratch in an attempt to model _that_ function, not the circuit.

a very good example is my page header for xhip:

"Xhip is a subtractive synthesizer which is implemented in a pure form. Other software subtractives attempt to do 'analog modeling', Xhip is not a 'VA'."

if people really wanted just the electronics they would buy the electronics - and do. if you believe people want the electronics and only go for software due to practical concerns, maybe you're in the wrong business. have you ever considered electrical engineering?

Post

aciddose wrote:i've wasted quite a bit of time trying to fiddle with the "real diode equation" but for all practical purposes even the first 'approximation' of n*n is accurate enough.
So, let me get this straight. You did an analog model, then you simplified it to the point you were happy with the amount of cpu used? Hmmm. I think I've read that somewhere before...
aciddose wrote:i just really do not see the use in telling a guy like williamk that he needs to go through an electrical engineering course...
I've never done electrical engineering, I never said you need a degree, I just stated the things involved. If you think what I said was factually incorrect in doing a circuit simulation then please tell my where I went wrong. So assuming they don't bother learning any circuit stuff, how do they know what to do? Do they keep asking you where to but in a waveshaper what what function is good enough for the job? Does that approach really help them in the end?


Andrew

Post

aciddose wrote:oh but i need to clarify a bit here. i believe that when you use the "approximations", you're actually getting closer to the real function the electronic circuit itself is only making an approximation of.
Do you have any analog synths at all? The analog circuit sounds a certain way, and I like the way certain synths sound. That's it. There is no "real function" there are just voltages and currents buzzing around sounding good. The approximations of most circuit modeling hopefully doesn't remove all the good sounding bits.
aciddose wrote:there are many things in a circuit which influence the sound in a positive way, and many things which influence the sound in a negative way.
Definitely
aciddose wrote:it would be most productive in my opinion if we could isolate those components of the circuits which change the fundamental ideal function and start from scratch in an attempt to model _that_ function, not the circuit.
Nope, I'll have to disagree there. That would be like saying when someone paints something white, then they want it white, so the thickness and texture of the paint is not "ideal" and so doesn't matter. We would end up with pristine flat smooth walls, which imho are dull. I like texture and roughness, as an option. Smooth is fun too sometimes.
aciddose wrote:if people really wanted just the electronics they would buy the electronics - and do. if you believe people want the electronics and only go for software due to practical concerns, maybe you're in the wrong business. have you ever considered electrical engineering?
Well I like the fact that with a model everything becomes a parameter. I can do things like automate the saturation current of a diode (a manufacturing constant) to change the asymmetry of the circuit on the fly, with an lfo or envelope. This sounds great. I want to push circuiting modeling forwards with these kinds of cool features. You can't really unsolder and solder on another diode to a circuit quickly enough to make it smooth like you can with a model. You can't run two instances of your analog synth. You don't have the option of an almost noise free amplifier etc. There are benefits to using a computer to model things. The really funny thing from my perspective is just how many millions of transistors it takes to model a single transistor.

Andrew

Post

well, as i mentioned before my 'angry' post wasnt really targeted at you. go back and look at the lists of all the stuff williamk is supposed to need to study and, that is what i'm referring to. i havent been speaking directly to you in most of my posts, a lot of it is general ranting.

"So, let me get this straight. You did an analog model, then you simplified it to the point you were happy with the amount of cpu used?"

no, i started from the simple point and decided going to the extra effort of doing anything like a model is a damn waste of time. even the difference between the n^2 and the basic diode equasion (non-tweaked) is in-audible in this case. the basic equation uses quite a lot of cycles and the other is a single mul. sure it doesnt matter here, but keeping things simple is generally good. one day you might want to do 1000 of these at once and then the one mul vs. equation issue will really come up.

there will be cases where cpu doesnt matter, if the difference isnt audible either, however, you should still go with the simple function.

i have serious doubts that your software actually sounds better because of any of that electronic nonsense. i suspect in attempting to do your models you simply are forced to implement the functions correctly. ultimately after you reduce all the "cant hear the difference" electronic sections of your code you'll end up pretty close to the basic function plus some extra bits where the circuit actually strayed/f**ked up from the basic function.

Post

*edit: nevermind.. this discussion is way too fast for me!*

Great topic btw! :D

Cheers!
bManic
"Wisdom is wisdom, regardless of the idiot who said it." -an idiot

Post

"Nope, I'll have to disagree there. That would be like saying when someone paints something white, then they want it white, so the thickness and texture of the paint is not "ideal" and so doesn't matter. We would end up with pristine flat smooth walls, which imho are dull. I like texture and roughness, as an option. Smooth is fun too sometimes."

this is where you miss my point though!

the paint? think of it this way. you buy a particular can of paint from a particular paint store on a day with a particular temperature and humidity, and you paint with particular brush, etc, likewise as the paint.

so, you decide you like those results and you want to do it again. you spend a huge amount of effort trying to reproduce every tiny detail like an obsessive - why didnt you just buy a can of similar paint and a similar brush from the shop down the street?

by the way, yes i own and have owned many analog synthesizers and other types of audio equipment. i design and build my own equipment and i'll be starting up a manufacturing company in the next few months, in fact.

http://xhip.cjb.net/hardware/ for some mp3s.

you mentioned "ms-20" something or other. well, the filter i've used is similar, it depends if you're talking about the transistor-transconductance version (korg-35) or the ota version introduced later. i'm using a simplified all-discrete transistor-transconductance filter which is similar in that way to the ms-20, however it's my own design and only shares it's basis with the ms-20's 'korg-35' filter.

(even though the circuit is completely different apart from it's basis, they sound damn similar though! another good example of my point where you over-model things. if a different circuit sounds the same, why spend so much time on a software version?)

Post

aciddose wrote:well, as i mentioned before my 'angry' post wasnt really targeted at you. go back and look at the lists of all the stuff williamk is supposed to need to study and, that is what i'm referring to. i havent been speaking directly to you in most of my posts, a lot of it is general ranting.
Sure, we are both having a bit of a rant :) Now in doing what you are doing you still haven't said how you know to put the shapers where you put them. How do you know this? I agree that for a low cpu basic ota model you would do like you put in your code, but where did you come up with that from?
aciddose wrote: "So, let me get this straight. You did an analog model, then you simplified it to the point you were happy with the amount of cpu used?"

no, i started from the simple point and decided going to the extra effort of doing anything like a model is a damn waste of time. even the difference between the n^2 and the basic diode equasion (non-tweaked) is in-audible in this case. the basic equation uses quite a lot of cycles and the other is a single mul. sure it doesnt matter here, but keeping things simple is generally good. one day you might want to do 1000 of these at once and then the one mul vs. equation issue will really come up.
Well I just tried your function and I can certainly tell the difference for my application. I typically use a table for my diode waveshapers, and I need to to this because I am more precise with the exact tone I want than it seems you are.
aciddose wrote:there will be cases where cpu doesnt matter, if the difference isnt audible either, however, you should still go with the simple function.
Agreed, except for the cost of implementing the optimised solution. Sometimes doing a full model takes less time to develop since there is no judgment needed, it's just straight circuit equations.
aciddoes wrote:ultimately... you'll end up pretty close to the basic function plus some extra bits where the circuit actually strayed/f**ked up from the basic function.
I certainly hope so, I love the non ideal grittyness of what analog circuits do. Glad you agree with me :)

So I am interested. What is your favourite analog synth? Which ones do you own?

Andrew

Post

i used to have a ms-10 and i've borrowed a jupiter-4 / juno-60 from a friend in the past. i've played lots of boards over the years in various places, shops and so on but a majority of them do not sound all that great. i've currently got a sh-09 which mostly collects dust, a alpha-juno1 and cr8k drumbox. they all collect dust for the most part.

i've got a few bits of modular stuff i've made myself over time, a 16 channel analog console/eq/etc and lots of rack effects. (also collect dust mostly.)

the stuff i mostly appreciate is just tweaking, soloing on a mono synth. after putting the one i'm working on the designs for currently in a psuedo-chassis i havent used any of my other gear. just like with my software synths/effects i'm constantly reaching for things that do not work the way i think they should with hardware. i have a few issues to tweak on the first synth i'll be producing for sale, but after that it'll be damn close to my ideal single osc mono.

guitar distortion pedals.. again i always find i hate these. my preferred saturation is a buffered-in buffered-out common base amplifier driven to have a shape very similar to tanh(), however with a much more gradual curve. the harmonics generated from such a circuit are constant as you change drive, only their amplitude is changed and most importantly: such a circuit is extremely low noise. gain of 400, noise floor at -80db while most guitar pedals seem to have -40db noise floor or worse. (eek)

i kind of hate the sh-101 and i've modified my sh-09 to the point where it almost doesnt include anything original in it at all. xhip sounds just like a cleaner version of a sh-101, without the nasty parts of the plastic-like tone.

anyway mostly this kind of business is a battle of ideals rather than practicality, so i should leave those comments out. i think we actually _do_ agree on a majority of the issues of practicality.

Post

aciddose wrote:so, you decide you like those results and you want to do it again. you spend a huge amount of effort trying to reproduce every tiny detail like an obsessive - why didnt you just buy a can of similar paint and a similar brush from the shop down the street?
Because some people are selling crap paint that fades and chips off the walls.


aciddose wrote:you mentioned "ms-20" something or other. well, the filter i've used is similar, it depends if you're talking about the transistor-transconductance version (korg-35) or the ota version introduced later. i'm using a simplified all-discrete transistor-transconductance filter which is similar in that way to the ms-20, however it's my own design and only shares it's basis with the ms-20's 'korg-35' filter.
I am talking about the rev 1 circuit without the otas. The audio signal itself modulations it's own cutoff frequency which sounds cool. I love circuits that do things on the cheap, and stuff things up a bit and sound very complicated because of all of the insane interactions going on. FYI I read about the audio signal bleep through in a paper somewhere, I have not done my own anaysis of that circuit yet.
aciddose wrote:(even though the circuit is completely different apart from it's basis, they sound damn similar though! another good example of my point where you over-model things. if a different circuit sounds the same, why spend so much time on a software version?)


I have already pointed out the pros of doing things in software, please read my previous posts.

Andrew

Post

i forgot to mention how i knew to use the exponentiation function as a shaper in that position to get the effect as in that circuit.

this is actually _very_ non-scientific modeling.

if you look at the current through the capacitor/diode clamp you'll see that initially the capacitors charge full on, and then current is stolen from them by the diode clamp as voltage rises above the Vac / drop voltage. looking at the shape of the charge and the resulting voltage stored across the capacitor vs. the one held over the clamp, you can see that charge/current is exponential and that other than RF effects, nothing else is going on.

the simple model, then, is to exponentiate the value of the voltage stored across the capacitor, as we're dealing with delta and everything is then reversed.

basically, what occurs is that the output voltage needs to take on a logarithmic shape. this means the charge must be exponential. we want to charge quickly at first, then drop off as the voltage increases. the shaper function can actually be placed differently and the function can be changed back and forth log/exp depending upon it's position and the desired outcome.

when i wrote the first post saying "hint: in the delta" i already knew this from experience and glancing at your circuit, although i had never seen such a circuit before, i knew this was the action taking place. williamk will never gain that knowledge /ability reading a bunch of papers, he needs experience. best place to start in my opinion is the original series-integrator code i posted and go by trial-error and thought experiments.

Post

Well there is nothing I can say if you can't hear the difference between a rev 1 and rev 2 ms-20 filter. If you go along those lines you may as well say what is the difference between an svf and a moog ladder? They both filter a signal don't they?

Andrew

Post

"Well there is nothing I can say if you can't hear the difference between a rev 1 and rev 2 ms-20 filter."

you misread my post, i never said such a thing.

i said, you cant tell the difference much between my design, and korg's design for the transistor-transconductance sallen-key.

http://xhip.cjb.net/temp/public/adsx1-pulse-ressy.mp3

there is a difference, i can tell the difference between two of the same filter without effort as i've got plenty of experience here. the point is, "you", as in, "the people" cant really tell the difference in general cases like in a mix, or when you're not intentionally trying to pick out the differences.

main design difference effecting sound is that my filter is designed as a modular version with a full 20vpp range. it has changed made to eliminate cv feed-through, "thumping" at high frequencies occur in the korg-35, in my filter they do not. the korg-35 throws any old diodes across the output opamp and uses a generic opamp in that place with high noise, my filter uses a discrete opamp and has a 'correct' (subjective, but ...) feedback path with a diode clamp. korg-35 uses weird resistor values, my filter uses standard values without needing silly tweaked values to get proper feedback scaling and so on.

main timbre difference: clipping in my filter is as part of the feedback path, not the output, therefore harmonics have a 6db/o bandpass curve while in the korg-35 they are HARD. noise is also much lower in my filter, but that is less important than timbre. low noise is merely a added bonus.
Last edited by aciddose on Wed Feb 13, 2008 4:34 pm, edited 1 time in total.

Post

aciddose wrote:i forgot to mention how i knew to use the exponentiation function as a shaper in that position to get the effect as in that circuit.

this is actually _very_ non-scientific modeling.

(*complicated talk of circuit stuff*)

williamk will never gain that knowledge /ability reading a bunch of papers, he needs experience. best place to start in my opinion is the original series-integrator code i posted and go by trial-error and thought experiments.
Hmm, trial and error, sounds well, long, and with no fixed end point that you know will work. But hey, if that rocks your boat then knock yourself out.

So it sounds like you have circuit knowledge and an understanding of different physical things to work out where to put the non-linearites. So in the end you can tell someone where to put the non-linearity, but in the end they don't know how to work it out for themselves. Brilliant. You may as well just give them the code. Oh, you did.

Qucs is excellent for saving time with making circuits and plots. It rocks. And it is fully documented. Oh, and it's free. Did I say how good and easy it is to use? You can even do multi-dimensional plots and export them to lookup tables. It's very practical and fun to use. I want to get involved with the project to allow processing of audio files through it since it's all open source.

Using Qucs, or some other circuit sim program, you can test out the bits of a circuit and see which bits need the most attention. For someone like me who doesn't know their electronic engineering very well I can't just glance at a circuit and say: "that's the most important bit". I have to check out what they all do to work that out.

Andrew

Post

you should be using a industry standard spice simulator like linear's "SwCADIII" if you want to go that route.

Post

aciddose wrote:i said, you cant tell the difference much between my design, and korg's design for the transistor-transconductance sallen-key. there is a difference, i can tell the difference between two of the same filter without effort as i've got plenty of experience here.
Ok, sorry for not getting what you mean. So you are saying that these differences do make an audible difference?

aciddose wrote:the point is, "you", as in, "the people" cant really tell the difference in general cases like in a mix, or when you're not intentionally trying to pick out the differences.
Woops, ok, now you are saying they don't. I'm glad you're back to these dogmatic statements saying what other people can and can't hear. I typically just talk about what I can hear. In the mix, I agree that when other things are going on and it's something is low in the mix it's hard to tell the difference. So, do you sell your synths with a label saying "only to be used at low level in the background of a mix"?

Andrew

Post Reply

Return to “DSP and Plugin Development”