# HighPass filter roll-off

**URL:** <https://forum.juce.com/t/highpass-filter-roll-off/58150>\
**Category:** General JUCE discussion\
**Created:** [October 3, 2023, 5:11pm UTC](https://forum.juce.com/t/highpass-filter-roll-off/58150 "2023-10-03T17:11:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhng22](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dhng22/32/16493_2.png) [@dhng22](https://forum.juce.com/u/dhng22)\
**Post date:** [October 3, 2023, 5:11pm UTC](https://forum.juce.com/t/highpass-filter-roll-off/58150/1 "2023-10-03T17:11:48Z")

</div>

I’m trying to create a high-pass filter with -48dB roll-off, but the **IIR::Coefficients::makeHighPass()** does not provide such parameter.  
Is there any way to achieve this? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [October 3, 2023, 5:41pm UTC](https://forum.juce.com/t/highpass-filter-roll-off/58150/2 "2023-10-03T17:41:13Z")

</div>

Those methods only create 1st or 2nd order filters (6dB and 12dB of rolloff). For a steeper filter you need to chain multiple filters together, and adjust their Q factors for your requirements. EG if you want an 8th order butterworth, you cannot chain four 2nd order butterworth filters to get it.

---

<div class="post-metadata">

**Author:** ![dhng22](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dhng22/32/16493_2.png) [@dhng22](https://forum.juce.com/u/dhng22)\
**Post date:** [October 3, 2023, 11:53pm UTC](https://forum.juce.com/t/highpass-filter-roll-off/58150/3 "2023-10-03T23:53:59Z")

</div>

> [@holy-city](#):
>
> you cannot chain four 2nd order butterworth filters to get it

Apologise but what can i do to achieve -48dB roll-off then

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [October 4, 2023, 4:06am UTC](https://forum.juce.com/t/highpass-filter-roll-off/58150/4 "2023-10-04T04:06:14Z")

</div>

You need to chain together multiple 2nd order lowpass filters (12dB rolloff) to get steeper rolloff. But the tradeoff is that the Q factor for each section need to be tuned to keep the same shape in the passband.

Say you have a 2nd order Butterworth (Q factor of .707) which has a gain of -3dB at 1kHz.If you chain together four of these filters to get an 8th order filter (48dB rolloff) then the gain at 1kHz will be -12dB.

To get the same passband characteristics with the steeper rolloff you need to adjust the Q factors of each stage. You can look at [the table here](https://en.wikipedia.org/wiki/Butterworth_filter#Normalized_Butterworth_polynomials) for the normalized filter coefficients. The entry for 8th order Butterworth gives you four second order polynomials. The coefficient of the middle term is 1 / Q factor.

So for an 8th order Butterworth the Q factors of each second order stage (called a “second order section”) is

```auto
Q1 = 1 / 0.39 = 2.56
Q2 = 1 / 1.11 = 0.90
Q3 = 1 / 1.66 = 0.66
Q4 = 1 / 1.196 = 0.84

```

Basically the idea is that each filter order gives you 6dB of rolloff (so 48dB = 8th order). You can make a higher order filter by chaining together multiple lower orders. But to get the same Q factor (which is kinda poorly defined for higher than second order filters, but for HPF/BPF/LPF just means “gain at the cutoff frequency”) the Q factors of those subfilters need to be adjusted.

---

<div class="post-metadata">

**Author:** ![dhng22](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dhng22/32/16493_2.png) [@dhng22](https://forum.juce.com/u/dhng22)\
**Post date:** [October 4, 2023, 4:24am UTC](https://forum.juce.com/t/highpass-filter-roll-off/58150/5 "2023-10-04T04:24:00Z")

</div>

Oh I’ve seen that order in the dsp::FilterDesign: **designIIRHighpassHighOrderButterworthMethod(FloatType frequency, double sampleRate, int order)**, can i use this instead?
