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:

public

 

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

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

 

 

BiQuadFilter.Transform(

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?

Cheers,


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.

http://blogs.msdn.com/coding4fun/archive/2009/02/02/9391048.aspx

Mark

 

Jun 16, 2010 at 2:46 PM

...in the end it war running the BiQuadFilter?