LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
BiquadBank Class Reference

Multiple biquad filters in parallel, each multiplied with a gain value, and finally all added together. This class can be used to create a graphic equalizer. More...

#include <lasp_biquadbank.h>

Inheritance diagram for BiquadBank:
Collaboration diagram for BiquadBank:

Public Member Functions

 BiquadBank (const dmat &filters, const vd *gains=nullptr)
 Initialize biquadbank.
 
 BiquadBank (std::vector< SeriesBiquad > filters, vd gains)
 Construct biquad bank from already given set of series biquad filters and gain values.
 
void setGains (const vd &gains)
 Set new gain values for each filter in the BiquadBank.
 
us nfilters () const
 Returns the number of Filters.
 
virtual void filter (vd &inout) override final
 Filter input, and provides output in same array as input.
 
void reset () override final
 Reset filter state to 0 (history was all-zero).
 
std::unique_ptr< Filterclone () const override final
 Clone a filter, to generate a copy.
 
- Public Member Functions inherited from Filter
virtual ~Filter ()=0
 

Detailed Description

Multiple biquad filters in parallel, each multiplied with a gain value, and finally all added together. This class can be used to create a graphic equalizer.

Definition at line 61 of file lasp_biquadbank.h.

Constructor & Destructor Documentation

◆ BiquadBank() [1/2]

BiquadBank::BiquadBank ( const dmat filters,
const vd gains = nullptr 
)

Initialize biquadbank.

Parameters
filtersFilters for each filter in the bank. First axis isis the coefficient index, second axis is the filter index.
gainsGain values. Given as pointer, if not given (nulltpr), gains are initialized with unity gain.

Make sure the pool is created once, such that all threads are ready for use.

Definition at line 120 of file lasp_biquadbank.cpp.

◆ BiquadBank() [2/2]

BiquadBank::BiquadBank ( std::vector< SeriesBiquad filters,
vd  gains 
)
inline

Construct biquad bank from already given set of series biquad filters and gain values.

Parameters
filtersThe filters to set
gainsThe gain values for each filter

Definition at line 84 of file lasp_biquadbank.h.

Member Function Documentation

◆ clone()

std::unique_ptr< Filter > BiquadBank::clone ( ) const
finaloverridevirtual

Clone a filter, to generate a copy.

Returns
Copy of filter with state set to zero.

Implements Filter.

Definition at line 189 of file lasp_biquadbank.cpp.

◆ filter()

void BiquadBank::filter ( vd inout)
finaloverridevirtual

Filter input, and provides output in same array as input.

Parameters
inoutVector of input / output samples.

Implements Filter.

Definition at line 149 of file lasp_biquadbank.cpp.

◆ nfilters()

us BiquadBank::nfilters ( ) const
inline

Returns the number of Filters.

Returns
The number of filters

Definition at line 100 of file lasp_biquadbank.h.

◆ reset()

void BiquadBank::reset ( )
finaloverridevirtual

Reset filter state to 0 (history was all-zero).

Implements Filter.

Definition at line 182 of file lasp_biquadbank.cpp.

◆ setGains()

void BiquadBank::setGains ( const vd gains)

Set new gain values for each filter in the BiquadBank.

Parameters
gainsVector of gain values. Should be of same length as the number of filters installed.

Definition at line 138 of file lasp_biquadbank.cpp.


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