/// <summary> /// Create a Peaking EQ /// </summary> public static BiQuadFilter PeakingEQ(float sampleRate, float centreFrequency, float q, float dbGain) { var filter = new BiQuadFilter(); filter.SetPeakingEq(sampleRate, centreFrequency, q, dbGain); return(filter); }
/// <summary> /// Create a bandpass filter with constant skirt gain /// </summary> public static BiQuadFilter BandPassFilterConstantSkirtGain(float sampleRate, float centreFrequency, float q) { var filter = new BiQuadFilter(); filter.SetBandPassFilter(sampleRate, centreFrequency, q); return(filter); }
/// <summary> /// Create a High pass filter /// </summary> public static BiQuadFilter HighPassFilter(float sampleRate, float cutoffFrequency, float q) { var filter = new BiQuadFilter(); filter.SetHighPassFilter(sampleRate, cutoffFrequency, q); return(filter); }
public void SetHighpassMode(float cutoff) { Mode = FrequencyFilterMode.Highpass; CutoffHigh = cutoff; if (filter != null) { filter.SetHighPassFilter(Format.SampleRate, cutoff, 1); } else { filter = BiQuadFilter.HighPassFilter(Format.SampleRate, cutoff, 1); } }
public void SetBandpassMode(float cutoffLow, float cutoffHigh) { Mode = FrequencyFilterMode.Bandpass; CutoffLow = cutoffLow; CutoffHigh = cutoffHigh; float center = cutoffLow + ((cutoffHigh - cutoffLow) / 2); float q = center / (cutoffHigh - cutoffLow); if (filter != null) { filter.SetBandPassFilter(Format.SampleRate, center, q); } else { filter = BiQuadFilter.BandPassFilterConstantSkirtGain(Format.SampleRate, center, q); } }
public void Disable() { Mode = FrequencyFilterMode.Disable; filter = null; }