sfFDN
Loading...
Searching...
No Matches
Audio Processors Options

Structs for configuring audio processors used in the FDN. More...

Classes

struct  sfFDN::ScalarFeedbackMatrixOptions
 Options for configuring a scalar feedback matrix. More...
 
struct  sfFDN::CascadedFeedbackMatrixOptions
 Information structure for constructing a cascaded feedback matrix (also known as a filter feedback matrix). More...
 
struct  sfFDN::ModulationOptions
 Options for configuring signal modulation. More...
 
struct  sfFDN::ParallelGainsOptions
 Options for configuring parallel gain processing. More...
 
struct  sfFDN::DelayOptions
 Options for configuring delays. More...
 
struct  sfFDN::DelayBankOptions
 Options for configuring a delay bank. More...
 
struct  sfFDN::DelayBankTimeVaryingOptions
 Options for configuring a time-varying delay bank. More...
 
struct  sfFDN::FilterCoefficients
 Coefficients for a digital IIR filter. More...
 
struct  sfFDN::AllpassFilterOptions
 Options for configuring an allpass filter. More...
 
struct  sfFDN::SparseFirOptions
 Options for configuring a sparse FIR filter. More...
 
struct  sfFDN::CascadedBiquadsOptions
 Options for configuring cascaded biquad filters. More...
 
struct  sfFDN::FirOptions
 Options for configuring a FIR filter. More...
 
struct  sfFDN::SchroederAllpassSectionOptions
 Options for configuring a Schroeder allpass section consisting of N Schroeder allpass in series or in parallel. More...
 
struct  sfFDN::MultichannelSchroederAllpassSectionOptions
 Options for configuring a multichannel bank of Schroeder allpass sections. More...
 
struct  sfFDN::HomogenousFilterOptions
 Options for configuring a homogenous filter. More...
 
struct  sfFDN::TwoBandFilterOptions
 Options for configuring a two-band filter. More...
 
struct  sfFDN::ThreeBandFilterOptions
 Options for configuring a three-band filter. More...
 
struct  sfFDN::TenBandFilterOptions
 Options for configuring a ten-band filter. More...
 
struct  sfFDN::AttenuationFilterBankOptions
 Options for configuring an attenuation filter bank. More...
 
struct  sfFDN::GraphicEQOptions
 Options for configuring a graphic equalizer. More...
 

Typedefs

using sfFDN::attenuation_filter_variant_t
 Variant type for holding different attenuation filter options.
 
using sfFDN::feedback_matrix_variant_t = std::variant<CascadedFeedbackMatrixOptions, ScalarFeedbackMatrixOptions>
 Variant type for holding different feedback matrix options.
 
using sfFDN::single_channel_processor_variant_t
 Variant type for holding different single-channel processor options.
 
using sfFDN::multi_channel_processor_variant_t
 Variant type for holding different multi-channel processor options.
 

Enumerations

enum class  sfFDN::ScalarMatrixType : uint8_t {
  ScalarMatrixType::Identity = 0 , ScalarMatrixType::Random = 1 , ScalarMatrixType::Householder = 2 , ScalarMatrixType::RandomHouseholder = 3 ,
  ScalarMatrixType::Hadamard = 4 , ScalarMatrixType::Circulant = 5 , ScalarMatrixType::Allpass = 6 , ScalarMatrixType::NestedAllpass = 7 ,
  ScalarMatrixType::VariableDiffusion = 8 , Count = 9
}
 Represents the type of a scalar matrix. More...
 
enum class  sfFDN::DelayInterpolationType : uint8_t {
  DelayInterpolationType::None = 0 , DelayInterpolationType::Linear = 1 , DelayInterpolationType::Allpass = 2 , Lagrange = 3 ,
  Count = 4
}
 Types of interpolation for fractional delay lengths. More...
 
enum class  sfFDN::DelayLengthType : uint8_t {
  DelayLengthType::Random = 0 , DelayLengthType::Gaussian = 1 , DelayLengthType::Primes = 2 , DelayLengthType::Uniform = 3 ,
  DelayLengthType::PrimePower = 4 , DelayLengthType::SteamAudio = 5 , Count = 6
}
 Types of delay length distributions. More...
 
enum class  sfFDN::ParallelGainsMode : uint8_t { ParallelGainsMode::Split , ParallelGainsMode::Merge , ParallelGainsMode::Parallel }
 Enumeration for parallel gain processing modes. More...
 

Detailed Description

Structs for configuring audio processors used in the FDN.


Class Documentation

◆ sfFDN::ScalarFeedbackMatrixOptions

struct sfFDN::ScalarFeedbackMatrixOptions

Options for configuring a scalar feedback matrix.

Can be use to construct a ScalarFeedbackMatrix.

Class Members
optional< float > arg {std::nullopt} Optional argument for certain matrix types. For example, for the VariableDiffusion type, this could represent.
optional< vector< float > > custom_matrix {std::nullopt} Optional custom matrix values in col-major order. The size of the vector must be equal to matrix_size*matrix_size. If this is set, type is ignored.
uint32_t matrix_size Size of the feedback matrix.
uint32_t rng_seed {0} Optional. Seed for random number generation when type is Random or RandomHouseholder.
ScalarMatrixType type {ScalarMatrixType::Random} Type of the feedback matrix.

