Book: The Art of VA Filter Design 2.1.2

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

Post

Thanks Vadim for this amazing book!

Post

Z1202 wrote: The point is stated in the chapter titles ;)
I think you're missing the point: if I'm reading it and wondering what the point is, then as an author you failed to communicate it well enough. ;)
Z1202 wrote:
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...
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.
Actually that OTA-thing (ie. I just happen to think the "OTA=tanh" thing needs to die) was mostly a side-note to the main point, which was that the treatment of non-linearities reads a bit like an "overview of methods" rather than a very practical guide (which might obviously just be my impression, but like whatever) and this was specifically referring to the descriptions of the various method (ie. the beginning of the chapter) rather than the description of various non-linear circuits.

Post

mystran wrote:
Z1202 wrote: The point is stated in the chapter titles ;)
I think you're missing the point: if I'm reading it and wondering what the point is, then as an author you failed to communicate it well enough. ;)
Didn't you say you just quickly browsed through the text? In that sense there is probably no argument that the purpose of lots of stuff becomes clear only once you really read through. There are lots of auxiliary material which I needed, but had trouble to fit into the text structure indeed, so I totally agree that many things might be not clear upon a quick look. Constructive suggestions welcome ;)
mystran wrote:
Z1202 wrote:
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...
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.
Actually that OTA-thing (ie. I just happen to think the "OTA=tanh" thing needs to die) was mostly a side-note to the main point, which was that the treatment of non-linearities reads a bit like an "overview of methods" rather than a very practical guide (which might obviously just be my impression, but like whatever) and this was specifically referring to the descriptions of the various method (ie. the beginning of the chapter) rather than the description of various non-linear circuits.
I'm sorry, but maybe here you fail to communicate the point. I'm not sure what your complaint is. The chapter is intended to be a collection of various abstract ideas of nonlinear structures and is in no way an attempt to properly describe any nonlinear circuits. OTOH, I believe these abstract ideas are highly practical as me and other people have successfully used them to build digital VA-style structures. If your definition of "practical" is restricted to modelling of existing analog hardware, I'm not gonna argue the terminology here.

Edit: as I already said, I didn't attempt any kind of proper analysis of all observable effects of an OTA. If you did that, maybe you could share you findings (if you wish) and maybe then I could have some idea how to turn it to abstract principles (as you seem to say that you don't know so far how to express this in abstract terms). Then I'd add those to the next revision of the book, of course crediting you as the person who researched the original analog circuit. Or, if you don't like this idea, this can be a separate text, where you would be one of the authors. Or maybe you don't like any of that and would do this completely on your own. Whatever :wink:

Post

Z1202 wrote:The chapter is intended to be a collection of various abstract ideas of nonlinear structures and is in no way an attempt to properly describe any nonlinear circuits. OTOH, I believe these abstract ideas are highly practical as me and other people have successfully used them to build digital VA-style structures. If your definition of "practical" is restricted to modelling of existing analog hardware, I'm not gonna argue the terminology here.
What I'm trying to say is that while the first few chapters are quite hands-on and almost anyone should be able to turn them into working code, this one left the impression that it just describes the methods on high level and assumes that reader can fill in the details. As it turns out, methods like Newton are described perfectly reasonably in sources like Wikipedia, yet I've got the impression that many people here still struggle to implement them in practical code. Maybe that's the wrong impression, but I just wanted to share it anyway. :)

The OTA remark was completely orthogonal to the above thought and even an entirely serious thing (except as far as I think tanh() is a terrible model of any type of OTA in most practical circuits, but I certainly get that this is not your primary focus here). :)

Post

mystran wrote:What I'm trying to say is that while the first few chapters are quite hands-on and almost anyone should be able to turn them into working code, this one left the impression that it just describes the methods on high level and assumes that reader can fill in the details. As it turns out, methods like Newton are described perfectly reasonably in sources like Wikipedia, yet I've got the impression that many people here still struggle to implement them in practical code. Maybe that's the wrong impression, but I just wanted to share it anyway. :)
Oh, I guess I get your point now and that's probably a correct impression. Well, while with linear circuits the trapezoidal/TPT approach works nicely in most of the cases and you can typically use it without second thoughts, in the nonlinear case AFAIK there is no such approach. In each specific case you need to find a method or a combination of methods, or hand-tune a particular method etc. So that part of the nonlinear chapter gives an overview of some of the typical methods, but doesn't go into much detail. I have somewhat limited practical experience with those (did just a few nonlinear models with a true nonlinear solution, mostly resorting to the "cheap" method instead), so I didn't see much point copying information from sources on numerical methods without having much to add myself ;)

