Subject: Re: [linux-audio-dev] implementing EQ
From: Eli Brandt (eli_AT_v.gp.cs.cmu.edu)
Date: ke marras 10 1999 - 16:36:42 EST
est_AT_hyperreal.org wrote:
> I was wondering what people like to use to implement EQ. I've used
> parallel biquadratic filters..low and high pass on the ends and
> band-pass in the middle.
The standard parametric EQ filters, shelving and boost/cut, are
familiar to people. And they're suitable for being run in series so
you don't have the phase cancellation hassle of parallel filter banks.
function [B, A] = eqgen(Fc, gain, width)
% [B, A] = eqgen(Fc, gain, width)
% calculate biquad coefficients for a boost/cut filter.
% Fc normalized 0-1, gain in dB, width in octaves.
O = Fc*pi;
bw = width;
K = 10^(gain/20);
J = sqrt(K);
g = sinh( log(2)/2 * O/sin(O) * bw) * sin(O);
den = 1 + g/J;
b0 = (1 + g*J) / den;
b1 = -2*cos(O) / den;
b2 = (1 - g*J) / den;
a2 = (1 - g/J) / den;
a1 = b1;
B = [b0 b1 b2];
A = [ 1 a1 a2];
> I guess one handy visual way to test such things would be passing
> noise through them and looking at the spectrum. What do people
> recommend for spectrum viewing?
I use Matlab, but don't necessarily recommend buying it as a private
citizen. Scilab and Octave are good free alternatives.
http://www-rocq.inria.fr/scilab/
http://www.che.wisc.edu/octave/
You might, by the way, want to get non-noisy amplitude response
directly from the transfer function or impulse response.
-- Eli Brandt | eli+@cs.cmu.edu | http://www.cs.cmu.edu/~eli/
This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:25 EST