Conduct Performance Testing on an Audio Graphic Equalizer

The real deal with a ten-band equalizer is that you can graphically visualize the spectral shaping you provide to the signal passing through the equalizer by just looking at the positions of slider gain controls, as shown.

Credit: Illustration by Mark Wickert, PhD

Here’s a collection of Python functions to display the exact frequency response.

Top-level function ten_band_eq_resp(GdB,Q) displays the frequency response magnitude in an upper subplot and the equalizer settings in the lower subplot:

Credit: Illustration by Mark Wickert, PhD
`In [337]: ssd.ten_band_eq_resp([-6.5,0,0,-1.5,0,4.5,0,9.5,0,0],3.5)`

To verify operation in the time domain, consider as input a sum of sinusoids at 31.25 Hz and 4,000 Hz. Use the Python function ten_band_eq_filt(x,GdB,Q) to get the filtered output:

```In [375]: t = arange(0,0.1,1/44100.)
In [376]: x = cos(2*pi*31.25*t)+cos(2*pi*4000*t)
In [377]: y = ssd.ten_band_eq_filt(x,[-6.5,0,0,-1.5,0,4.5,0,9.5,0,0],3.5)
In [380]: subplot(211)
In [381]: plot(t,x)
In [385]: subplot(212)
In [386]: plot(t,y)```

The figure shows the comparison of the input (upper subplot) and output (lower subplot) waveforms.

Credit: Illustration by Mark Wickert, PhD

The lower subplot shows that the equalizer has done its job! The 31.25-Hz sinusoid is smaller (by the factor 10–6.5/20 = 0.473) and the 4-kHz sinusoid is larger (by the factor 109.5/20 = 2.99).