I also agree that this is a general thing with most of the new materials, where I definitely go into more "theoretical" stuff. This still has a clear practical purpose IMHO, as it broadens the spectrum of one's possibilities, even though maybe not in everyday use ;) . I guess this climaxes in Chapters 9 and 10 (which you mentioned), the primary purpose of these almost 200 pages being the derivation of a single formula 10.57 (even though I think there are lots of other useful stuff in there)
:D :D :D

Post

Speaking of hand-tuning. Is it in general normal to tune the behavior of nonlinear structures by adding additional mapping to some of its parameters? E.g. I've implemented a filter from the book, it sounds nice. Then I've added nonlinearities in a way which doesn't change the zdf equation. Now I can overdrive, but acceptable overdrive amount changes dramatically depending on the current resonance and cut-off frequency. Then I sample the filter's behavior across the parameter space and build approximations for overdrive mapping, like this https://www.desmos.com/calculator/tiugkouczr
In the end I got myself a nice overdriven filter, but I wonder if it is lame engineering.

Post

1eqinfinity wrote:Speaking of hand-tuning. Is it in general normal to tune the behavior of nonlinear structures by adding additional mapping to some of its parameters? E.g. I've implemented a filter from the book, it sounds nice. Then I've added nonlinearities in a way which doesn't change the zdf equation. Now I can overdrive, but acceptable overdrive amount changes dramatically depending on the current resonance and cut-off frequency. Then I sample the filter's behavior across the parameter space and build approximations for overdrive mapping, like this https://www.desmos.com/calculator/tiugkouczr
In the end I got myself a nice overdriven filter, but I wonder if it is lame engineering.
Depends on the details. Can be completely normal, can be lame engineering, can be both ;)

Dependency on the cutoff could be somewhat unexpected, but that again depends on what you define as acceptable. The amount of aliasing will clearly grow with cutoff. The other things may be a subjective taste thing, may be due to some filter specifics or to some mistake in the implementation.

Edit: if you use approximate methods, then the error usually grows with cutoff and resonance as well, respectively the sound may get more unpleasant.

Post

Z1202 wrote: Dependency on the cutoff could be somewhat unexpected, but that again depends on what you define as acceptable.
Z1202 wrote: Edit: if you use approximate methods, then the error usually grows with cutoff and resonance as well, respectively the sound may get more unpleasant.
Well yes, subjectively acceptable overdrive to me is when the sound is at least distinctly different from the clean one and, when possible, at most when a filter screams so hard that you can't tell what the original input was and there's still no junk in the sound. The same subjective feel is sometimes achieved with objectively different values of overdrive across the spectrum. SVF with asinh(x * drive) saturation of both integrators can stand drive up to 2.0 (only somewhere around 3kHz). Also, I find that SVFs and biquads are way more sensitive about overdrive when the cutoff is closer to 0, and often give out DC even with moderate overdrive amounts (< 1.2).

Post

