Classic IIR Filter Bank — User Guide

Design and apply lowpass or highpass IIR filters using Bessel, Butterworth, or Chebyshev Type I prototypes. The audio renderer, response plots, and Z-plane diagram all use the same second-order-section (SOS) cascade.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.5.1 (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

The script builds a cascade of biquadratic IIR sections from one of three classical lowpass prototypes, optionally transforms it to highpass, and can then apply that exact cascade to the selected Sound. The same coefficients are used for the magnitude response, wrapped phase response, and Z-plane plot, so the visualization describes the filter that actually renders the audio.

Current filter bank: Bessel, Butterworth, and Chebyshev Type I. Earlier simplified Chebyshev-II and pseudo-Elliptic entries were removed because they did not implement the transmission zeros and rational approximations required by those filter families.

Quick start

  1. Select exactly one Sound object.
  2. Choose a preset, or leave Preset = Custom.
  3. Select Bessel, Butterworth, or Chebyshev I.
  4. Choose Lowpass or Highpass, then set the order and cutoff.
  5. For Chebyshev I, set Passband_ripple_db.
  6. Leave Plot_responses and Plot_zplane enabled if you want the diagnostic Picture page.
  7. With Apply_filter enabled, the filtered Sound is created and normalized to Scale_peak.
Cutoff meaning: Butterworth and the calibrated Bessel implementation place the requested cutoff at approximately −3.0103 dB. For Chebyshev I, the cutoff is the edge of the equiripple passband, not a −3 dB point.

Presets

Presets override the filter family, mode, order, and cutoff shown below. They do not change Scale_peak, plotting switches, Apply_filter, or playback.

PresetFilterModeOrderCutoff
CustomUses the values entered in the form.
Speech Lowpass (3.5 kHz)ButterworthLowpass43500 Hz
Music Lowpass (8 kHz)ButterworthLowpass48000 Hz
Rumble Filter (80 Hz HP)ButterworthHighpass480 Hz
Presence Reduction (2 kHz LP)ButterworthLowpass42000 Hz

Filter families

Bessel

Uses tabulated Bessel pole patterns that prioritize flat group delay and smooth transient behavior. The pole scale is calibrated separately for orders 2, 4, 6, and 8 so the requested cutoff is approximately −3.0103 dB.

Butterworth

Maximally flat magnitude response in the passband. For every supported order, the requested cutoff is the conventional approximately −3.0103 dB point.

Chebyshev Type I

Trades passband ripple for a steeper transition. Passband_ripple_db controls the ripple depth. Because each SOS is normalized to unity at DC (or Nyquist after the highpass transform), the implemented passband oscillates approximately from 0 to +Rp dB; the requested cutoff marks the ripple-band edge.

Bessel is not linear phase. It is an IIR family chosen for relatively flat group delay. The phase plot remains frequency-dependent.

Controls

ControlDefaultBehavior
PresetCustomSelects one of the fixed setups above or leaves the manual values unchanged.
Filter_typeButterworthBessel, Butterworth, or Chebyshev Type I.
Filter_modeLowpassLowpass or Highpass.
Order4Must be 2, 4, 6, or 8. Internally this creates order/2 SOS sections.
Cutoff_frequency1000 HzMust be below Nyquist. Butterworth/Bessel: approximately −3.0103 dB point. Chebyshev I: passband edge.
Passband_ripple_db0.5 dBUsed only by Chebyshev I.
Scale_peak0.95Target peak applied after filtering. This is normalization, not a ceiling or limiter.
Plot_responsesYesDraws magnitude and wrapped phase response from the designed SOS cascade.
Plot_zplaneYesDraws poles, zeros, and the unit circle from the same SOS coefficients.
Apply_filterYesCreates and processes a copy of the selected Sound. If disabled, the script can be used for plotting only.
Play_after_processingYesPlays the filtered output when one has been created.

Rendering & output

The filter is implemented as a cascade of second-order sections. Each channel is loaded directly from the Sound into a script vector, processed through the same SOS cascade with independent filter state, and written back with a compiled Formula pass.

Highpass mapping: v0.5.x designs the lowpass prototype at the complementary digital frequency before the z → −z reflection. The reflected transition therefore lands at the cutoff entered by the user instead of near Nyquist minus that value.

Visualization

If either plotting switch is enabled, the script creates an 8 × 8.7 inch Picture page with a title and summary strip. The page reports the selected filter family, LP/HP mode, order, cutoff, target peak, and sample rate.

Magnitude response

The red response is evaluated directly from the SOS coefficients at 512 frequency points from 0 Hz toward Nyquist. The panel uses a −80 to +10 dB display range, a dotted −3 dB reference, and a vertical line at the requested cutoff.

Phase response

The blue curve is the wrapped phase in degrees, displayed from −180° to +180°. Large wrap discontinuities are not connected. It should not be interpreted as an unwrapped phase or as proof of linear phase.

Z-plane

The unit circle is shown with zeros as green circles and poles as red X marks. Lowpass sections place their finite zeros at z = −1; after the highpass transform they move to z = +1. Stable filters have poles inside the unit circle.

The plots describe the designed SOS cascade whether or not Apply_filter is enabled. When audio is created, it uses those same coefficients.

Notes & limits