# Have LP, HP. Need BP.

Emanuel Landeholm e-san at algonet.se
Mon Nov 22 09:19:35 EST 1999

```Hi,

First, I'm sorry about the empty message I accidently sumbmitted an
hour or so ago.

I have a general two-pole filtering routine which takes the parameters
cut-off, resonance and type (LP or HP) which are transformed to
IIR-coefficients. The resulting dynamic IIR filter is then applied
to a signal level.

The transformation goes like this:

Cut-off and resonance are mapped to angle and distance for two complex
conjugated poles. I don't remember exactly where the zeros are placed
(no source code available at the time of writing), but I believe that
one of the zeros depends on the filter type parameter (which is -1 or
1 for LP, HP in random order) and that the other zero is constant
(could be [1,0], not sure though). Simple transforms.

computationally cheap as I have solved a general algebraic warp from
poles/zeros to IIR-coefficients (I don't mean General, the warp only
applies to two-pole filters). There's a call to cos() and, I think, a
call to sqrt().

In reality, the two steps described above are of course fused into
one; a few adds, mults and the cos() and sqrt()-call. The filter is
really crude but I think it will suffice for my needs and there's
always the possibility to cascade two or more filters.

This all very cute, but my problem is this: I need a BP filter with
"like" (for some value of "like") parameters and characteristics. I
would be very delighted if such a filter could be realized by just
extending my existing filter. Even pool BP:s are realizeable, it's the
odd pole BP:s that are tricky right? And what about bandwidth? Do I
need to add an extra parameter just for BP:s (not very elegant), or is
there a possiblity to reuse the resonance argument in some clever way?
Bandwidth and resonance seem to my intuition to be curiously
interrelated...

Thanks in advance. I will post the source code when I get back from work
should anyone be interested.

--
Emanuel Landeholm - pragmatist, idealist, cynic
[Paid Ad] Learn all about The Way to Succeed and The Way to Suck Eggs.