Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::IirDesign Struct Reference

Chebyshev / Elliptic IIR design utilities. More...

#include <iir_design.hpp>

Public Types

using Coefficients = FilterDesign::Coefficients

Static Public Member Functions

static std::vector< Coefficients > chebyshev1_lowpass (int order, float freq_hz, float ripple_db, float sample_rate)
 Chebyshev Type I lowpass cascade.
static std::vector< Coefficients > chebyshev1_highpass (int order, float freq_hz, float ripple_db, float sample_rate)
 Chebyshev Type I highpass cascade.
static std::vector< Coefficients > chebyshev2_lowpass (int order, float stop_freq_hz, float stop_atten_db, float sample_rate)
 Chebyshev Type II lowpass cascade.
static std::vector< Coefficients > chebyshev2_highpass (int order, float stop_freq_hz, float stop_atten_db, float sample_rate)
 Chebyshev Type II highpass cascade.
static std::vector< Coefficients > elliptic_lowpass (int order, float freq_hz, float passband_ripple_db, float stopband_attn_db, float sample_rate)
 Elliptic (Cauer) lowpass cascade — equiripple in both bands.
static std::vector< Coefficients > elliptic_highpass (int order, float freq_hz, float passband_ripple_db, float stopband_attn_db, float sample_rate)
 Elliptic highpass cascade.

Detailed Description

Chebyshev / Elliptic IIR design utilities.

RT contract: these helpers allocate vectors and perform expensive design math. Run them on prepare/control/offline threads, then publish immutable coefficient cascades to audio-thread processors.

// 4th-order Chebyshev Type I lowpass, 1 dB passband ripple, 2 kHz cutoff
auto cascade = IirDesign::chebyshev1_lowpass(4, 2000.0f, 1.0f, 44100.0f);
// -> cascade.size() == 2 biquad sections
// 4th-order Chebyshev Type II, 40 dB stopband, stop-freq 5 kHz
auto cheb2 = IirDesign::chebyshev2_lowpass(4, 5000.0f, 40.0f, 44100.0f);
// 6th-order Elliptic (Cauer) lowpass, 0.5 dB passband, 60 dB stopband
auto cauer = IirDesign::elliptic_lowpass(6, 2000.0f, 0.5f, 60.0f, 48000.0f);
static std::vector< Coefficients > chebyshev1_lowpass(int order, float freq_hz, float ripple_db, float sample_rate)
Chebyshev Type I lowpass cascade.
Definition iir_design.hpp:66
static std::vector< Coefficients > elliptic_lowpass(int order, float freq_hz, float passband_ripple_db, float stopband_attn_db, float sample_rate)
Elliptic (Cauer) lowpass cascade — equiripple in both bands.
Definition iir_design.hpp:123
static std::vector< Coefficients > chebyshev2_lowpass(int order, float stop_freq_hz, float stop_atten_db, float sample_rate)
Chebyshev Type II lowpass cascade.
Definition iir_design.hpp:87

Member Typedef Documentation

◆ Coefficients

Member Function Documentation

◆ chebyshev1_highpass()

std::vector< Coefficients > pulp::signal::IirDesign::chebyshev1_highpass ( int order,
float freq_hz,
float ripple_db,
float sample_rate )
inlinestatic

Chebyshev Type I highpass cascade.

◆ chebyshev1_lowpass()

std::vector< Coefficients > pulp::signal::IirDesign::chebyshev1_lowpass ( int order,
float freq_hz,
float ripple_db,
float sample_rate )
inlinestatic

Chebyshev Type I lowpass cascade.

Equiripple in passband, monotonic in stopband.

Parameters
orderFilter order (>= 2, even). Odd orders are rejected.
freq_hzPassband edge frequency (where ripple ends).
ripple_dbPassband ripple in dB (e.g. 0.5, 1.0, 3.0).
sample_rateSample rate in Hz.
Returns
order/2 biquad sections; empty if order < 2 or invalid input.

◆ chebyshev2_highpass()

std::vector< Coefficients > pulp::signal::IirDesign::chebyshev2_highpass ( int order,
float stop_freq_hz,
float stop_atten_db,
float sample_rate )
inlinestatic

Chebyshev Type II highpass cascade.

◆ chebyshev2_lowpass()

std::vector< Coefficients > pulp::signal::IirDesign::chebyshev2_lowpass ( int order,
float stop_freq_hz,
float stop_atten_db,
float sample_rate )
inlinestatic

Chebyshev Type II lowpass cascade.

Maximally flat in passband, equiripple in stopband.

Parameters
orderFilter order (>= 2, even).
stop_freq_hzStopband edge frequency (where attenuation reaches stop_atten_db).
stop_atten_dbStopband attenuation in dB (positive, e.g. 40).
sample_rateSample rate in Hz.

◆ elliptic_highpass()

std::vector< Coefficients > pulp::signal::IirDesign::elliptic_highpass ( int order,
float freq_hz,
float passband_ripple_db,
float stopband_attn_db,
float sample_rate )
inlinestatic

Elliptic highpass cascade.

◆ elliptic_lowpass()

std::vector< Coefficients > pulp::signal::IirDesign::elliptic_lowpass ( int order,
float freq_hz,
float passband_ripple_db,
float stopband_attn_db,
float sample_rate )
inlinestatic

Elliptic (Cauer) lowpass cascade — equiripple in both bands.

Parameters
orderFilter order (>= 2, even). Odd orders rejected.
freq_hzPassband edge (where ripple ends).
passband_ripple_dbPassband ripple in dB (positive, e.g. 0.5).
stopband_attn_dbMinimum stopband attenuation in dB (positive, e.g. 60).
sample_rateSample rate in Hz.
Returns
order/2 biquad sections; empty if inputs invalid.

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/iir_design.hpp