# All About Audio Equalization: Solutions and Frontiers
## 3 Parametric Equalizers
### First Order Shelving Filters  
In shelving mode, gain \(G\) is applied to all frequencies below or above a _crossover frequency_\(f_{c}\). These are called the low shelving and the high shelving filter, respectively, and are sometimes used in the lowest-frequency and highest-frequency bands. These shelving filters are similar to those found in the basic tone control, but where the tone control usually uses first order shelving filters, the parametric equalizer uses either first or second order filters. First order shelving filters are used to create smooth transitions (about 6 dB/octave) between affected and unaffected frequency regions. The crossover frequency is sometimes called the corner, cut-off, or transition frequency, but we prefer to use the term crossover herein. We first derive the transfer function \(H_{\text{LS}}(z)\) for a low-frequency shelving filter. We would like its gain to be \(G\) at low frequencies (such as at the zero frequency, or \(z=1\)) and \(1\) at the highest frequencies (such as at the Nyquist limit, or \(z=-1\)), that is:  
\[H(1)=G, \tag{1}\] \[H(-1)=1. \tag{2}\]  
There are several possible choices for the gain at the crossover frequency, such as 3 dB lower (in the boost case) or higher (in the cut case) than the filter gain, e.g., [3; 27], but it leads to a confusing situation when the filter gain or loss is smaller than 3 dB [28]. Alternative choices are the arithmetic or geometric mean of the extreme gain factors. However, if the geometric mean is used, then a boost and a cut by the same decibel amount do not cancel. It is also problematic since the arithmetic mean loses its relevance when a decibel scale is used, and it means that the shelving filter will not match the design of peaking and notch filters in parametric equalizers, which often use the geometric mean (see Section 3.3). We choose to use the midpoint gain \(\sqrt{G}\), which corresponds to the geometric mean of the extreme gains (1 and \(G\)), and is the arithmetic mean of the extreme gains on a decibel scale. This is one way to retain the overall magnitude response shape when gain \(G\) is varied. This requirement may be written as  
\[|H(e^{i\omega_{\text{c}}})|=\sqrt{G}, \tag{3}\]  
where \(\omega_{\text{c}}=2\pi f_{\text{c}}/f_{\text{s}}\) is the crossover frequency in radians (\(0\leq\omega_{\text{c}}\leq\pi\)), \(f_{\text{s}}\) is the sampling frequency, and \(j\) is the imaginary unit. We start by defining a prototype low-frequency first order shelving filter, which has its crossover frequency at the midpoint of the frequency range, \(\pi/2\), and has the transfer function of the form  
\[H_{\text{P}}(z)=g\frac{z-q}{z-p}, \tag{4}\]  
where \(p\) and \(q\) are the pole and the zero, respectively, and \(g\) is the scaling factor. By evaluating this transfer function at \(\omega_{\text{c}}=\pi/2\) and using the requirement (3), it is seen that a solution is obtained by setting \(q=-p\), or by placing the pole and the zero symmetrically w.r.t. the origin on the \(z\) plane. The scaling factor must then be \(g=\sqrt{G}\):  
\[H_{\text{P}}(z)=\sqrt{G}\frac{z+p}{z-p}. \tag{5}\]  
The pole location in terms of gain \(G\) can be solved by combining Equations (5) and (1):  
\[p=\frac{G-\sqrt{G}}{G+\sqrt{G}}, \tag{6}\]  
which also satisfies Equation (2).