This project has moved and is read-only. For the latest updates, please go here.

How do I use NAudio.Dsp.BiQuadFilter?

Apr 20, 2009 at 9:08 PM
Hi there,

I'd like to run a wav file through a notch filter before saving the resulting output to another wave file. This factory method in BiQuadFilter looks like what I need:



static BiQuadFilter NotchFilter(float sampleRate, float centreFrequency, float q)

I don't see how to get my samples into the Transform method though:




float[] inBuffer, float[] outBuffer)

The first problem is that in my existing code I'm reading byte arrays from a WaveFileReader and I don't see how to get from byte arrays to float arrays. Is there a class in NAudio for this already?

The second problem is that BiQuadFilter isn't a public class. Is this class ready for use yet?


Eliot Stock.







May 14, 2009 at 5:56 PM

Hi Eliot,

Take a look at my article on Coding4Fun for a description of how to run audio through effects in NAudio. I have no idea whether the BiQuadFilter works or not. I coded it years ago and never got round to using it in earnest.



Jun 16, 2010 at 2:46 PM the end it war running the BiQuadFilter?