Login / Register 0 items | $0.00 New @ KVR
earlevel
KVRist
 
449 posts since 4 Apr, 2010

Postby earlevel; Mon Apr 30, 2018 5:15 pm Re: HP Diode ladder

1eqinfinity wrote:Hello again, everyone ;)
Am I right that it's ok to build pure (not multimode) HP ladder using lowpasses, but taking (in - lp) as the filters' outputs?
The underlying filters are then processed as lowpasses, but the Gn and Sn for the whole ladder are derived from yn = xn - (g(x - yn) + sn).

The Behringer Model D apparently implements the highpass option this way. I've seen people confused as to why it doesn't sound like a highpass, which it won't if they have Emphasis (resonance) turned up. The lowpass ladder has no phase shift in the passband, -180 degrees at the corner, feedback is negative. So yes, it works fine, but feedback won't work as user would expect, because it adds the lows back in and you end up with more of a peaking filter.
My audio DSP blog: earlevel.com
User avatar
aciddose
KVRAF
 
11842 posts since 7 Dec, 2004

Postby aciddose; Tue May 01, 2018 12:22 pm Re: Book: The Art of VA Filter Design 1.1.1

To get a true high-pass you'd need to input the signal between the capacitors. So in electronics terms you'd replace each 1n cap with two caps.

Now the problem is that the "moog" filter is a differential filter. So the input is a long-tailed-pair that converts the input to current, and below the LTP the current is scaled by the CV input (works like a faucet/tap.)

Above, each "stage" is a capacitor buffered by a common-base pair. So you're actually looking at two identical filters being applied to positive and negative current (inverted) which is why the filter is notorious for needing incredible matching and temperature control and still having generally awful performance, but great noise performance relatively speaking (compared to non-differential filters.)

So you'd need to use inverters and current mirrors in place of the LTP... which would add up to a ton of extra transistors and eliminate the low cost advantage of the original design. (Such a thing would never have appeared in any Moog gear due to expense.)

Once that is done you could ground each capacitor in the "ladder" individually rather than connecting to the opposite side (negative/inverted).

At that point, you'd ground the input and send your signal via four buffers to all four capacitors on the positive side and an inverter and four more buffers on the negative side.

The output buffer with LTP would remain the same, but the whole circuit would require very careful matching to ensure it worked correctly which would be near impossible in such an electronic circuit.

... enter DSP.

In DSP implementations we are actually not handling the differential circuit and instead modelling a far more trivial 4-pole-OTA-cascade circuit.

This is trivial in DSP since we can perform computations using exact coefficients and don't need to worry about pesky things like temperature. So computing a true high-pass "ladder" is only slightly more expensive compared to the low-pass version, and the high-pass "discrete paths" implementation can also be used for low-pass, band-pass and any other mode by inverted-pole-mixing.

(If you didn't want the input-(inverted)-pole-mixing capability you could just input the signal to the first stage capacitor pair for a 24 dB high-pass, or the third stage for 12 dB high-pass, but such decisions would be so useless as to be very questionable in terms of efficiency. If you're going to all the expense anyway you might as well do the pole-mixing and open up numerous other more useful modes.)

The feedback path would then work correctly!

I'm not certain that even one accurate discrete differential model exists in software anywhere.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
1eqinfinity
KVRist
 
161 posts since 29 Apr, 2012

Postby 1eqinfinity; Wed May 02, 2018 3:47 am Re: HP Diode ladder

earlevel wrote:The Behringer Model D apparently implements the highpass option this way. I've seen people confused as to why it doesn't sound like a highpass, which it won't if they have Emphasis (resonance) turned up. The lowpass ladder has no phase shift in the passband, -180 degrees at the corner, feedback is negative. So yes, it works fine, but feedback won't work as user would expect, because it adds the lows back in and you end up with more of a peaking filter.

Thanks! Yes, that's my problem too (one of them, actually), low frequencies are still very much audible.
For now I'd say that my LP multimode "moronic solution" mentioned earlier sounds better to my taste than the current one :)

aciddose wrote:To get a true high-pass you'd need to input the signal between the capacitors. So in electronics terms you'd replace each 1n cap with two caps.

Now the problem is that ...

Thanks! I wish I could understand it on a detailed level. I've read a couple of massive discussions on filters that you, Vadim and other experienced guys had participated in here on KVR, and as a result I understand that I need to have a good electronic circuit knowledge in order to do some of the less trivial stuff mindfully.

