Book: The Art of VA Filter Design 2.0.0alpha

DSP, Plug-in and Host development discussion.
mystran
KVRAF
4983 posts since 12 Feb, 2006 from Helsinki, Finland

Post Thu May 03, 2018 7:18 pm

aciddose wrote:The difference between inputs vs. outputs is how the non-linearity affects it as well as signal phase.
Oh sure.. I was just thinking about the linear solution.
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

User avatar
aciddose
KVRAF
11941 posts since 7 Dec, 2004

Re: Book: The Art of VA Filter Design 1.1.1

Post Thu May 03, 2018 7:50 pm

https://soundcloud.com/aciddose-1/gahhh
(download the source flac, soundcloud compression is awful!)

This is the most simple input to 4th stage case where the non-linearity is a naive tanh applied to the buffer between stages: with fully linear integrators (cheap & easily stable.)

It does sound cool though (way cooler than I thought?) and most importantly it doesn't produce the odd pops and other effects you get with non-linearity while doing naive pole mixing.

Obviously if you wanted something like a low-pass + 12 dB high-pass you'd need to differentiate the output giving a combination 18 dB low and 12 dB high "high shelf like" transfer function.

Using inputs though opens up a lot of possibilities and getting it to work with non-linear filters is a lot more easy than trying to work around all the issues with non-linearity.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

Z1202
KVRian
958 posts since 12 Apr, 2002

Re: Book: The Art of VA Filter Design 1.1.1

Post Thu May 03, 2018 10:32 pm

mystran wrote: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.
In the ladder filter you need to mix 5 signals (since you have 5 freedom degrees in the numerator). The 5th signal can be picked up either before the feedback point (that is the input signal) or after the feedback point (the input to the first stage), the latter usually results in simpler expressions. It's the same how in an SVF you have 3 freedom degrees, the HP signal essentially being the "input signal".
mystran wrote: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.
IIRC it's pretty straightforward to work backwards (pun not intended ;) ) from the last stage (for which we already have the answer), you don't actually need the state-space form for that.

1eqinfinity
KVRist
201 posts since 29 Apr, 2012

Re: HP Diode ladder

Post Fri May 04, 2018 3:10 am

Z1202 wrote:
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 ;)
Idk, I guess I was scratching my bu.. head in confusion, because the erroneous results made me feel like I don't get it :) Thanks for the link, it's very helpful!

1eqinfinity
KVRist
201 posts since 29 Apr, 2012

Re: Book: The Art of VA Filter Design 1.1.1

Post Fri May 04, 2018 3:11 am

@aciddose Thanks for the insights!

1eqinfinity
KVRist
201 posts since 29 Apr, 2012

Re: Book: The Art of VA Filter Design 1.1.1

Post Fri May 04, 2018 3:13 am

mystran wrote:...
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.
Could you elaborate a bit more on that please?

ncthom
KVRist
31 posts since 1 Mar, 2017 from Boston, MA

Re: Book: The Art of VA Filter Design 1.1.1

Post Fri May 11, 2018 10:00 am

Hi guys, found this thread after working on a very similar question to the one posed by 1eqinfinity a week or so ago:
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've been working on implementing the phaser structure from Chapter 6 and trying to resolve the feedback loop with the same TPT approach as shown in Chapter 3/4. I followed an approach similar to that described in the Linear digital model section 4.2 where each `fn` is an allpass based on the multimode, taking (2 * lp - in) instead of `lp` directly. That is, where `f1(E) = gE + s1` at the beginning of Section 4.2, I have `f1(E) = 2(gE + s1) - E = (2g - 1)E + 2s1`.

The algebra shakes out very similarly, and it's easy enough to program, but as soon as I set a feedback (`k`) value higher than 0 I lose the notches in my phaser and get a pretty unstable peak. Have I taken the wrong approach for resolving the feedback loop here?

Apologies if you've already answered this, I don't quite have the analog circuitry understanding to be make decent sense of the discussion that ensued since 1eqinfinity's question. Thanks!

mystran
KVRAF
4983 posts since 12 Feb, 2006 from Helsinki, Finland

Re: Book: The Art of VA Filter Design 1.1.1

Post Sat May 12, 2018 6:49 am

ncthom wrote: The algebra shakes out very similarly, and it's easy enough to program, but as soon as I set a feedback (`k`) value higher than 0 I lose the notches in my phaser and get a pretty unstable peak. Have I taken the wrong approach for resolving the feedback loop here?
I thought I answered this already, but apparently not.

It should really stay stable for both positive and negative feedback as long as the feedback magnitude is less than 1. Depending on the feedback polarity the notches either get more narrow or you get resonant peaks in between the notches. The changes over the useable range should be smooth and gradual. For the notches to remain "deep" you need the "dry" and the "wet" paths to have equal gain at the notch frequencies; the gain of the "wet" path depends on the feedback, but if the "dry" path is taken from inside the loop (as in the figure) then that should take care of that... but problems with the mix-gain should just result in the notches gradually becoming more shallow, so if they suddenly disappear that's a bigger problem somewhere.

So.. like.. if it seems to work as expected with k=0, then probably a you have some math error with the feedback. Your pole-formulations seem fine, for what it's worth.
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

ncthom
KVRist
31 posts since 1 Mar, 2017 from Boston, MA

Re: Book: The Art of VA Filter Design 1.1.1

Post Sat May 12, 2018 11:44 am

Awesome, thanks mystran. I'll go back through the algebra then, I must have made a silly mistake somewhere.

ncthom
KVRist
31 posts since 1 Mar, 2017 from Boston, MA

Re: Book: The Art of VA Filter Design 1.1.1

Post Mon May 14, 2018 5:36 am

