Q-factor formula in filtergraph~

Frederic's icon

Hello,

Is it somewhere explained how the Q factor is defined for "peaknotch" filters in filtergraph~ ? It doesn't seem to follow the typical "half-gain" or "peak -3dB" bandwidth approach. Any help would be appreciated!

Cheers,
Fred

$Adam's icon

Hm... I've never heard about the "half-gain" or "peak-3dB" approach when talking about the Q-factor. AFAIK the Q-factor of an arbitrary filter is defined as the quotient of the stored and the dissipated power. For band-pass filters, this can be approximated as the quotient of the centre frequency and the bandwidth. For peaknotch, no idea...

Frederic's icon

Hi Adam,

Thanks for trying ;)
For peak/notch filters there is indeed more than one way to define it. Some clarity from Cycling'74 on that would be appreciated to be able to transfer easily those filter into an embedded platform. Using the biquads coefficients is an option, but not so flexible and convenient.

Cheers,
Frederic

Zachary Seldess's icon

Hi all,

This is an old thread, but the question is still very valid.

I can't find any documentation on filter formulas for filtergtaph~, particularly peak/notch and shelving filters. I often use Max for rapid filter design prototyping. I then sometimes need to port the results to C for VSTs or embedded projects. Thus far, I haven't been able to reproduce the Q/slope behavior of these filters (formulas found in Pirkle and Zolzer books produce different results, for example). Once you have something you like, having spent time carefully calibrating a design, even slight variations in filter slope/Q can make a difference.

Cycling folks, can you provide the filter formulas? I'm sure there's nothing proprietary in them, right?

best,
Zachary

Frederic's icon

Hi Zachary,

That's a long time ago, but if I remember correctly it follows the formulas in the classic Audio EQ Cookbook from Robert Bristow-Johnson. It was straight-forward to convert to Javascript in Max.

Cheers,
Fred

Zachary Seldess's icon

Thanks Frederic.

I should have compared to that source from the beginning. I'll look into it.

best,
Zachary

Zachary Seldess's icon

Just to follow up... I can confirm that the [filtergraph~] object DOES implement the formulas in Audio EQ Cookbook. Thanks Frederic.

best,
Zachary