(If you didn't want the input-(inverted)-pole-mixing capability you could just input the signal to the first stage capacitor pair for a 24 dB high-pass, or the third stage for 12 dB high-pass

Sorry, I don't quite get it. Do you mean feeding the input right to the first trapezoidal integrator?

(If you're going to all the expense anyway you might as well do the pole-mixing and open up numerous other more useful modes.)

The feedback path would then work correctly!

If you mean using only LPs, then I did it, but perhaps something's wrong with my calculations for HP and BP modes. I still can't find the mistake in algebra though unfortunately. Both HP and BP modes don't have an acceptable attenuation, that's why I'm doing the HP design.

I'm not certain that even one accurate discrete differential model exists in software anywhere.

Both of your and Earlevel's answers and a brief mentioning of the differentiator-based filters in the book makes me feel a bit stunned :) Firstly I wonder what would be the right implementation of a differentiator for VA filters (this is interesting by itself aside from the ladder), and secondly will it even be of any use in this task except for getting some practice.
Z1202
KVRian
 
920 posts since 11 Apr, 2002

Postby Z1202; Wed May 02, 2018 4:33 am Re: HP Diode ladder

1eqinfinity wrote:Hello again, everyone ;)
Am I right that it's ok to build pure (not multimode) HP ladder using lowpasses, but taking (in - lp) as the filters' outputs?
The underlying filters are then processed as lowpasses, but the Gn and Sn for the whole ladder are derived from yn = xn - (g(x - yn) + sn).
I'm not exactly sure I'm reading correctly your equations. However the simplest way to build a highpass ladder in to replace all LPs with HPs. In that sense taking (in-lp) is giving you the multimode 1-pole's HP output.
Z1202
KVRian
 
920 posts since 11 Apr, 2002

Postby Z1202; Wed May 02, 2018 4:39 am Re: HP Diode ladder

1eqinfinity wrote:Both of your and Earlevel's answers and a brief mentioning of the differentiator-based filters in the book makes me feel a bit stunned :) Firstly I wonder what would be the right implementation of a differentiator for VA filters (this is interesting by itself aside from the ladder), and secondly will it even be of any use in this task except for getting some practice.
I guess the word differential referred to a "differential transistor pair" rather than differentiator-based filtering. As to differentiators, you can implement a (T)DF1/2 differentiator by simply reciprocating the integrator transfer function (which gives you H(s)=s) and applying BLT. In the LTI case filters based on such integrators should be fully equivalent to the ones based on integrators (since TFs must be the same). Not sure about non-LTI situations. Personally I'm somewhat skeptical about this as a means to model analog circuitry (although it could work to an extent), since analog circuitry (in the causal sense) performs integration. But who knows, maybe some interesting sounding digital filters can arise this way.
User avatar
aciddose
KVRAF
 
11842 posts since 7 Dec, 2004

Postby aciddose; Wed May 02, 2018 11:02 am Re: HP Diode ladder

1eqinfinity wrote:
(If you didn't want the input-(inverted)-pole-mixing capability you could just input the signal to the first stage capacitor pair for a 24 dB high-pass, or the third stage for 12 dB high-pass

Sorry, I don't quite get it. Do you mean feeding the input right to the first trapezoidal integrator?


Sometimes... it depends upon the exact equations you're using but in many cases yes, you'd simply add the input directly.

For example:
hp = input to high-pass (opposite side of capacitor)
fb = output signal estimate
y0 = b0*g + in*cg + hp + fb;

1eqinfinity wrote:
(If you're going to all the expense anyway you might as well do the pole-mixing and open up numerous other more useful modes.)

The feedback path would then work correctly!

If you mean using only LPs, then I did it, but perhaps something's wrong with my calculations for HP and BP modes. I still can't find the mistake in algebra though unfortunately. Both HP and BP modes don't have an acceptable attenuation, that's why I'm doing the HP design.


Well, once you get any of the modes to work (for example low-pass) you can use the same implementation to get any other modes by mixing in the signals at the right points scaled by the correct coefficients.

1eqinfinity wrote:
I'm not certain that even one accurate discrete differential model exists in software anywhere.

Both of your and Earlevel's answers and a brief mentioning of the differentiator-based filters in the book makes me feel a bit stunned :) Firstly I wonder what would be the right implementation of a differentiator for VA filters (this is interesting by itself aside from the ladder), and secondly will it even be of any use in this task except for getting some practice.


Not "differentiator", differential.

Differential as in balanced. Positive + negative dual phase.
https://en.wikipedia.org/wiki/Differential_amplifier

Image

This is a Darlington differential amplifier. The same circuit is used in the minimoog filter output, but it doesn't use a single current path (like IQ) for ID, and performs somewhat more poorly than an ideally trimmed circuit would. (The CMR drifts to very poor once temperature has an effect.)

A normal OTA-based integrator cascade uses a single phase signal.

In "balanced" signal processing you use positive and negative (inverted) phase and process the two signal channels identically. This means any interference signals or distortion are applied to positive and negative by (ideally) equal amounts.

The output then = positive - negative.

For example signal = 1
negative = -1
output = 1 - (-1) = 2

If you add:

pos = sig + noise
neg = -sig + noise
output = pos - neg = sig + sig + noise - noise = sig * 2.

So that's what the purpose of the original moog filter design was: reduced noise by balanced processing. Other balanced (differential) filters exist such as diode ring filters or the famous diode-ring using discrete diodes "Steiner-Parker" filter.

Obviously any non-linearity then is not cancelled out exactly but rather changed significantly. This is why none of the single-phase "models" (NOT MODELS) of the "moog filter" you see are anywhere near accurate. Only a true differential computation using dual non-linear processing and non-linear mixer could produce an identical result. No OTA-based single phase filter will ever produce the same results. Especially important is the fact that the two sides of the "ladder" are not perfectly even especially with regard to the input currents at the LTP input and the differential amplifier ("buffer") at the output. Due to the bias present here the harmonic spectra of the filter is not pure odd as it often is in software.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
mystran
KVRAF
 
4833 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Wed May 02, 2018 3:16 pm Re: HP Diode ladder

By far the biggest difference between a naive tanh-model and the "real deal" is the feedback path. If you feel like you need a fully differential model after sorting that out, then go for it, but at least take the low-hanging fruit first (since it's far from negligible).

The ladder itself at least simplifies to the tanh-model under some well-defined assumptions: forward biased matched transistors with high beta (ie. base-collector junctions can be ignored, the non-linearity is a symmetric tanh and base-currents are negligible). Whether these assumptions are safe is up for debate, but there seems to be fairly universal consensus that higher-beta transistors better matched with each other tend to improve the sound of the hardware, so I don't know. As far as "forward biased" goes, you could check that in Spice.

Either way, doing a full transistor simulation (assuming Ebers-Moll, but that's probably good enough) is 20 junctions to solve, plus whatever you need for the feedback amplifier, so that's not exactly cheap in terms of CPU. Whether it'd be worth it, I don't know.

edit: I suppose strictly speaking by "forward bias" we really also mean that the base-collector junctions remain reverse biased, so we don't hit saturation.. but the point is, if you're in forward active region and your beta is high enough to ignore the base-currents then tanh is not that far from reality
Image <- plugins | forum
User avatar
aciddose
KVRAF
 
11842 posts since 7 Dec, 2004

Postby aciddose; Wed May 02, 2018 4:49 pm Re: Book: The Art of VA Filter Design 1.1.1

Even well matched transistors are recommended to be glued with heat-conductive paste. Modern designs use SMD quad or more pairs because of the need for this matching including temperature.

In the original designs however (Moog modular and minimoog) it's a fact they used discrete transistors and however well matched they were they would not have drifted equally with temperature.

http://secretlifeofsynthesizers.com/minimoog-model-d/
Image

In addition, not only is the matching of the common-base buffer transistors in the "ladder" important but the darlington differential amplifier is even more so. Due to the uneven bias and source/sink currents it is impossible that the temperature of all devices in the circuit would be perfectly matched and therefore impossible that tanh would ever approximate any real-world example of such a discrete circuit.

It certainly is a good approximation for a perfect implementation: then again that is also well matched to an OTA filter which means there is nothing to distinguish the Moog design at all!

It must be kept in mind that low distortion and minimal CV feedthru are what would make the circuit sound "better" in the opinion of those you refer to: yet if we wanted a 100% linear filter we'd just be using a cheap DSP implementation and not worrying about any of this analog circuit model nonsense at all.

So in that sense it's important to be aware of the context for such statements. My opinion is that the low-distortion version of the circuit sounds absolutely awful and there are any number of other circuits I'd prefer. I do feel the fully discrete moog circuit has an interesting sound though: only due to all the "bad" things about it!
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
mystran
KVRAF
 
4833 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Wed May 02, 2018 6:11 pm Re: Book: The Art of VA Filter Design 1.1.1

aciddose wrote:It certainly is a good approximation for a perfect implementation: then again that is also well matched to an OTA filter which means there is nothing to distinguish the Moog design at all!


That's stretching it quite a bit. I mean yeah.. if you have an "OTA" that is well-approximated by tanh and provides differential output (so the feedback of each pole can share the non-linearity with the input to the next stage the way it does in the ladder, this being the primary reason a ladder distorts the way it does), then sure... that's a valid equivalent circuit.

That's not exactly what the usual OTA-cascade looks like though, since usually those would instead sum the feedback with the pole-input OTA at which point the caps will probably accumulate DC offset and the "tanh" is no longer a good approximation for a practical OTA running on finite rails and the results sounds absolutely nothing like a ladder.
Image <- plugins | forum
User avatar
aciddose
KVRAF
 
11842 posts since 7 Dec, 2004

Postby aciddose; Wed May 02, 2018 6:43 pm Re: Book: The Art of VA Filter Design 1.1.1

I should have said it differently I guess although things can get very wordy if accuracy is needed... I meant "OTA filter" as in the usual single-phase DSP filter would then be able to approximate the result quite well. This is exactly how all the current best "moog filter" models sound: like an absolutely perfect circuit. They don't produce the thumping, distortion or offsets that the real filter produces and they tend to have far too much odd harmonic.

Most software is still a long stretch from even roughly approximating the timbre although maybe one or two implementations are now very close... just still not identical and I believe the reason is the differential structure and transistor/resistor/capacitor variation.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
1eqinfinity
KVRist
 
161 posts since 29 Apr, 2012

Postby 1eqinfinity; Thu May 03, 2018 1:27 am Re: HP Diode ladder

@Z1202, @aciddose

Actually I'm referring to "Differentiator-based filters" section that starts on the bottom of p. 53.
And to
the paragraph on p. 20 wrote:The LP to HP substitution can be performed not only algebraically (on a
transfer function), but also directly on a block diagram, if we allow the usage
of differentiators. Since the differentiator’s transfer function is H(s) = s, replacing all integrators by differentiators will effectively perform the 1/s s
substitution, which apparently is the same as the s 1/s substitution. Shall
the usage of the differentiators be forbidden, it might still be possible to convert
differentiation to the integration by analytical transformations of the equations
expressed by the block diagram."

I'm interested in the implementation of those differentiators on the block diagram. It is interesting by itself, but practically I'm doing the HP-based version because for now I think that in the diode case I can not get the right output mixture. Maybe it's my mistake, or maybe it really is not doable.

aciddose wrote:Well, once you get any of the modes to work (for example low-pass) you can use the same implementation to get any other modes by mixing in the signals at the right points scaled by the correct coefficients.

That's the thing. I've implemented transistor ladder by the book and then did multimode math, the result sounds awesome (to my taste). Then I switched to the diode version and couldn't get nice multimodes. We had a short discusion here with Vadim about the approach. One of the main points was that in general case we can not really get precisely the desired TF by mixing the stages. It means that we basically are only approximating the desired TF since we don't have the choice of denumerator when solving for the mixing coefficients. With diode ladder my approximation is no good, and for now I haven't seen a person who'd say "it's 100% doable this way, and I did it, and here's how it sounds, and go have a nice cup of coffee and don't worry."

aciddose wrote:...
Especially important is the fact that the two sides of the "ladder" are not perfectly even especially with regard to the input currents at the LTP input and the differential amplifier ("buffer") at the output. Due to the bias present here the harmonic spectra of the filter is not pure odd as it often is in software.

Thanks for the detailed description! Yes, I saw you wrote this somewhere to explain why the perfectly symmetrical sigmoids are not a good choice for saturation.

Z1202 wrote:But who knows, maybe some interesting sounding digital filters can arise this way.

You never know indeed. While doing the SVF I messed around with the fb path (you've left a hint there ;)) and stumbled upon some crazy and stable screamer. It sounded so interesting that I saved that version for later experiments, maybe something consistent will come out of it.

Edit: @aciddose Whoa, that's a deep look!
Z1202
KVRian
 
920 posts since 11 Apr, 2002

Postby Z1202; Thu May 03, 2018 3:48 am Re: HP Diode ladder

1eqinfinity wrote:I'm interested in the implementation of those differentiators on the block diagram.
Then why don't you do that? Do you have any specific questions? Actually, I think at least partially the differentiators have been successfully used in filter models:
http://dafx13.nuim.ie/papers/44.dafx201 ... ion_56.pdf
Although personally I would have built a fully integrator-based model. Not sure if there is any difference arising out of that in the final model in this case ;)
User avatar
aciddose
KVRAF
 
11842 posts since 7 Dec, 2004

Postby aciddose; Thu May 03, 2018 4:41 pm Re: HP Diode ladder

1eqinfinity wrote:
aciddose wrote:Well, once you get any of the modes to work (for example low-pass) you can use the same implementation to get any other modes by mixing in the signals at the right points scaled by the correct coefficients.

That's the thing. I've implemented transistor ladder by the book and then did multimode math, the result sounds awesome (to my taste). Then I switched to the diode version and couldn't get nice multimodes. We had a short discusion here with Vadim about the approach. One of the main points was that in general case we can not really get precisely the desired TF by mixing the stages. It means that we basically are only approximating the desired TF since we don't have the choice of denumerator when solving for the mixing coefficients. With diode ladder my approximation is no good, and for now I haven't seen a person who'd say "it's 100% doable this way, and I did it, and here's how it sounds, and go have a nice cup of coffee and don't worry."


Well yes, in some cases this isn't possible. You can attempt to input the signal rather than merely reading the outputs from each stage though. For example in a Sallen&Key filter you get low/band/high modes by mixing inputs with a single output and single feedback path.

Likewise it's possible to mix both the inputs and outputs of a four-pole filter to get more control over the transfer function.

For example if you input to the fourth stage high-pass, you get a 6 dB high-pass output. If you input to the third stage you get a 6 dB band-pass and you'd then need to differentiate that signal to get a 12 dB high-pass instead by cancelling out the low-pass stage.

By combining pole mixing and multiplexed inputs with differentiators and integrators you should be able to get far more responses than pole mixing alone.

Technically however you'll never produce transfer functions that simply aren't ever possible with such a filter... then again you couldn't in the electronic version either.,What you can do is exactly the same as what you could achieve with an equivalent ideal circuit while taking into account the caveat we're dealing with a discrete TF rather than continuous.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
mystran
KVRAF
 
4833 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Thu May 03, 2018 6:17 pm Re: Book: The Art of VA Filter Design 1.1.1

I don't think using both inputs and outputs really ever gets you anything as usually either alone will let you place your zeroes however you please and when you manage to hit a singularity it usually affects the inputs and outputs the same. That's my experience at least.

With regards to the diode though, keep in mind that you can't use the simplified math for the buffered cascade to calculate the coefficients, because the responses at the poles are not just (1/(s+1))^n anymore. Instead you need to solve for the actual responses of the individual poles (this is probably easiest to do with the state-space form) and then use those to solve the zero-placement.
Image <- plugins | forum
User avatar
aciddose
KVRAF
 
11842 posts since 7 Dec, 2004

Postby aciddose; Thu May 03, 2018 7:07 pm Re: Book: The Art of VA Filter Design 1.1.1

The difference between inputs vs. outputs is how the non-linearity affects it as well as signal phase. For example with a 6 dB high-pass mode you could either read from the first output and take (stage1 - input) or input to the forth stage and take the main output directly.

Obviously if you input into the main input (low-pass 24 dB) and read negative from the first stage this then gives 6 dB high-pass on its own... but when mixed with the main output the result can be different depending upon how linear the input and integrator stages are vs. using the main input, main output and feeding into the 4th stage integrator for high-pass.

Technically speaking yes you can in the linear case produce the same results either way for trivial transfer functions. I don't believe the results are identical when doing more complicated mixtures of inputs/outputs with non-linearity however.

I also believe that using integrator inputs (simple addition) will work out to less computational cost though in many cases. I admit I haven't experimented much with such configurations enough to know what is more or less efficient or what "sounds best" as I've found the cost vs. benefit is poor in almost all cases.

I feel in terms of "sounds best" that more than 12 dB high-pass isn't useful at all and if I were implementing a filter with a single configuration I would prefer to use a KHN or SK high-pass (12 dB or 6 dB) instead. I know for a fact these are cheaper than four integrators.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
PreviousNext

Moderator: Moderators (Main)

Return to DSP and Plug-in Development