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,

-- 
FA

  
_______________________________________________
Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org

Reply via email to