# IIR filters Q

**URL:** <https://forum.juce.com/t/iir-filters-q/42360>\
**Category:** Audio Plugins\
**Created:** [October 22, 2020, 8:52pm UTC](https://forum.juce.com/t/iir-filters-q/42360 "2020-10-22T20:52:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erthal11](https://avatars.discourse-cdn.com/v4/letter/e/ac8455/32.png) [@erthal11](https://forum.juce.com/u/erthal11)\
**Post date:** [October 22, 2020, 8:52pm UTC](https://forum.juce.com/t/iir-filters-q/42360/1 "2020-10-22T20:52:21Z")

</div>

So I have a working highpass and lowpass slider for my plugin. The problem is i have the highpass filter at 20 and the lowpass filter at 20k by default but i still hear them filtering out some of the lows and the highs even at those set parameters. ( I set them up just like on TheAudioProgrammer tutorial for iir filters without adding sliders for the q, just leaving them at .1 ). It sounds like theres still some sort of filtering going on as i’m mostly hearing the mids when i should be hearing everything… I’m definetely doing something wrong but i know its not the distortion processing as is sounds fine when i just comment out the filter processing.

> <https://github.com/erthal11/Venom_Distortion/blob/a728867c42c85995326c84b78dc23ab7ee193d63/Source/PluginProcessor.cpp#L241>

---

<div class="post-metadata">

**Author:** ![kamedin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kamedin/32/11711_2.png) [@kamedin](https://forum.juce.com/u/kamedin)\
**Post date:** [October 22, 2020, 9:46pm UTC](https://forum.juce.com/t/iir-filters-q/42360/2 "2020-10-22T21:46:18Z")

</div>

A Q factor of 0.1 is a gain of -20 dB at the cutoff. This is the response of your filters:

 ![asdf](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/1/1ca6211a81a96a7eb00e5c20f3c0bb7faba1f4be.png)

---

<div class="post-metadata">

**Author:** ![erthal11](https://avatars.discourse-cdn.com/v4/letter/e/ac8455/32.png) [@erthal11](https://forum.juce.com/u/erthal11)\
**Post date:** [October 22, 2020, 10:00pm UTC](https://forum.juce.com/t/iir-filters-q/42360/3 "2020-10-22T22:00:10Z")

</div>

I see now, i had though the slope would start exactly at that frequency… guess i need to do some more research on filters lol. Thanks for the quick response!

---

<div class="post-metadata">

**Author:** ![kamedin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kamedin/32/11711_2.png) [@kamedin](https://forum.juce.com/u/kamedin)\
**Post date:** [October 23, 2020, 12:02am UTC](https://forum.juce.com/t/iir-filters-q/42360/4 "2020-10-23T00:02:19Z")

</div>

The slope can’t start exactly at any frequency, otherwise the response wouldn’t be continuous. For 2nd order filters it tends to zero at one extreme and to 12 dB/octave at the other, with a transition around the cutoff. Q is the gain at the cutoff -it’s 1/sqrt(2) for Butterworth (maximally flat frequency response), 1/2 for critical damping (fastest lowpass decay without overshoot). So 20\*log10(Q) is your cutoff gain in dB: -3 for Butterworth, -6 for critical damping, etc.

---

<div class="post-metadata">

**Author:** ![erthal11](https://avatars.discourse-cdn.com/v4/letter/e/ac8455/32.png) [@erthal11](https://forum.juce.com/u/erthal11)\
**Post date:** [October 23, 2020, 5:43pm UTC](https://forum.juce.com/t/iir-filters-q/42360/5 "2020-10-23T17:43:16Z")

</div>

Thanks!
