Digital filter designer
Design FIR (windowed sinc, Parks–McClellan, frequency sampling) and IIR (Butterworth, Chebyshev I/II, elliptic) low-, high-, band-pass and band-stop filters for a sample rate, with the order estimated from your ripple and attenuation; see magnitude, phase, group delay, poles and zeros, impulse and step; round the coefficients to Q15/Q31 to see what breaks; export C, CMSIS-DSP and scipy code; and listen to it running on noise, a sweep, your microphone or a file.
Added
How to use it
Set the sample rate, the kind of filter and its edges, and either let the tool estimate the order from the passband ripple and stopband attenuation you need, or give the order yourself. The designs follow scipy.signal’s conventions, so the Python export rebuilds exactly the same filter — the tests compare every method against values from scipy.
How to use it
-
Response and method. IIR filters (Butterworth, Chebyshev I and II, elliptic) are designed as analogue prototypes, moved to the band you want, and mapped to the z-plane with the bilinear transform, prewarped so the edges land where you asked. They come out as a cascade of second-order sections (biquads), paired the way scipy pairs them — the numerically safe way to run them. FIR filters have linear phase and a fixed delay of (N−1)/2 samples:
-
Windowed sinc — the ideal response cut short by a window. The window decides the stopband floor (Hamming ≈ 53 dB, Blackman ≈ 74 dB); Kaiser lets you choose it with β, and its length comes from Kaiser’s formula.
-
Parks–McClellan — the equiripple optimum: the shortest filter for the ripples you allow, the ripple weighted between the bands. Its length starts from Kaiser’s estimate and is lengthened until the measured response meets the spec.
-
Frequency sampling — the response drawn through points with a linear transition, inverse transformed and windowed.
-
-
Edges. For IIR filters the cut-off means what scipy means by
Wn: −3 dB for Butterworth, the edge of the ripple band for Chebyshev I and elliptic, the start of the stopband for Chebyshev II. With estimate the order the transition width puts the other edge, and the order comes from scipy’sbuttord/cheb1ord/cheb2ord/ellipordformulas. For FIR filters the cut-off is the middle of the transition band. -
Plots. Magnitude in dB or linear (linear or log frequency), unwrapped phase, group delay in samples, the pole–zero diagram on the z-plane, and the impulse and step responses. The result panel measures the real passband ripple, stopband attenuation and −3 dB points, and checks the poles for stability.
-
Fixed point. Q15 or Q31 rounds the coefficients (with a postShift when a coefficient is 1 or more, as a biquad’s a₁ usually is) and overlays the rounded filter on every plot. Narrow low-pass filters at a high sample rate are where 16 bits fall apart: watch the poles move and the stopband rise. Only the coefficients are rounded — a real fixed-point filter also rounds its arithmetic.
-
Export. C arrays (float, plus the integer arrays when fixed point is on) with a small direct-form II transposed routine; CMSIS-DSP arrays for
arm_biquad_cascade_df1_f32/q15/q31(a₁ and a₂ negated, the q15 layout with its zero pad, the postShift) orarm_fir_*(taps time-reversed); Python that calls scipy and also holds the coefficients; or CSV. -
Listen. Play white or pink noise, a log sweep, a square wave, a mix of tones, your microphone or an audio file through the filter, switch it off and on to compare, and watch the live spectrum against the design. The audio runs at the filter’s sample rate when the browser allows it (Chrome and Firefox accept most rates from 8 kHz to 96 kHz; otherwise the tool says how far the frequencies shift). IIR filters run as Web Audio IIR filter nodes, one per biquad; FIR filters as a convolver.
For analogue op-amp filters see the active filter designer; to look at real signals, the spectrum analyser and the audio oscilloscope. The synthesizer has the musical kind of filter.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.