◆ sfFDN::CascadedFeedbackMatrixOptions

struct sfFDN::CascadedFeedbackMatrixOptions

Information structure for constructing a cascaded feedback matrix (also known as a filter feedback matrix).

A cascaded feedback matrix is composed of multiple stages, where each stage consists of a scalar feedback matrix followed by a bank of delay lines.

Can be used to construct a FilterFeedbackMatrix.

Class Members
float gain_per_samples {1.f} Gain per sample.
uint32_t matrix_size Size of the feedback matrix.
float sparsity {1.f} Sparsity level (>= 1).

A value of 1 corresponds to a fully dense matrix, while higher values correspond to sparser matrices.

uint32_t stage_count Number of stages.
ScalarMatrixType type Type of the feedback matrix.

The same type is used for all stages.

◆ sfFDN::ModulationOptions

struct sfFDN::ModulationOptions

Options for configuring signal modulation.

Class Members
float amplitude {0.f}
float frequency {0.f}
float initial_phase {0.f}

◆ sfFDN::ParallelGainsOptions

struct sfFDN::ParallelGainsOptions

Options for configuring parallel gain processing.

Class Members
vector< float > gains Gain values for each channel.

The size of the vector determines the number of channels.

ParallelGainsMode mode {ParallelGainsMode::Split} Mode of parallel gain processing.
vector< ModulationOptions > time_varying_config {} Optional time-varying modulation configuration for each channel.

The size of the vector must match the size of gains if provided.

◆ sfFDN::DelayOptions

struct sfFDN::DelayOptions

Options for configuring delays.

Class Members
float delay {256.f}
DelayInterpolationType interp_type
optional< ModulationOptions > lfo_config
uint32_t max_delay {512}

◆ sfFDN::DelayBankOptions

struct sfFDN::DelayBankOptions

Options for configuring a delay bank.

Class Members
uint32_t block_size {kDefaultBlockSize}
vector< float > delays
DelayInterpolationType interpolation_type

◆ sfFDN::DelayBankTimeVaryingOptions

struct sfFDN::DelayBankTimeVaryingOptions

Options for configuring a time-varying delay bank.

Class Members
vector< float > delays
DelayInterpolationType interpolation_type
uint32_t max_delay
vector< ModulationOptions > time_varying_config

◆ sfFDN::AllpassFilterOptions

struct sfFDN::AllpassFilterOptions

Options for configuring an allpass filter.

Class Members
float coeff {0.f} The coefficient for the allpass filter.

◆ sfFDN::SparseFirOptions

struct sfFDN::SparseFirOptions

Options for configuring a sparse FIR filter.

Class Members
vector< pair< uint32_t, float > > coeffs

◆ sfFDN::CascadedBiquadsOptions

struct sfFDN::CascadedBiquadsOptions

Options for configuring cascaded biquad filters.

Class Members
vector< FilterCoefficients > coeffs

◆ sfFDN::FirOptions

struct sfFDN::FirOptions

Options for configuring a FIR filter.

Class Members
vector< float > coeffs {1.f}

◆ sfFDN::SchroederAllpassSectionOptions

struct sfFDN::SchroederAllpassSectionOptions

Options for configuring a Schroeder allpass section consisting of N Schroeder allpass in series or in parallel.

Class Members
vector< float > delays
vector< float > gains
bool parallel {false}

◆ sfFDN::MultichannelSchroederAllpassSectionOptions

struct sfFDN::MultichannelSchroederAllpassSectionOptions

Options for configuring a multichannel bank of Schroeder allpass sections.

Each section processes one channel of audio.

Class Members
vector< SchroederAllpassSectionOptions > sections

◆ sfFDN::HomogenousFilterOptions

struct sfFDN::HomogenousFilterOptions

Options for configuring a homogenous filter.

The homogenous filter has the same attenuation characteristics across all frequencies.

Class Members
float delay
float sample_rate = kDefaultSampleRate
float t60 = 1.f

◆ sfFDN::TwoBandFilterOptions

struct sfFDN::TwoBandFilterOptions

Options for configuring a two-band filter.

The two-band filter allows for specifying a target t60 at DC and Nyquist. The filter is implemented as a one-pole filter based on [1].

[1] 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.

Class Members
float delay
float sample_rate = kDefaultSampleRate
array< float, 2 > t60s {1.f, 0.5f} Target T60 values for the low and high bands.

◆ sfFDN::ThreeBandFilterOptions

struct sfFDN::ThreeBandFilterOptions

Options for configuring a three-band filter.

The three-band filter is composed of a 2nd order low shelf and a 2nd order high shelf filter in series and allows control of the T60 over three bands with the first band being [0, freq[0]], the second band [freq[0], freq[1]], and the third band [freq[1], Nyquist].

Class Members
float delay
array< float, 2 > freqs {800.f, 8000.f}
float q = 1.f / std::numbers::sqrt2_v<float>
float sample_rate = kDefaultSampleRate
array< float, 3 > t60s {1.f, 0.5f, 0.25f}

