public EQ(int channel, int priority, float[] octavesSpacing) : base(channel, priority, IntPtr.Zero) { foreach (var f1 in octavesSpacing) { bql.Add(f1, BiQuadFilter.PeakingEQ(44000, f1, 4, 1)); } OctavesSpacing = octavesSpacing; }
public Filter(eBiQuadFilter e, float rate, float freq, float q) { typ = e; Cfreq = freq; switch (e) { case eBiQuadFilter.HP: bqf = BiQuadFilter.HighPassFilter(rate, freq, q); break; case eBiQuadFilter.LP: bqf = BiQuadFilter.LowPassFilter(rate, freq, q); break; case eBiQuadFilter.BP: bqf = BiQuadFilter.BandPassFilterConstantSkirtGain(rate, freq, q); break; default: throw new ArgumentOutOfRangeException("e"); } }
public void update(float rate, float f, float q) { if (f > 0 && Cfreq != f) { switch (typ) { case eBiQuadFilter.HP: bqf = BiQuadFilter.HighPassFilter(rate, f, q); break; case eBiQuadFilter.LP: bqf = BiQuadFilter.LowPassFilter(rate, f, q); break; case eBiQuadFilter.BP: bqf = BiQuadFilter.BandPassFilterConstantSkirtGain(rate, f, q); break; default: throw new ArgumentOutOfRangeException("e"); } Cfreq = f; } }
public void Update(int band, float gain) { bql[OctavesSpacing[band]] = BiQuadFilter.PeakingEQ(44000, OctavesSpacing[band], .2f, gain); }