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

Implements a sparse FIR filter. More...

#include <filter.h>

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

Public Member Functions

 SparseFir (const SparseFirOptions &config={})
 Constructs a sparse FIR filter.
 
void SetCoefficients (const SparseFirOptions &config={})
 Sets the FIR coefficients.
 
float Tick (float in)
 Input a sample in the filter and return the next output.
 
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 sparse FIR filter.

Member Function Documentation

◆ Clear()

void sfFDN::SparseFir::Clear ( )
overridevirtual

Clears the internal state of the processor.

This function resets the internal state of the filter to zero.

Implements sfFDN::AudioProcessor.

◆ Clone()

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

Creates a copy of the filter.

Returns
A unique pointer to the cloned filter.

Implements sfFDN::AudioProcessor.

◆ InputChannelCount()

uint32_t sfFDN::SparseFir::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::SparseFir::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::SparseFir::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::SparseFir::SetCoefficients ( const SparseFirOptions & config = {})

Sets the FIR coefficients.

Parameters
configThe FIR coefficients.

◆ Tick()

float sfFDN::SparseFir::Tick ( float in)

Input a sample in the filter and return the next output.

Parameters
inThe input sample
Returns
The next output sample

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