◆ sfFDN::TenBandFilterOptions

struct sfFDN::TenBandFilterOptions

Options for configuring a ten-band filter.

The ten-band filter allows control of the T60 over ten bands. The bands of the filter are set to {32, 64, 125, 250, 500, 1k, 2k, 4k, 8k, 16k} Hz.

The filter is implemented as a cascade of second-order biquad filters following the design method described in [1]. [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.

Class Members
float delay Delay in samples for the delay line preceding the filter. If set to <= 0, it will be updated automatically when accessed from CreateFDNFromConfig()
float sample_rate = kDefaultSampleRate Sample rate in Hz. This is used to calculate the filter coefficients based on the specified T60 values.
float shelf_cutoff = 8000.f Cutoff frequency for the shelf filters.
array< float, 10 > t60s = {1.f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.1f} Target T60 values for the ten bands.

◆ sfFDN::AttenuationFilterBankOptions

struct sfFDN::AttenuationFilterBankOptions

Options for configuring an attenuation filter bank.

Class Members
vector< attenuation_filter_variant_t > filter_configs Vector of attenuation filter configurations.

◆ sfFDN::GraphicEQOptions

struct sfFDN::GraphicEQOptions

Options for configuring a graphic equalizer.

Class Members
array< float, 10 > freqs Frequency values for the ten bands in Hz.
array< float, 10 > gains_db Target gains for the ten bands in dB.
float sample_rate = kDefaultSampleRate Sample rate in Hz.

Typedef Documentation

◆ attenuation_filter_variant_t

Initial value:
std::variant<HomogenousFilterOptions, TwoBandFilterOptions, ThreeBandFilterOptions, TenBandFilterOptions>

Variant type for holding different attenuation filter options.

◆ multi_channel_processor_variant_t

Initial value:
std::variant<ParallelGainsOptions, MultichannelSchroederAllpassSectionOptions, AttenuationFilterBankOptions,
DelayBankOptions, DelayBankTimeVaryingOptions, CascadedFeedbackMatrixOptions,
ScalarFeedbackMatrixOptions>

Variant type for holding different multi-channel processor options.

◆ single_channel_processor_variant_t

Initial value:
std::variant<SchroederAllpassSectionOptions, AllpassFilterOptions, CascadedBiquadsOptions, FirOptions, DelayOptions,
GraphicEQOptions>

Variant type for holding different single-channel processor options.

Enumeration Type Documentation

◆ DelayInterpolationType

enum class sfFDN::DelayInterpolationType : uint8_t
strong

Types of interpolation for fractional delay lengths.

Enumerator
None 

No interpolation. The delay length will be rounded to the nearest integer value.

Linear 

Linear interpolation.

Allpass 

Allpass interpolation.

◆ DelayLengthType

enum class sfFDN::DelayLengthType : uint8_t
strong

Types of delay length distributions.

Enumerator
Random 

Delay lengths are generated randomly within the specified range based on a uniform distribution.

Gaussian 

Delay lengths are generated based on a Gaussian distribution within the specified range.

Primes 

Delay lengths are selected randomly from a list of prime numbers within the specified range.

Uniform 

Delay lengths are uniformly distributed within the specified range.

PrimePower 

Delay lengths are generated as powers of prime numbers within the specified range. Based on https://ccrma.stanford.edu/~jos/pasp/Prime_Power_Delay_Line_Lengths.html.

SteamAudio 

Delay lengths are generated using the algorithm from the SteamAudio library.

◆ ParallelGainsMode

enum class sfFDN::ParallelGainsMode : uint8_t
strong

Enumeration for parallel gain processing modes.

Enumerator
Split 

Process input as a single channel and output to multiple channels.

Merge 

Process each input channel separately and output to one channel.

Parallel 

Process each input channel separately and output to the same number of channels.

◆ ScalarMatrixType

enum class sfFDN::ScalarMatrixType : uint8_t
strong

Represents the type of a scalar matrix.

[1] D. Rocchesso and J. O. Smith, “Circulant and elliptic feedback delay networks for artificial reverberation,” IEEE Transactions on Speech and Audio Processing, vol. 5, no. 1, pp. 51–63, Jan. 1997, doi: 10.1109/89.554269.
[2] S. J. Schlecht, “FDNTB: the feedback delay network toolbox,” 23rd International Conference on Digital Audio Effects (DAFx2020), 2020.
[3] O. Das, E. K. Canfield-Dafilou, and J. S. Abel, “On The Behavior of Delay Network Reverberator Modes,” in 2019 IEEE Workshop on Applications of Signal Processing to Audio and Acoustics (WASPAA), Oct. 2019, pp. 50–54. doi: 10.1109/WASPAA.2019.8937260.

Enumerator
Identity 

Identity matrix.

Random 

Random orthogonal matrix.

Householder 

Householder matrix.

RandomHouseholder 

Random Householder matrix.

Hadamard 

Hadamard matrix.

Circulant 

Circulant matrix as described in [1].

Allpass 

Allpass matrix.

See [2]

NestedAllpass 

Nested Allpass matrix.

See [2]

VariableDiffusion 

Variable diffusion matrix as described in [3].