![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Signal Modifiers · Generated namespace reference Type I and Type II Chebyshev filters. Select Type I or Type II with Type I allows ripple in the passband for a sharper transition. Its edge is specified at the passband ripple limit, and the default ripple is 1 dB. Type II keeps the passband monotonic and allows ripple in the stopband. Its edge is specified at the stopband attenuation limit, and the default attenuation is 40 dB. Declare Declare Repeated settings preserve the filter history and reuse the coefficients. Chebyshev
klang::Filters::ChebyshevChebyshev<1> or Chebyshev<2>. Both use a second-order prototype. Each provides LPF, HPF, BPF, and BRF. The band responses are fourth order.Example · Type I low-pass
Chebyshev<1>::LPF filter;. Pass the passband edge in Hz and optionally the ripple as dB(1).in >> filter(1200, dB(1)) >> out;Example · Type II band-reject
Chebyshev<2>::BRF notch;. Pass the lower and upper stopband edges in Hz and optionally the minimum attenuation as dB(40).in >> notch(45, 55, dB(40)) >> out;reset() clears the history and keeps the configuration.