Seems pretty complicated (read: involves solving an equation that perhaps might not be numerically stable) though.Music Engineer wrote: ↑Sun Jan 14, 2024 5:48 pmThe procedure that I describe here:
http://rs-met.com/documents/dsp/LowShel ... otypes.pdf
should work for filters with (finite) zeros, too.
The beauty of the method I outlined (that works with all-poles only though) is that a transform of a product of individual poles is the same as the product of transforms of individual poles.. so you take an array of normalized s-plane series biquads (+lone pole if any; you could do it all as lone complex poles, but biquads is kinda easier), you apply LP->Shelf or LP->Peak transforms to each biquad (+lone pole if any) individually (with gain scaled taking the order into account), then pick a cutoff (eg. prewarp constant in case of BLT) and convert to digital using whatever method (eg. BLT or MZTi or whatever).
Does not care where the prototype poles come from. Does not care how the transform to digital is done. More importantly: input is biquads, output is biquads... and biquads are numerically nice and it's usually not a huge problem to design for series biquads directly. Further, if the biquads are implemented as trapezoidal SVF (which is numerically even nicer) then BLT becomes trivial too and the only "complicated" part of the whole thing is really just the numerical LP->BP transform... which you only need to do for biquads (and well.. lone poles for odd order prototypes, but that's the usual 2nd order BP formula). Easy to write the whole thing as general method that works for order 2 and works for order 42.
These designs are also naturally gain symmetric (assuming shelf cutoff and peak Q is taken as the gain midpoint RBJ style) which due to the nature of how they are designed also makes them kinda shape symmetric; I don't have a proof at hand that both sides of a Butterworth shelf are maximally flat, but they sure look like that visually.
It's basically the beauty and elegance of this whole thing which is why I never bothered thinking too hard about prototypes that would have finite zeroes.. because might just as well bump order if we need more shape flexibility. Once you insist on zeroes.. it all becomes a mess.