Equalizer
The equalizer performs frequency correction of the signal: it changes the gain in specified frequency bands. A parametric equalizer is implemented — a cascade of up to 16 biquad sections with independently adjustable centre frequency, gain and quality factor of each band.
Purpose
A filter (see “Filters”) performs frequency selection: it passes a frequency band and suppresses the components outside it. The equalizer performs magnitude response correction: it attenuates or boosts individual bands by a specified number of decibels, including bands within the filter passband. Typical tasks:
- suppression of narrow-band interference and its harmonics (mains hum at 50, 100, 150 Hz);
- boosting the band in which the energy of the signal under study is concentrated;
- attenuation of interfering components without complete removal of the band;
- compensation of the magnitude response irregularity of the microphone and the acoustic path.
The equalizer is placed in the processing chain after the filter and before noise reduction. Its output is used in all “processed” modes: level calculation, spectrum and spectrogram, listening and recording. Parameters may be changed during a measurement; in windowed mode each window is processed with zero initial conditions (see “Filters”).
Structure and transfer function
The equalizer is a cascade (series) connection of biquad sections. The transfer function of the cascade equals the product of the section transfer functions multiplied by the preamplification factor:
Hi(z) = (b0i + b1iz−1 + b2iz−2) / (a0i + a1iz−1 + a2iz−2)
20·lg|HEQ(ejω)| = P + Σi 20·lg|Hi(ejω)| (magnitude response in dB is the sum of the section responses)
Section coefficients are calculated by the formulas of R. Bristow-Johnson (Audio EQ Cookbook):
The factor g is included in the b coefficients of the first section. Bands with a centre frequency f0 ≥ 0.98·fs/2 are not realized and are marked in the processing description; peaking and shelving bands with G = 0 dB are excluded from the cascade, since their transfer function is identically equal to one.
The transient duration of the equalizer is determined from the energy of the impulse response: the sample index after which the energy of the remaining part of h[n] is less than 10−4 (−40 dB) of the total energy. It is added to the transient duration of the filter.
Band types
| Type | Parameters | Magnitude response |
|---|---|---|
| Peaking (bell) | f0, G, Q | Gain G at f0, 0 dB far from f0 |
| Low shelf | f0, G, Q | Gain G below f0, G/2 at f0, 0 dB above |
| High shelf | f0, G, Q | Gain G above f0, G/2 at f0, 0 dB below |
| Second-order high-pass | f0, Q | −3 dB at f0 with Q = 0.707; roll-off 12 dB/octave |
| Second-order low-pass | f0, Q | The same for high frequencies |
| Notch | f0, Q | Transmission zero at f0, bandwidth ≈ f0/Q |
| Band-pass | f0, Q | 0 dB at f0, roll-off 6 dB/octave on both sides |
Coefficients of the peaking and shelving filters (the low-pass, high-pass, notch and band-pass formulas are given in “Biquad section”):
low shelf: b0 = A[(A+1) − (A−1)cos ω0 + 2√A·α], b1 = 2A[(A−1) − (A+1)cos ω0], b2 = A[(A+1) − (A−1)cos ω0 − 2√A·α]
a0 = (A+1) + (A−1)cos ω0 + 2√A·α, a1 = −2[(A−1) + (A+1)cos ω0], a2 = (A+1) + (A−1)cos ω0 − 2√A·α
high shelf: the same expressions with cos ω0 → −cos ω0 in the brackets and the signs of b1, a1 changed
Fig. 1. Magnitude responses of equalizer sections, fs = 16,276 Hz.
Quality factor and bandwidth
The quality factor Q determines the bandwidth of the peaking, notch and band-pass filters: Δf ≈ f0/Q. The bandwidth in octaves N and the quality factor are related by:
For shelving filters Q determines the steepness of the transition between the 0 dB and G levels; with Q = 0.707 the transition is monotonic, with larger Q overshoots of the magnitude response appear near f0. The time constant of the transient envelope of a narrow-band section is τ ≈ Q/(π·f0).
Overall response and band interaction
The magnitude response of the cascade in decibels equals the sum of the section responses. When the bands of adjacent sections overlap, their gains add up: the total boost between the centre frequencies may exceed the gain of each section.
Fig. 2. Band interaction: a 125 Hz section (G = +6 dB, Q = 1.41) and a cascade of 63 Hz and 125 Hz sections with the same parameters. The maximum of the overall response exceeds +6 dB.
Graphic and parametric equalizers. In a graphic equalizer the centre frequencies and the quality factor are fixed (for example, the octave series 31.5 Hz…16 kHz according to ISO 266, Q ≈ 1.41), and only the gain is adjusted. In a parametric equalizer all three parameters of each band are adjusted. The implemented equalizer is parametric; the graphic variant is set by a preset.
Preamplification and headroom
Preamplification P (−24…+24 dB) is the overall gain of the cascade. If the maximum of the overall response exceeds 0 dB, the amplitude of the signal components in the corresponding band increases, which may cause the full scale to be exceeded and the signal to be clipped during listening. Headroom is ensured by choosing
This value is set by the “Auto preamp” command. When the maximum of the overall response is positive, the interface displays a warning.
Response editor
The editor displays the overall magnitude response of the equalizer (including preamplification), the response of the selected section and, as a background, the spectrum of the current channel (original or processed) in dBFS on the right axis. Each section has a marker: round for the types with the G parameter (peaking, shelving), square for the types without it (low-pass, high-pass, notch, band-pass; the marker is placed at the 0 dB level).
| Action | Result |
|---|---|
| Dragging a marker horizontally | Changes f0 (logarithmic scale) |
| Dragging a marker vertically | Changes G (0.5 dB step) |
| Mouse wheel over a marker | Changes Q (factor 1.12 per step) |
| Double click outside markers | Adds a peaking section at the given point |
| Delete key | Removes the selected section |
The table below the graph contains the parameters of all sections for exact input: enable, type, f0, G, Q. Parameters are sent to the processing server 0.12 s after the last change.
Presets
| Preset | Contents | Purpose |
|---|---|---|
| Graphic, 10 bands | Peaking sections at 31.5, 63, 125, 250, 500 Hz, 1, 2, 4, 8, 16 kHz; Q = 1.41; G = 0 | Octave magnitude response correction |
| Parametric, 5 bands | Low shelf 100 Hz; peaking 300 Hz, 1 kHz, 3 kHz; high shelf 6 kHz; G = 0 | Initial configuration for parametric correction |
| Mains hum suppression | Notch sections at 50, 100, 150, 200, 250 Hz; Q = 8 | Suppression of the mains fundamental and harmonics |
| Low-frequency suppression | Second-order high-pass 80 Hz, Q = 0.71 | Suppression of low-frequency noise and vibration |
Preset sections with f0 above 0.98·fs/2 are not created when the preset is applied.
Fig. 3. Magnitude response of the “Mains hum suppression” preset, fs = 16,276 Hz.
Application and limitations
- The equalizer does not change the signal-to-noise ratio within a band: boosting a band increases the signal and noise levels in it equally.
- A filter is used to suppress components outside the band of interest with high attenuation; the equalizer is intended for correction within ±24 dB.
- The phase response of the sections is nonlinear; phase distortions are concentrated near the band centre frequencies.
- Notch sections with a high quality factor at low frequencies increase the transient duration and are sensitive to the deviation of the interference frequency from f0 (the mains frequency may deviate by ±0.2 Hz or more).
- Section coefficients are recalculated when fs changes; the parameters f0, G, Q do not depend on fs.