One-pole filters, shelves and all-passes
The one-pole recurrence and its frequency response, the corner, the complementary high-pass, shelves, the comb, and the all-pass that colours nothing.
9 minutes read
1881 words
Contents13
A filter is a rule that treats fast changes in a signal differently from slow ones. The simplest rule that does so keeps one number in memory and moves it a fixed fraction of the way towards each new sample. Everything on this page is that rule and its mirror image. The last of them rearranges a delay so that it moves a click in time and leaves every steady tone at its level.
Assumed knowledge
The sample rate and the sine wave as a test signal, from signals and samples . The time constant, from decibels and exponential decay .
The section on the frequency response uses the exponential form of a complex number and its modulus. A reader who takes equation (5) on trust can skip the derivation above it and lose nothing later.
Ground covered
The one-pole recurrence and what it does to a jump in the input. Its frequency response, found by feeding it a complex sine. The corner, and the coefficient that puts the corner where it is wanted. The pole, and the notation that names it. The high-pass that costs one subtraction. Low and high shelves, and the three-band gain built from a pair. The comb, which is the echo loop read as a filter. The all-pass, which moves a click in time and leaves every steady tone at its level. Filters in series.
The recurrence
Keep a number and, for each new sample, move it a fraction of the way from where it is to the sample.
Rearranged, that is
When the input jumps from 0 to 1 and stays there, climbs towards 1 with the remaining distance multiplied by every sample. That is the decay of equation (9) on the previous page. The output lags the input and rounds off its corners. A signal that wobbles up and down faster than can follow is averaged away, and one that moves slowly is followed. That is a low-pass filter, meaning low frequencies pass and high ones are reduced. The name one-pole is explained under equation (7).
Response to a sine
To find by how much a given frequency is reduced, feed the filter a sine of that frequency and compare the output with the input. The arithmetic is easier with the complex signal
whose real part is the cosine wave of frequency and whose imaginary part is the sine. The filter is linear, so it acts on the real and imaginary parts separately, and whatever it does to it does to both.
Try the guess that the output is the same signal scaled by some complex number , so that . Putting that into equation (2) gives
Divide through by , which leaves behind on the first term, and solve for .
The guess was right, and is the filter’s frequency response. Its modulus is the factor by which a sine of frequency is scaled, and its argument is the angle by which that sine is shifted. Multiplying top and bottom by the conjugate of the denominator gives the modulus squared.
At , which is a constant input, equation (5) is 1, so a constant passes unchanged. At , the highest frequency a sampled signal holds, it is , which is small when is small. In between it falls steadily.
The corner
The frequency at which the response has fallen to , three decibels down, is the corner . The coefficient that puts the corner at a wanted place is
Equation (6) is equation (6) of the previous page with seconds. That is the time constant of the resistor-and-capacitor circuit whose corner is . The discrete filter inherits it.1 For corners well below the sample rate the match is close. At and , equation (6) gives and a measured three-decibel point of hertz. At it gives and a three-decibel point of hertz, which is 2.4 per cent high. Above the corner the response falls by six decibels per doubling of frequency.
A notation
It is usual to write and to read as one sample of delay, since multiplying by gives . Equation (4) then becomes
and the value of that makes the denominator vanish, , is the filter’s pole. One pole is what makes this a one-pole filter. A pole inside the unit circle, at , means the filter settles, and this one sits at distance from the origin. Filters in series multiply their , which is the first reason to write it this way. The numerator and the denominator also say which delayed samples the recurrence uses.2
The complementary high-pass
Subtract the low-pass output from the input.
What remains is what the low-pass removed, which is the fast part. Its response is , and gathering that over a common denominator gives
The factor is zero at , so a constant is removed entirely. The corner is the same , and above it the response rises to nearly 1. This is a high-pass filter, and it needs no memory of its own beyond the low-pass it is built from.
Shelves
A shelf turns one band up or down by a chosen factor and leaves the rest alone. Add times the low-passed signal to the input.
Below the corner and the gain is . Far above it and the gain is 1. That is a low shelf. Adding times the high-passed signal instead gives a high shelf, with gain 1 below the corner and close to above it.
The gain above the corner is close to rather than equal to it. By equation (5) the low-pass at the top of the band is rather than zero, so the high shelf reaches there. For a corner at hertz and the factor is . Two shelves in series, one low and one high, divide the spectrum into three regions with three gains. That is how a reverb gives bass, middle and treble three different decay times.
The comb
The echo loop of signals and samples ,
is a filter as well. The same substitution as before gives its response.
The denominator is smallest, at , whenever is a multiple of , which happens at the frequencies . There the response peaks at . Halfway between two peaks it is . Drawn against frequency the response is a row of equally spaced spikes hertz apart, called a comb.3 A single echo therefore has a pitch. Everything a reverb does with its delay lines is arranged to blur those spikes into a smooth response.
The all-pass
Take the comb’s memory and read it out with one extra term.
The response is then
On the unit circle, where , write the numerator as . The bracket is the complex conjugate of the denominator, so the two have the same modulus, and the leading factor has modulus 1. The quotient therefore has modulus 1 as well.
Every steady tone comes out exactly as loud as it went in. What changes is the timing. An impulse comes out as at once, then after samples, then after . Each later arrival is times the one before it.
The squares of those numbers add to exactly 1, as they must when no frequency is boosted or cut. An all-pass is therefore a way to spread one click into a cluster of smaller clicks without colouring the sound. A chain of them with different spreads that click into a dense cloud. Reverbs use such a chain to raise the density of the input before it enters the main loop.4
Filters in series
Two filters one after the other have the response , so their magnitudes multiply and their decibel values add. A low shelf, a high shelf and a gain in series give the three-band gain described under equation (11). Eight all-passes in series are still an all-pass, because a product of terms each of modulus 1 has modulus 1.
Figure sources
One script draws the figure. It evaluates equation (5) directly at three settings of , each computed from equation (6). The three-decibel point marked on each curve is measured from the curve rather than taken from the requested corner. It needs NumPy and Matplotlib.
filters.py
uv run --with numpy --with matplotlib python3 filters.py
Further reading
The low-pass filter, its circuit and the discrete form of it.1
The all-pass and the comb, and the structures built from them.4 3
The notation of equation (7) taken further.2
-
Low-pass filter. Wikipedia. Retrieved 5 September 2026. https://en.wikipedia.org/wiki/Low-pass_filter (opens in a new tab) ↩︎ ↩︎
-
Z-transform. Wikipedia. Retrieved 5 September 2026. https://en.wikipedia.org/wiki/Z-transform (opens in a new tab) ↩︎ ↩︎
-
Comb filter. Wikipedia. Retrieved 5 September 2026. https://en.wikipedia.org/wiki/Comb_filter (opens in a new tab) ↩︎ ↩︎
-
All-pass filter. Wikipedia. Retrieved 5 September 2026. https://en.wikipedia.org/wiki/All-pass_filter (opens in a new tab) ↩︎ ↩︎