sfFDN
Loading...
Searching...
No Matches
sfFDN::CascadedBiquads Class Reference

Implements a cascade of biquad IIR filters. More...

#include <filter.h>

Inheritance diagram for sfFDN::CascadedBiquads:
[legend]
Collaboration diagram for sfFDN::CascadedBiquads:
[legend]

Classes

struct  IIRState
 Represents the internal state of the IIR filter. More...
 

Public Member Functions

 CascadedBiquads (const CascadedBiquadsOptions &config={})
 Constructs a cascaded biquad filter.
 
void SetCoefficients (std::span< const FilterCoefficients > coeffs)
 Sets the biquad coefficients for each stage.
 
float Tick (float in)
 Processes a single input sample through the filter.
 
void Process (const AudioBuffer &input, AudioBuffer &output) noexcept override
 Processes a block of input samples through the filter.
 
uint32_t InputChannelCount () const override
 Returns the number of input channels supported by this processor.
 
uint32_t OutputChannelCount () const override
 Returns the number of output channels produced by this processor.
 
void Clear () override
 Clears the internal state of the processor.
 
std::unique_ptr< AudioProcessorClone () const override
 Creates a copy of the filter.
 
- Public Member Functions inherited from sfFDN::AudioProcessor

Detailed Description

Implements a cascade of biquad IIR filters.


Class Documentation

◆ sfFDN::CascadedBiquads::IIRState

struct sfFDN::CascadedBiquads::IIRState

Represents the internal state of the IIR filter.

Class Members
float s0
float s1

Member Function Documentation

◆ Clear()

void sfFDN::CascadedBiquads::Clear ( )
overridevirtual

Clears the internal state of the processor.

This function resets the internal state of all biquad stages to zero.

Implements sfFDN::AudioProcessor.

◆ Clone()

std::unique_ptr< AudioProcessor > sfFDN::CascadedBiquads::Clone ( ) const
overridevirtual

Creates a copy of the filter.

Returns
A unique pointer to the cloned filter.

Implements sfFDN::AudioProcessor.

◆ InputChannelCount()

uint32_t sfFDN::CascadedBiquads::InputChannelCount ( ) const
overridevirtual

Returns the number of input channels supported by this processor.

Returns
The number of input channels.

Implements sfFDN::AudioProcessor.

◆ OutputChannelCount()

uint32_t sfFDN::CascadedBiquads::OutputChannelCount ( ) const
overridevirtual

Returns the number of output channels produced by this processor.

Returns
The number of output channels.

Implements sfFDN::AudioProcessor.

◆ Process()

void sfFDN::CascadedBiquads::Process ( const AudioBuffer & input,
AudioBuffer & output )
overridevirtualnoexcept

Processes a block of input samples through the filter.

Parameters
inputThe input audio buffer.
outputThe output audio buffer. The input and output buffers must have the same number of channels and sample count.

Implements sfFDN::AudioProcessor.

◆ SetCoefficients()

void sfFDN::CascadedBiquads::SetCoefficients ( std::span< const FilterCoefficients > coeffs)

Sets the biquad coefficients for each stage.

Parameters
coeffsA span of FilterCoefficients, one for each biquad stage.

◆ Tick()

float sfFDN::CascadedBiquads::Tick ( float in)

Processes a single input sample through the filter.

Parameters
inThe input sample.
Returns
The output sample.

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