function [b,a] = parmeq(R,r) % parmeq --> Graphic equalizer based on parametric filters. % % % [b,a] = parmeq(R,r) % % % The graphic equalizer consists of a cascade of N second order % parametric filters. R and r are N-vectors used to design % the parametric filters. If R(i) < r(i), the i'th filter will % be a notch filter, otherwise it will be a peak filter. The gain % of the peak (notch) is determined by the closeness of r(i) and R(i), % and the width of the peak (notch) is determined by the closeness % of r(i) and R(i) to the unit circle. % % % parmfilt --> Second-order parametric filter design. % % Peter S.K. Hansen, IMM, Technical University of Denmark % % Last revised: March 20, 2000 %----------------------------------------------------------------------- N = length(R); b = 1; a = 1; w0 = pi/(2*N):(pi/N):pi; for (i=1:N) [bi,ai] = parmfilt(w0(i),R(i),r(i)); a = conv(a,ai); b = conv(b,bi); end %----------------------------------------------------------------------- % End of function parmeq %-----------------------------------------------------------------------