[PD] Resonant filter using cpole~ czero~

Mike Moser-Booth mmoserbooth at gmail.com
Sun Feb 19 20:08:35 CET 2012


On Sun, Feb 19, 2012 at 1:04 PM, Mathieu Bouchard <matju at artengine.ca> wrote:
> Le 2012-02-02 à 19:13:00, Mike Moser-Booth a écrit :
>> I don't think this is entirely accurate. I think a and c should be
>> switched here, though of course when finding b²-4ac that doesn't
>> really matter.
>
>
> It depends whether you write ax²+bx+c or a+bx+cx². Both forms are
> convenient, and the latter expands better in cases of variable degrees
> (letters don't get renamed when adding a term), but the former is more
> common for cases that have only a degree fixed at 2 or 3.

Ah, okay.

>> Also, when applying a gain to a recursive filter, it's not really the same
>> as scaling all the coefficients. If you were to scale them first, then the
>> gain would affect the feedback portions of the filter. Applying the gain
>> after means the feedback samples are not scaled by the gain.
>
>
> Those filters are all linear. This means that you can effectively commute
> them with a constant gain [*~] without any difference. However, it will make
> a difference when the gain of [*~] changes quickly while the main input
> changes too.

Right. I was just saying that, if you separate the gain from the
filter, the gain has to be applied at the input or the output. It's a
single operation. So if you incorporate it into the filter, scaling
the feedback coefficients has the effect of making it multiple
operations. Or at least that's how I understand it, anyway.

At any rate, the only reason I picked up on that in your previous
email is because I wanted to plot the frequency response of [bp~], and
at first I just applied the gain to all the coefficients without
thinking about. It didn't work. Then I remembered the gain should just
be applied to the FIR part of the filter, and it worked fine.

>> If you think of it in terms of its transfer function, it would look
>> more like this: H(z) = g*(1 / (1 - 2r*cos(ω)*(z^-1) + r^2 * z(^-2) ))
>
>
> Well, I was thinking of it in terms of 1/H(z) or 1/gH(z).
>
> But are you sure that you got the signs right in the denominator ?

Pretty sure, though I mess that up all the time. Aren't you supposed
change the signs of the feedback coefficients when z-transforming the
difference equation?

.mmb

-- 
Mike Moser-Booth - mmoserbooth at gmail.com
Master's Student in Music Technology
Schulich School of Music, McGill University
Centre for Interdisciplinary Research in Music Media and Technology

"If you think education is expensive, try ignorance" -Derek Bok



More information about the Pd-list mailing list