BLT and oversampling

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

For second order svf you could try this implementation by Cytomic. I think it cover's low/high/band pass, notch and peak filters.

Here's an allpass implementation that I posted in another thread:

Code: Select all

//initialize states
s1=s2=0.0;
//set coefficients
q = 1.0/q;
g1 = tan(PI*frequency/sampleRate);
g2 = 1.0/(1+g1*(q+g1));
g3 = q+g1;
//process loop
y0 = (input-s1*g3-s2)*g2;
y1 = y0*g1+s1;
s1 =  y0*g1+y1;
y2 = y1*g1+s2;
s2 =  y1*g1+y2;
output = y0-y1*q+y2;
Last edited by matt42 on Thu Apr 28, 2016 5:53 am, edited 3 times in total.

Post

Ok, so my allpass is basically a state variable filter. The outputs of which are y0, y1 and y2. Taking an analogue transfer function the numerator gives us the coefficients to multiply with these outputs. For example in the case of this all pass the tranfer function is:

Code: Select all

H(s) = (s^2 - s/Q + 1) / (s^2 + s/Q + 1)
So we just look at the numerator and reduces the terms by the highest order of S (in this case 2) so :

Code: Select all

S^2 -> S^0
s/Q -> (s^-1)/Q
1->s^-2
Then multiples of s are the coefficients for the outputs of our system. Powers of s^-n map to yn. So in our case (allpass) the output is:

Code: Select all

y0*1 - y1*(1/q) + y2*1
Here are some transfer functions(lifted from the audio eq cookbook):

Code: Select all

Low Pass:  H(s) = 1 / (s^2 + s/Q + 1)
High Pass: H(s) = s^2 / (s^2 + s/Q + 1)
Band Pass: H(s) = s / (s^2 + s/Q + 1)  (constant skirt gain, peak gain = Q)
Band Pass: H(s) = (s/Q) / (s^2 + s/Q + 1)      (constant 0 dB peak gain)
Notch:       H(s) = (s^2 + 1) / (s^2 + s/Q + 1)
All Pass:    H(s) = (s^2 - s/Q + 1) / (s^2 + s/Q + 1)
So it should be trivial to modify the all pass code for all these cases 8)

Post

JCJR wrote:I read thru your book a couple of times in the past, but this time taking more attention, haven't gone all the way thru. Do you somewhere discuss the use of "true integrators" rather than "RC integrators"? Or is the difference so trivial in practice that it doesn't deserve discussion?
A quick answer, since I don't have much time ATM. The book doesn't talk of RC integrators, but of 1-pole RC filters. In principle you may refer to a 1-pole RC lowpass as a leaky integrator, but IIRC my book doesn't do it. When analyzing the behavior of this filter, we find out that the capacitor works as an integrator there, whereas the unbuffered connection between a resistor and a capacitor provides negative feedback, thus you could say that the integrator becomes leaky, but this leak is notated explicitly in the block diagram as a negative feedback path and is not a part of the integrator itself.

The integrators used in the book (no matter which, naive or trapezoid) are not leaky by themselves. They are true integrators, like the ones used in the SVF.

Post

Z1202 wrote:
JCJR wrote:I read thru your book a couple of times in the past, but this time taking more attention, haven't gone all the way thru. Do you somewhere discuss the use of "true integrators" rather than "RC integrators"? Or is the difference so trivial in practice that it doesn't deserve discussion?
A quick answer, since I don't have much time ATM. The book doesn't talk of RC integrators, but of 1-pole RC filters. In principle you may refer to a 1-pole RC lowpass as a leaky integrator, but IIRC my book doesn't do it. When analyzing the behavior of this filter, we find out that the capacitor works as an integrator there, whereas the unbuffered connection between a resistor and a capacitor provides negative feedback, thus you could say that the integrator becomes leaky, but this leak is notated explicitly in the block diagram as a negative feedback path and is not a part of the integrator itself.

The integrators used in the book (no matter which, naive or trapezoid) are not leaky by themselves. They are true integrators, like the ones used in the SVF.
Thanks Vadim

I was confabulating various sources. Urs wrote some interesting blog posts which feature a one-pole with ota driving grounded capacitor, using negative feedback to form first-order lowpass, which is essentially the same flow as you describe in your book. https://urs.silvrback.com/one-pole-unlimited

Thought I remembered seeing schematics of old state variable synth filters which appeared to use that feedback configuration rather than "true integrators".

In case it is interesting to anyone, maybe a boring topic-- Just thinking out loud. The other day spent awhile web-searching synth filter schematics. Trying to get it straight. There seem at least three usages.

A. True integrator-- OTA driving an opamp inverting input. No negative feedback to the OTA. Only a capacitor in the opamp's Output-to-Input feedback loop.