Alright so I've had another look through my math, and cleaned up my implementation and now what I have works fairly nicely. There's a couple oddities that I want to ask you all about as maybe they indicate something is still wrong here? My default implementation seems to work nicely when the feedback parameter is in the range (-0.909, 0.975), anything higher/lower and the filter blows up. This feels a little bit far from +/-1 to attribute the issue to floating point error or something of the sort.

Now I have another implementation with some tanh approximations sprinkled about, as in section 4.6. In this implementation, I have nice behavior with feedback on the range (-1, 1), but very strange behavior as I sweep the cutoff frequency while k=1. Particularly, when the cutoff frequency gets up to ~11kHz (~SR/4), I get two very strong resonant peaks near Fc and the spectrum analyzer seems like it's threatening to blow up as I move the parameter in the nearby range. However, past ~11kHz and as I move closer to SR/2 the output gain just drops straight off: the whole signal attenuates towards 0.

Apart from the tanh these two implementations share the same math, and both of them feel like they're right...but not quite right. Does this sound familiar? Or does this kind of behavior reveal something to you that I'm missing? Thanks

Z1202
KVRian
958 posts since 12 Apr, 2002

Re: Book: The Art of VA Filter Design 1.1.1

Post Fri Jun 08, 2018 5:43 am

So, the recently promised (in another thread) update to the book is here
https://www.native-instruments.com/file ... 2.0.0a.pdf
(revision 2.0.0alpha)

Major highlights:
- different presentation of Sallen-Key filters
- 8-pole ladders
- detailed discussion of nonlinearities
- "Butterworth filters of the 2nd kind"
- different presentation of shelving filters, high-order generalized Butterworth and elliptic shelving
- generalized Linkwitz-Riley crossovers
- lots of theoretical stuff
- last but not least: a neat formula for the frequency shifter's poles ;)

Among other stuff, the book provides "research documentation" and theoretical coverage for the new filters and FX in the updated Reaktor Core macro library (soon to be released, teaser, teaser! ;) )

The book is in the "alpha" state, some of the material had only surface checking. Also the text hasn't been spellchecked (don't ask :) ).

Thanks to everyone at KVR who has been involved in the discussions and provided feedback!

Enjoy!

1eqinfinity
KVRist
201 posts since 29 Apr, 2012

Re: Book: The Art of VA Filter Design 2.0.0alpha

Post Fri Jun 08, 2018 6:21 am

Great, thank you very much, Vadim!
Just from reading the Contents it looks very juicy ;)

Ivan_C
KVRian
1065 posts since 11 Aug, 2004 from Breuillet, France

Re: Book: The Art of VA Filter Design 2.0.0alpha

Post Fri Jun 08, 2018 12:09 pm

Oooh ! Thank you very much ! I'll read the new parts asap

mystran
KVRAF
4983 posts since 12 Feb, 2006 from Helsinki, Finland

Re: Book: The Art of VA Filter Design 1.1.1

Post Fri Jun 08, 2018 12:41 pm

Z1202 wrote: Among other stuff, the book provides "research documentation"
I had a quick browse through most of it and frankly I think some of the stuff (especially chapters 9 and 10) reads pretty much like "research documentation" where it presents a lot of mathematics without really making it very clear what the actual point is. That doesn't necessarily mean there isn't a point, just that it's not very obvious. :P

Also I feel like the treatment of non-linearities reads a bit like an "overview of methods" rather than a very practical guide... and the OTA 1-pole is non-sense (ie. the input non-linearity is not necessarily even that significant in some circuits and this thing isn't even necessarily stable under high gain because it lacks the actual limiting non-linearity at OTA output; I'm honestly not sure how to do better without introducing an explicit notion of current vs. voltage though).
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

Z1202
KVRian
958 posts since 12 Apr, 2002

Re: Book: The Art of VA Filter Design 1.1.1

Post Fri Jun 08, 2018 1:42 pm

mystran wrote:I had a quick browse through most of it and frankly I think some of the stuff (especially chapters 9 and 10) reads pretty much like "research documentation" where it presents a lot of mathematics without really making it very clear what the actual point is. That doesn't necessarily mean there isn't a point, just that it's not very obvious. :P
The point is stated in the chapter titles ;)

mystran wrote:Also I feel like the treatment of non-linearities reads a bit like an "overview of methods" rather than a very practical guide... and the OTA 1-pole is non-sense (ie. the input non-linearity is not necessarily even that significant in some circuits and this thing isn't even necessarily stable under high gain because it lacks the actual limiting non-linearity at OTA output; I'm honestly not sure how to do better without introducing an explicit notion of current vs. voltage though).
Well, this is one kind of nonlinearity present in OTA models. I didn't do a proper modelling of OTAs themselves, but a discrete-component analog model of an OTA-based ladder, which I did a surface analysis of, featured this kind of nonlinearity due to its usage of a differential transistor pair. Also IIRC this kind of saturation appeared in Huovilainen's models of OTA-based structures. I definitely do not claim that this is a complete model of an OTA or even any kind of an attempt at that. "OTA" is more like a label for this particular way to introduce nonlinear behavior. Probably this is not clearly phrased in the book, so I might consider making it more clear in later versions. The nonlinearity itself though is quite useful, as it provides a different kind of cutoff variation than with transistor ladder.

Edit: the book doesn't aim to describe high-precision models of analog hardware. Rather it tries to learn from the analysis of analog circuits and distill a number of abstract techniques, which can be used on their own, without any relation to the analog hardware anymore.
Last edited by Z1202 on Fri Jun 08, 2018 2:03 pm, edited 1 time in total.

Return to “DSP and Plug-in Development”