public double Filter(double val) { lastValues.Enqueue(val); if (lastValues.Count == H.Length + 1) { lastValues.Dequeue(); return(FilterUtilities.Convolve(lastValues.ToArray(), H)); } return(val); }
public ConvolvingDoubleEndedFilter(double fMin, double fMax, double bandwidth, double sampleRate, bool pass) : base(FilterUtilities.DoubleEndedBlackmann(fMin / sampleRate, fMax / sampleRate, bandwidth / sampleRate, pass)) { }
public ConvolvingSingleEndedFilter(double fCutoff, double bandwidth, double sampleRate, bool highPass) : base(FilterUtilities.SingleEndedBlackmann(fCutoff / sampleRate, bandwidth / sampleRate, highPass)) { }