public static BiQuad CreatePeakEQFilter(int sampleRate, double frequency, double bandWidth, double peakGainDB) { BiQuad res = new BiQuad(); res.Q = bandWidth; res.fc = frequency / sampleRate; res.peakGain = peakGainDB; res.CalcBiquad(); return res; }
public static BiQuad CreatePeakEQFilter(int sampleRate, double frequency, double bandWidth, double peakGainDB) { BiQuad res = new BiQuad(); res.Q = bandWidth; res.fc = frequency / sampleRate; res.peakGain = peakGainDB; res.CalcBiquad(); return(res); }
public EqFilter(int sampleRate, double centerFrequency, float bandWidth, float gain) { if (sampleRate <= 0) throw new ArgumentOutOfRangeException("sampleRate"); if (centerFrequency <= 0) throw new ArgumentOutOfRangeException("centerFrequency"); if (bandWidth <= 0) throw new ArgumentOutOfRangeException("bandWidth"); _sampleRate = sampleRate; _centerFrequency = centerFrequency; _bandWidth = bandWidth; _gain = gain; _filter = BiQuad.CreatePeakEQFilter(sampleRate, centerFrequency, bandWidth, gain); }