Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::HalfBandAllpassSectionT< SampleType > Class Template Reference

One single-coefficient allpass section run at the sub-rate. More...

#include <halfband_iir.hpp>

Public Member Functions

 HalfBandAllpassSectionT ()=default
 HalfBandAllpassSectionT (SampleType a)
void set_coefficient (SampleType a)
SampleType coefficient () const
void reset ()
SampleType process (SampleType x)
 Process one sample. Returns y[n].

Detailed Description

template<typename SampleType = float>
class pulp::signal::HalfBandAllpassSectionT< SampleType >

One single-coefficient allpass section run at the sub-rate.

Transfer function at the rate this section is clocked at: H(z) = (a + z^-1) / (1 + a * z^-1)

Difference equation: y[n] = a * (x[n] - y[n-1]) + x[n-1]

Each path of the polyphase half-band filter runs at HALF the final sample rate, so this z^-1 delay corresponds to z^-2 at the full (upsampled or pre-decimation) rate — exactly what the classical half-band decomposition H(z) = 1/2 * (A0(z^2) + z^-1 * A1(z^2)) asks for.

Stable for |a| < 1.

RT contract: setters, queries, process(), and reset() are fixed-state and allocate no memory.

A bare building block: fed silence it settles into a subnormal limit cycle rather than decaying to zero, like any allpass recurrence in floating point. Filtering code should use HalfBandIirStageT (or the 2x classes built on it), which flushes that state.

Constructor & Destructor Documentation

◆ HalfBandAllpassSectionT() [1/2]

template<typename SampleType = float>
pulp::signal::HalfBandAllpassSectionT< SampleType >::HalfBandAllpassSectionT ( )
default

◆ HalfBandAllpassSectionT() [2/2]

template<typename SampleType = float>
pulp::signal::HalfBandAllpassSectionT< SampleType >::HalfBandAllpassSectionT ( SampleType a)
inlineexplicit

Member Function Documentation

◆ coefficient()

template<typename SampleType = float>
SampleType pulp::signal::HalfBandAllpassSectionT< SampleType >::coefficient ( ) const
inline

◆ process()

template<typename SampleType = float>
SampleType pulp::signal::HalfBandAllpassSectionT< SampleType >::process ( SampleType x)
inline

Process one sample. Returns y[n].

◆ reset()

template<typename SampleType = float>
void pulp::signal::HalfBandAllpassSectionT< SampleType >::reset ( )
inline

◆ set_coefficient()

template<typename SampleType = float>
void pulp::signal::HalfBandAllpassSectionT< SampleType >::set_coefficient ( SampleType a)
inline

The documentation for this class was generated from the following file: