juha_p wrote: ↑Sun Oct 10, 2021 6:10 am

SKyzZz wrote: ↑Sun Oct 10, 2021 4:43 am

The fact is that there is no destructive solution. HP filter works fine. But the problem is the LP filter. I also gave examples of what the problem is. There are a lot of comments on these two topics, but there is not a single solution to this problem...

IIRC, response you get for CURRENT plot means your coefficient order is reversed or mixed.

Did you try plot using Earlevel's

grapher applet?

1.

Assume: Fc = 0.25 (normalized frequency, equivalant to ~11 KHz at 44100 sample rate)

2.

For 1st order LPF, use the mentioned:

b1 = exp(-2.0 * M_PI * Fc);

a0 = 1.0 – b1;

To receive:

b1 = 0.20787957635076193

a0 = 0.7921204236492381

3.

Copy paste these two params to the “filter frequency response grapher”:

http://www.earlevel.com/main/2016/12/08 ... e-grapher/
And one receives a weird result.

4.

Still on the “filter frequency response grapher”, change b1 to -b1

One receives the correct graph

5.

To follow that , the LPF calculation might simply be:

b1 = -exp(-2.0 * M_PI * Fc); // add minus

a0 = 1.0 + b1; //change minus to plus

According to the calculations, I adhere to this logic for LP:

b1 = -exp(-2.0 * 3.14 * Frequency);

a0 = 1.0 + b1;