sfFDN
Loading...
Searching...
No Matches
Filter Design

A collection of functions to design filters for feedback delay networks. More...

Functions

std::pair< float, float > sfFDN::DesignTwoBandAbsorption (const TwoBandFilterOptions &options)
 Get the coefficients of a one-pole absorption filter.
 
std::array< FilterCoefficients, 2 > sfFDN::DesignThreeBandAbsorption (const ThreeBandFilterOptions &options)
 Design a three-band absorption filter consisting of a low-shelf, high-shelf and a gain factor to match the desired T60 at DC, mid and Nyquist frequencies.
 
std::array< FilterCoefficients, 11 > sfFDN::DesignTenBandAbsorption (const TenBandFilterOptions &options)
 Design an attenuation filter according to the method described in [1].
 
std::array< FilterCoefficients, 11 > sfFDN::DesignGraphicEQ (const GraphicEQOptions &options)
 Design an octave EQ filter consisting of a low shelf, high shelf and 8 band-pass peaking filters.
 
std::unique_ptr< AudioProcessorsfFDN::CreateAttenuationFilter (const attenuation_filter_variant_t &options)
 Create an attenuation filter processor based on the provided configuration variant.
 
std::unique_ptr< AudioProcessorsfFDN::CreateAttenuationFilterBank (const AttenuationFilterBankOptions &options)
 Create a Attenuation Filter Bank object.
 
std::unique_ptr< AudioProcessorsfFDN::CreateAttenuationFilterBank (const attenuation_filter_variant_t &options, std::span< const float > delays)
 Creates an attenuation filter bank processor based on the provided configuration variant and delay values.
 

Detailed Description

A collection of functions to design filters for feedback delay networks.

Function Documentation

◆ CreateAttenuationFilter()

std::unique_ptr< AudioProcessor > sfFDN::CreateAttenuationFilter ( const attenuation_filter_variant_t & options)

Create an attenuation filter processor based on the provided configuration variant.

Parameters
optionsA variant containing the configuration for the attenuation filter design. The specific type of filter will be determined by the type of the variant.
Returns
A unique pointer to the created AttenuationFilter processor.

◆ CreateAttenuationFilterBank() [1/2]

std::unique_ptr< AudioProcessor > sfFDN::CreateAttenuationFilterBank ( const attenuation_filter_variant_t & options,
std::span< const float > delays )

Creates an attenuation filter bank processor based on the provided configuration variant and delay values.

Parameters
optionsA variant containing the configuration for the attenuation filter design. The specific filter type will be determined by the type of the variant.
delaysDelay in samples for each delay line preceding the filters
Returns
A unique pointer to the created FilterBank processor containing the attenuation filters.

◆ CreateAttenuationFilterBank() [2/2]

std::unique_ptr< AudioProcessor > sfFDN::CreateAttenuationFilterBank ( const AttenuationFilterBankOptions & options)

Create a Attenuation Filter Bank object.

Parameters
optionsThe configuration for each filter in the bank. Each filter can be of a different type, as specified by the attenuation_filter_variant_t variant.
Returns
std::unique_ptr<AudioProcessor>

◆ DesignGraphicEQ()

std::array< FilterCoefficients, 11 > sfFDN::DesignGraphicEQ ( const GraphicEQOptions & options)

Design an octave EQ filter consisting of a low shelf, high shelf and 8 band-pass peaking filters.

Parameters
optionsStructure containing the filter design parameters
Returns
Coefficients of the designed EQ filter where the first 6 floats are the coefficients (b0, b1, b2, a0, a1, a2) of the first filter, and the next 6 floats are the coefficients of the second filter, and so on.
Note
The implementation is based on the method described in [1] and uses the RBJ cookbook formulas for the low-shelf and high-shelf filters.
[1] V. Valimaki and J. Liski, "Accurate Cascade Graphic Equalizer," IEEE Signal Process. Lett., vol. 24, no. 2, pp. 176–180, Feb. 2017, doi: 10.1109/LSP.2016.2645280.
Original MATLAB implementation: https://github.com/KPrawda/Two_stage_filter/blob/main/aceq.m

◆ DesignTenBandAbsorption()

std::array< FilterCoefficients, 11 > sfFDN::DesignTenBandAbsorption ( const TenBandFilterOptions & options)

Design an attenuation filter according to the method described in [1].

Parameters
optionsStructure containing the filter design parameters
Returns
Coefficients of the designed EQ filter where the first 6 floats are the coefficients (b0, b1, b2, a0, a1, a2) of the first filter, and the next 6 floats are the coefficients of the second filter, and so on.
Note
[1] V. Välimäki, K. Prawda, and S. J. Schlecht, "Two-Stage Attenuation Filter for Artificial Reverberation," IEEE Signal Processing Letters, vol. 31, pp. 391–395, 2024, doi: 10.1109/LSP.2024.3352510.
Original MATLAB implementation: https://github.com/KPrawda/Two_stage_filter/blob/main/twoFilters.m

◆ DesignThreeBandAbsorption()

std::array< FilterCoefficients, 2 > sfFDN::DesignThreeBandAbsorption ( const ThreeBandFilterOptions & options)

Design a three-band absorption filter consisting of a low-shelf, high-shelf and a gain factor to match the desired T60 at DC, mid and Nyquist frequencies.

Parameters
optionsStructure containing the filter design parameters
Returns
std::array<FilterCoefficients, 2> Coefficients of the designed EQ filter.

◆ DesignTwoBandAbsorption()

std::pair< float, float > sfFDN::DesignTwoBandAbsorption ( const TwoBandFilterOptions & options)

Get the coefficients of a one-pole absorption filter.

Parameters
optionsStructure containing the filter design parameters
Returns
A pair of floats where the first element is the b coefficient and the second element is the a coefficient of the one-pole filter.
Note
Based on Jot, J. M., & Chaigne, A. (1991). Digital delay networks for designing artificial reverberators (pp. 1-12). Presented at the Proc. Audio Eng. Soc. Conv., Paris, France.