one pole filter coefficient calculator
One-Pole Filter Coefficient Calculator guide
A one-pole smoother can tame a rapidly changing parameter or filter an audio stream. Enter the actual update rate and the frequency where the magnitude should fall to 1/√2 of its value at DC. Copy the input coefficient and the previous-output coefficient together. They sum to one for unity DC gain.
Play the instrument ↑- Default result
- 0.122530587711 input coefficient
Calculation and units
The recurrence is y[n] = αx[n] + (1 − α)y[n−1]. With s = sin(πfc/fs), solving the digital magnitude equation gives α = 2s/(√(1+s²)+s). This form avoids subtracting two nearly equal numbers at low cutoff. The calculation places the specified digital corner directly; exponential time-constant matching answers a related but different design question.
Worked examples
Select a named case in the Worked example control to load these values. You can then edit any input to compare the result.
One kilohertz at 48 kHz
Digital cutoff (Hz) = 1000 · Sample rate (Hz) = 48000.
0.122530587711 input coefficient. Previous-output coefficient 0.877469412289. Use y[n] = α x[n] + (1 − α) y[n−1]. At 1000 Hz the steady-state magnitude is 1/√2 of DC.
Use this pair as a starting point for a low-pass section in an audio callback. The two stored multipliers add to one.
Higher sample rate
Digital cutoff (Hz) = 1000 · Sample rate (Hz) = 96000.
0.063332106547 input coefficient. Previous-output coefficient 0.936667893453. Use y[n] = α x[n] + (1 − α) y[n−1]. At 1000 Hz the steady-state magnitude is 1/√2 of DC.
The same cutoff needs a smaller contribution per input sample when updates arrive twice as often.
Slow control smoother
Digital cutoff (Hz) = 5 · Sample rate (Hz) = 1000.
0.030925070057 input coefficient. Previous-output coefficient 0.969074929943. Use y[n] = α x[n] + (1 − α) y[n−1]. At 5 Hz the steady-state magnitude is 1/√2 of DC.
A control stream has its own update rate. Using the audio hardware rate here would set the wrong response.
Quarter of the sample rate
Digital cutoff (Hz) = 12000 · Sample rate (Hz) = 48000.
0.732050807569 input coefficient. Previous-output coefficient 0.267949192431. Use y[n] = α x[n] + (1 − α) y[n−1]. At 12000 Hz the steady-state magnitude is 1/√2 of DC.
Digital correction matters far from DC. Compare this case with a matched continuous-time pole approximation.
Approaching Nyquist
Digital cutoff (Hz) = 23000 · Sample rate (Hz) = 48000.
0.827906546067 input coefficient. Previous-output coefficient 0.172093453933. Use y[n] = α x[n] + (1 − α) y[n−1]. At 23000 Hz the steady-state magnitude is 1/√2 of DC.
The target is still inside the periodic digital spectrum. The feedforward coefficient remains less than one.
Very low corner
Digital cutoff (Hz) = 0.2 · Sample rate (Hz) = 48000.
0.000026179596 input coefficient. Previous-output coefficient 0.999973820404. Use y[n] = α x[n] + (1 − α) y[n−1]. At 0.2 Hz the steady-state magnitude is 1/√2 of DC.
A small coefficient gives the filter long memory. Retain enough precision in the accumulator and coefficients.
Interpreting the result
Keep filter state from one sample or processing block to the next. Resetting the state repeatedly creates a transient that can be mistaken for a frequency-response error. For a simple check, apply a constant input for long enough that the output approaches it, then test a sustained sinusoid at the requested corner.
Keep the coefficients next to the design sample rate in your preset or session notes. A low-pass smoother may appear to work after moving a project to a higher rate while responding twice as fast. Checking the cutoff with a sinusoid at the original frequency helps reveal that mismatch.
Measurement and model limits
If your input is the elapsed time to reach a target rather than a measured cutoff frequency, a time-domain envelope formula is the more direct specification. Specify the design target when saving coefficients.
Answers before you play
Common questions
Which coefficient multiplies the input?
Use the displayed α for the current input. Its complement multiplies the previous output; code libraries sometimes give that complement the name alpha instead.
What happens at half the sample rate?
Nyquist is the endpoint of the digital spectrum. This tool requires the design frequency strictly below that endpoint.
Can I use the audio sample rate for automation updates?
Use the cadence at which this recurrence actually runs. A control loop that runs once per block updates more slowly than the audio stream.
Will zero initial state work?
Yes, with an initial transient. For parameter smoothing you may prefer initializing the state to the first input value.