On April 15, 2025 5:19:01 PM GMT+02:00, Fons Adriaensen <f...@linuxaudio.org> wrote: >On Tue, Apr 15, 2025 at 02:08:02PM +0100, Gordonjcp wrote: >> On Tue, Apr 15, 2025 at 01:43:10PM +0200, Fons Adriaensen wrote: >> > >> > Now, to be 'constructive', the correct way to compute c >> > would be >> > >> > f = cutoff_frequency / sample_rate; >> > a = 2 * (1 - cos (2 * pi * f); >> > c = (sqrt (a * (a + 4)) - a) / 2; >> > >> > >> > A good approximation (less than 1% relative error) >> > for 0 <= f <= 0.5 could be >> > >> > c = 2 * pi * f * (1 + f * (3.45f + 4.27f * f)); >> >> Can you explain how you get there, in terms that a 35-years-ago >> Straight-Cs highschool maths student might understand? > >It's really just basic digital filter theory and algebra. > >I found an online version: go to > > <https://www.moseleyinstruments.com/blog/first_order_lowpass> > >and scroll down to > > 'Determining the coefficient ācā when the cutoff is given'. > >The approximation is found by playing with gnuplot for a few minutes. > >Ciao, >
I also found the resources on this site helpful: <https://dsprelated.com/freebooks/filters/> This book also goes into the z-transform which you need often. Kind regards, FPS _______________________________________________ Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org