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

A section of Schroeder allpass filters in series. More...

#include <schroeder_allpass.h>

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

Public Member Functions

 SchroederAllpassSection ()=default
 Constructs an empty SchroederAllpassSection.
 
 SchroederAllpassSection (const SchroederAllpassSectionOptions &config)
 Constructs a SchroederAllpassSection with a given configuration.
 
 SchroederAllpassSection (uint32_t filter_count)
 Constructs a SchroederAllpassSection with a given number of filters.
 
 SchroederAllpassSection (const SchroederAllpassSection &)=delete
 
SchroederAllpassSectionoperator= (const SchroederAllpassSection &)=delete
 
 SchroederAllpassSection (SchroederAllpassSection &&) noexcept
 Move constructor for the SchroederAllpassSection.
 
SchroederAllpassSectionoperator= (SchroederAllpassSection &&) noexcept
 Move assignment operator for the SchroederAllpassSection.
 
void SetFilterCount (uint32_t filter_count)
 Sets the number of allpass filters in the section.
 
void SetParallel (bool parallel)
 Sets whether the allpass filters in the section are processed in parallel.
 
void SetDelays (std::span< const uint32_t > delays)
 Sets the delays for each allpass filter in the section.
 
void SetGains (std::span< const float > gains)
 Sets the feedback gains for each allpass filter in the section.
 
void SetGain (float gain)
 Sets the feedback gain for all allpass filters in the section.
 
std::vector< uint32_t > GetDelays () const
 Gets the current delays for each allpass filter in the section.
 
std::vector< float > GetGains () const
 Gets the current feedback gains for each allpass filter in the section.
 
void Process (const AudioBuffer &input, AudioBuffer &output) noexcept override
 Processes a block of audio through the section.
 
uint32_t InputChannelCount () const override
 Gets the number of input channels supported.
 
uint32_t OutputChannelCount () const override
 Gets the number of output channels supported.
 
void Clear () override
 Clears the internal state of the processor.
 
std::unique_ptr< AudioProcessorClone () const override
 Creates a copy of the SchroederAllpassSection.
 
- Public Member Functions inherited from sfFDN::AudioProcessor

Detailed Description

A section of Schroeder allpass filters in series.

Constructor & Destructor Documentation

◆ SchroederAllpassSection() [1/2]

sfFDN::SchroederAllpassSection::SchroederAllpassSection ( const SchroederAllpassSectionOptions & config)

Constructs a SchroederAllpassSection with a given configuration.

Parameters
configThe configuration for the SchroederAllpassSection.

◆ SchroederAllpassSection() [2/2]

sfFDN::SchroederAllpassSection::SchroederAllpassSection ( uint32_t filter_count)

Constructs a SchroederAllpassSection with a given number of filters.

Parameters
filter_countThe number of allpass filters in the section.

Member Function Documentation

◆ Clear()

void sfFDN::SchroederAllpassSection::Clear ( )
overridevirtual

Clears the internal state of the processor.

This function resets the internal state of all allpass filters in the section.

Implements sfFDN::AudioProcessor.

◆ Clone()

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

Creates a copy of the SchroederAllpassSection.

Returns
A unique pointer to the cloned SchroederAllpassSection.

Implements sfFDN::AudioProcessor.

◆ InputChannelCount()

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

Gets the number of input channels supported.

This is always 1, as SchroederAllpassSection processes one channel at a time.

Implements sfFDN::AudioProcessor.

◆ operator=()

SchroederAllpassSection & sfFDN::SchroederAllpassSection::operator= ( SchroederAllpassSection && )
noexcept

Move assignment operator for the SchroederAllpassSection.

Returns
A reference to the assigned SchroederAllpassSection.

◆ OutputChannelCount()

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

Gets the number of output channels supported.

This is always 1, as SchroederAllpassSection processes one channel at a time.

Implements sfFDN::AudioProcessor.

◆ Process()

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

Processes a block of audio through the section.

Parameters
inputThe input audio buffer.
outputThe output audio buffer. The input and output buffers must have the same number of samples and channels equal to 1.

Implements sfFDN::AudioProcessor.

◆ SetDelays()

void sfFDN::SchroederAllpassSection::SetDelays ( std::span< const uint32_t > delays)

Sets the delays for each allpass filter in the section.

Parameters
delaysA span of delay values in samples. The size of the span must be equal to the number of filters in the section.

◆ SetFilterCount()

void sfFDN::SchroederAllpassSection::SetFilterCount ( uint32_t filter_count)

Sets the number of allpass filters in the section.

Parameters
filter_countThe number of allpass filters.

◆ SetGain()

void sfFDN::SchroederAllpassSection::SetGain ( float gain)

Sets the feedback gain for all allpass filters in the section.

Parameters
gainThe feedback gain value.

◆ SetGains()

void sfFDN::SchroederAllpassSection::SetGains ( std::span< const float > gains)

Sets the feedback gains for each allpass filter in the section.

Parameters
gainsA span of feedback gain values. The size of the span must be equal to the number of filters in the section.

◆ SetParallel()

void sfFDN::SchroederAllpassSection::SetParallel ( bool parallel)

Sets whether the allpass filters in the section are processed in parallel.

Parameters
parallelWhether to process the filters in parallel.

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