1eqinfinity wrote:SVF with asinh(x * drive) saturation of both integrators can stand drive up to 2.0 (only somewhere around 3kHz).
Non-linear SVF (ignoring the BP feedback damping non-linearity, which doesn't cause anything nasty) is typically not a very well-behaved specimen, because unlike the filters designed around one-poles (in one form or another) there is no real local feedback, so the non-linearities can have global effects and depending on their exact placement they can result in DC offsets, numerical blow up, chaotic behaviour or anything in between (and yes, these can be observed in significantly non-linear analog implementations too) and usually this stuff tends to be frequency, resonance and input signal dependent in analog too.

Personally.. if I was looking for a generic two-pole that has "nice" overdrive behaviour without lots of work, I'd probably rather go for something like SK or TSK instead, since in these you can pretty much just put in some saturation functions in various places (depending on what you want) and things will most work just fine.

Post

1eqinfinity wrote:asinh(x * drive)
Besides what mystran said, this formula looks a bit suspicious to me. Normally drive would control the amount of the input signal to the filter. With the drive amount embedded into the nonlinearity you modify the filter's behavior itself. It is not necessarily wrong, but it can have weird effects (like multiplying the cutoff by the drive, or whatever, depending on exactly where the nonlinearity is placed). Because at small signals asinh(x * drive) doesn't become transparent, but rather multiplies the signal by drive amount. You may consider asinh(x*drive)/drive instead.

Post

On the subject of asymmetric IIR Hilbert-transformers (eg. page 462), since most of the time in practical audio use the low-frequency transition would be the most important design consideration (eg. want "flat" response to 30-40Hz, where as in the high-end we have a bunch of bandwidth above 20kHz or so that isn't very important) and BLT pre-warping will warp exactly one frequency exactly, I'd personally suggest pre-warping the lower transition edge (so you can accurately place it where you want) rather than the bandwidth center frequency (which is generally of no actual interest).

Post

mystran wrote:On the subject of asymmetric IIR Hilbert-transformers (eg. page 462), since most of the time in practical audio use the low-frequency transition would be the most important design consideration (eg. want "flat" response to 30-40Hz, where as in the high-end we have a bunch of bandwidth above 20kHz or so that isn't very important) and BLT pre-warping will warp exactly one frequency exactly, I'd personally suggest pre-warping the lower transition edge (so you can accurately place it where you want) rather than the bandwidth center frequency (which is generally of no actual interest).
Hmmm, not sure what you mean. The text on p.462 prewarps both edges of the band rather than the center frequency.

Post

@mystran @Z1202 Thanks for the insights!
I like that "racing car" character of overdriven SFV during the cutoff sweeps. I haven't tried SK and TSK yet, do they sound like motors too or have some other cool distinctive character? ;)
Knowing that analogue devices behave similarly comforts me a bit, since 99% of my real world analog experience is me getting lost in a huge music shop with lots of analogue machines this spring for a couple of hours.
Usually I'm using asinh(x*drive)/asinh(drive), but for SVF I somewhat liked the nonnormalized version more. However, I did completely miss that normalization may fix the changing cutoff issue. Does this happen because effectively scaling the integrators' values by overdriving is similar to changing the instantaneous gain?

Post

Z1202 wrote:
mystran wrote:On the subject of asymmetric IIR Hilbert-transformers (eg. page 462), since most of the time in practical audio use the low-frequency transition would be the most important design consideration (eg. want "flat" response to 30-40Hz, where as in the high-end we have a bunch of bandwidth above 20kHz or so that isn't very important) and BLT pre-warping will warp exactly one frequency exactly, I'd personally suggest pre-warping the lower transition edge (so you can accurately place it where you want) rather than the bandwidth center frequency (which is generally of no actual interest).
Hmmm, not sure what you mean. The text on p.462 prewarps both edges of the band rather than the center frequency.
Oh.. I see.. I think I mis-understood the step 2 you're proposing. I guess you are performing inverse pre-warp (ie. converting the actual digital frequencies back to analog; the terminology of this stuff is so much more confusing than the actual mathematics), right?

Right.. so that'll work as well. The way I usually would do it is to just design a half-band filter for the desired attenuation and order, then figure out where the lower edge ends up and warp that frequency where it actually should be.

The rationale with this approach is that you can hand-tune (if you want) the whole design in advance (eg. during development) to get satisfactory performance (eg. attenuation and upper transition band) with the minimum expected sampling rate (eg. 44.1kHz), but then leave the warping to run-time. At runtime once we know the actual sampling rate, we'll perform the lower edge warp to where it needs to be and end up with the same predictable low frequency performance and attenuation at any sampling rate, while the upper edge "floats around" approximately proportional to the sampling rate.

But yeah.. I suppose you can also make the alternate trade-off where you always place both edges predictably and just get extra attenuation at higher rates... or place both edges but make the upper edge proportional to the sampling rate, which will then keep attenuation roughly constant as lower edge transition is typically negligible.

Either way, there's some interesting engineering decisions to be made with these things. :)

Post

1eqinfinity wrote:Usually I'm using asinh(x*drive)/asinh(drive)
Please note that this function is not transparent at small x but large drive.
1eqinfinity wrote:However, I did completely miss that normalization may fix the changing cutoff issue. Does this happen because effectively scaling the integrators' values by overdriving is similar to changing the instantaneous gain?
The cutoff change was just an example. This completely depends on where the nonlinearity is placed. The idea is that usually at low signal levels you want the filter behavior unchanged (compared to the linear case) or at least independent of the drive amount which is achieved by the requirement that f'(0)=1 where f is your waveshaper.

Post Reply

Return to “DSP and Plugin Development”