B. True integrator-- OTA driving a grounded capacitor, with no OTA negative feedback. This case seems equivalent to case A. Applying a non-zero DC input to the OTA, with no negative feedback, the output would probably linear-ramp until it hits a supply rail. Basically the same behavior as Case A.

C. Leaky Integrator-- Though most state variable circuits I found were either case A or B as above, there were a couple which appeared to be using the "leaky integrator" configuration, with negative feedback from capacitor to the OTA inverting input.

It appears that four pole ladder synth filters would typically use a leaky integrator? With only the single global feedback path, a four element ladder might be unstable built out of four cascaded "true integrators". I suppose unless each ladder element is locally resolved into a low-pass at each stage, and with only one global feedback, four true integrators in series would be equivalent to a single integrator with bigger time-constant?

Maybe the two pole instances I saw using leaky integrators are not really state variable filters. Might look at it again sometime. Or maybe some people did make state variable filters with leaky integrators. There are some odd ducks out there. Saw an Octave synth filter schematic-- Four true integrators with global feedback, but also local feedback between each pair of two-pole sub-circuits. Resembled two state variable filters in series, with global feedback.

Post

There is certain similarlity between an SVF and a Sallen-Key filter (or a transposed Sallen-Key filter). So, maybe you've seen some of those. Although I'm not a huge expert in various analog circuits, there can be also some other designs ;)

As for the ladder design, I guess simply making a global feedback around 4 (or any number larger than 1) of integrators gives you an unstable system, since the transfer function is something like H(s)=1/(k+s^N), if didn't do a mistake there. For any N>=2 not all of the poles are in the left semiplane.

Using 1-pole filters (I prefer that term to "leaky integrator") instead of integrators changes the picture.

Post

JCJR wrote: It appears that four pole ladder synth filters would typically use a leaky integrator?
Transistor ladder is 4 buffered RC sections. It's inherently stable without global feedback (it's inherently well behaving in every respect).
JCJR wrote:four true integrators in series would be equivalent to a single integrator with bigger time-constant?
four true integrators in series are four true integrators, you get K/s^4. You can't manage it with single feedback but can with multiple feedback, from each integrator, which would get you higher order state variable filter.

BTW, there is no such thing as "true integrator" in analog domain, OTAs have high but finite output impedance, opamps have high but finite DC gain.

Post

Thanks Vadim and urosh. Yesterday I searched for an example of an "odd duck" appearing to have a state-variable topology, but with 1 pole filters rather than integrators. The search terms must have been different, didn't see the ones I found previously. Doesn't matter much anyway.

Yep so far as I know (which is not much), a four pole ladder made of integrators and only one feedback path, would at least tend to be DC unstable. Would need negative global feedback for DC stability and then another positive global feedback for resonance, and even then would probably behave in a broken fashion. :)

Terminology varies. Unfortunately did not take any EE courses but read and experimented with analog in the 1970's and 80's. Sometimes old books would call a plain RC lowpass an integrator, and call a plain RC highpass a differentiator. Which they are I suppose, but not "ideal cases".

Here is a "fairly recent" tome which uses terminology have seen before-- Am not trying to teach experts anything, merely discussing, maybe interesting to some readers-- http://www.analog.com/library/analogDia ... filter.pdf

Beginning page 8.72 it describes sallen-key, multiple feedback, state variable and biquad, among others. Would maybe be odd to see an analog synth filter based on sallen-key or multiple feedback. Because it is relatively difficult to make the analog variants "tunable". Q, Fc and gain interact. Maybe some of the old synth filters were biquads, but as with state variable, a biquad would typically want to use "non leaky" integrators.

Think I saw instances of two pole ladder, but that wouldn't look much like a state variable. OTOH the way a circuit is drawn sometimes makes it easy to misinterpret.

====

Relevant to Vadim's "Art of VA Filter Design" discussion about variations of the four-pole ladder, ran across some interesting details in the Oberheim Xpander service manual-- http://dl.lojinx.com/analoghell/Oberhei ... Manual.pdf

Am sure Vadim and others already know this, but I don't recall reading the xpander manual before last week. Beginning on page 26 he discusses IMO rather innovative hacking of the Curtis 3372 four pole ladder chip, to make a 15 mode filter. So far as I know MAYBE his design could be copied into software rather easily, at least for a linear, undistorted filter.

Post

JCJR wrote:Relevant to Vadim's "Art of VA Filter Design" discussion about variations of the four-pole ladder, ran across some interesting details in the Oberheim Xpander service manual-- http://dl.lojinx.com/analoghell/Oberhei ... Manual.pdf
Taken directly from Electronotes, btw...

This, I believe: http://electronotes.netfirms.com/EN85VCF.PDF
My audio DSP blog: earlevel.com

Post Reply

Return to “DSP and Plugin Development”