This project has moved. For the latest updates, please go here.

How do I use NAudio.Dsp.BiQuadFilter?

Apr 20, 2009 at 8: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 4: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 1:46 PM the end it war running the BiQuadFilter?