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

A single Schroeder allpass filter. More...

#include <schroeder_allpass.h>

Public Member Functions

 SchroederAllpass ()=default
 Constructs a SchroederAllpass filter.
 
 SchroederAllpass (uint32_t delay, float g)
 Constructs a SchroederAllpass filter.
 
 SchroederAllpass (const SchroederAllpass &)=delete
 
SchroederAllpassoperator= (const SchroederAllpass &)=delete
 
 SchroederAllpass (SchroederAllpass &&)=default
 Move constructor for the SchroederAllpass filter.
 
SchroederAllpassoperator= (SchroederAllpass &&)=default
 Move assignment operator for the SchroederAllpass filter.
 
void SetDelay (uint32_t delay)
 Sets the delay in samples.
 
void SetG (float g)
 Sets the feedback gain.
 
uint32_t GetDelay () const
 Gets the current delay in samples.
 
float GetG () const
 Gets the filter gain.
 
float Tick (float input)
 Processes a single sample through the filter.
 
void ProcessBlock (std::span< const float > in, std::span< float > out)
 Processes a block of samples through the filter.
 
void ProcessBlockAccumulate (std::span< const float > in, std::span< float > out)
 Processes a block of samples through the filter and accumulates the output.
 
void Clear ()
 Clears the filter state.
 

Detailed Description

A single Schroeder allpass filter.

The allpass filter is implemented by cascading a feedback comb filter and a feedforward comb filter.

Constructor & Destructor Documentation

◆ SchroederAllpass()

sfFDN::SchroederAllpass::SchroederAllpass ( uint32_t delay,
float g )

Constructs a SchroederAllpass filter.

Parameters
delayThe delay in samples.
gThe feedback gain.

Member Function Documentation

◆ Clear()

void sfFDN::SchroederAllpass::Clear ( )

Clears the filter state.

This sets the internal delay buffer to zero.

◆ operator=()

SchroederAllpass & sfFDN::SchroederAllpass::operator= ( SchroederAllpass && )
default

Move assignment operator for the SchroederAllpass filter.

Returns
A reference to the assigned SchroederAllpass filter.

◆ ProcessBlock()

void sfFDN::SchroederAllpass::ProcessBlock ( std::span< const float > in,
std::span< float > out )

Processes a block of samples through the filter.

Parameters
inThe input samples.
outThe output samples. The input and output spans must have the same size.

◆ ProcessBlockAccumulate()

void sfFDN::SchroederAllpass::ProcessBlockAccumulate ( std::span< const float > in,
std::span< float > out )

Processes a block of samples through the filter and accumulates the output.

Parameters
inThe input samples.
outThe output samples. The input and output spans must have the same size.

◆ SetDelay()

void sfFDN::SchroederAllpass::SetDelay ( uint32_t delay)

Sets the delay in samples.

Parameters
delayThe delay in samples.

◆ SetG()

void sfFDN::SchroederAllpass::SetG ( float g)

Sets the feedback gain.

Parameters
gThe feedback gain.

◆ Tick()

float sfFDN::SchroederAllpass::Tick ( float input)

Processes a single sample through the filter.

Parameters
inputThe input sample.
Returns
The output sample.

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