I want to get frequency and amplitude from wave file using c#. I tried NAudio and FFT, but result is nothing. can you help me please.
WaveChannel32 wave = new WaveChannel32(new WaveFileReader(open.FileName));
byte[] buffer = new byte[16384];
int read = 0;
double[] _fft;
while (wave.Position < wave.Length)
{
read = wave.Read(buffer, 0, 16384);
_fft = FourierTransform.FFTDb(ref buffer);
}
do not scold if somewhere is wrong. I'm a newbie.
You could use Bass Audio Library. It has .NET wrappers and you can get the peak amplitude and sample rate.