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

A set of Biquad filters in series. More...

#include <lasp_biquadbank.h>

Inheritance diagram for SeriesBiquad:
Collaboration diagram for SeriesBiquad:

Public Member Functions

 SeriesBiquad (const vd &filter_coefs)
 Initalize a SeriesBiquad filter.
 
virtual void filter (vd &inout) override final
 Filter input, and provides output in same array as input.
 
virtual ~SeriesBiquad () override
 
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
 

Static Public Member Functions

static SeriesBiquad firstOrderHighPass (const d fs, const d cuton_Hz)
 Create a SeriesBiquad object for a first order high-pass filter.
 

Detailed Description

A set of Biquad filters in series.

Definition at line 13 of file lasp_biquadbank.h.

Constructor & Destructor Documentation

◆ SeriesBiquad()

SeriesBiquad::SeriesBiquad ( const vd filter_coefs)

Initalize a SeriesBiquad filter.

Parameters
filter_coefsFilter coefficients, should be given in the order as [b0, b1, b2, a0==1, a1, a2, b0,...]

Initialize state to zero

Check if third row in this matrix equals unity.

Definition at line 13 of file lasp_biquadbank.cpp.

◆ ~SeriesBiquad()

virtual SeriesBiquad::~SeriesBiquad ( )
inlineoverridevirtual

Definition at line 40 of file lasp_biquadbank.h.

Member Function Documentation

◆ clone()

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

Clone a filter, to generate a copy.

Returns
Copy of filter with state set to zero.

Implements Filter.

Definition at line 83 of file lasp_biquadbank.cpp.

◆ filter()

void SeriesBiquad::filter ( vd inout)
finaloverridevirtual

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

Parameters
inoutVector of input / output samples.

Implementation is based on Proakis & Manolakis - Digital Signal Processing, Fourth Edition, p. 550

Implements Filter.

Definition at line 91 of file lasp_biquadbank.cpp.

◆ firstOrderHighPass()

SeriesBiquad SeriesBiquad::firstOrderHighPass ( const d  fs,
const d  cuton_Hz 
)
static

Create a SeriesBiquad object for a first order high-pass filter.

Parameters
fsSampling frequency [Hz]
cuton_HzCuton-frequency [Hz]
Returns
SeriesBiquad object with a single biquad, corresponding to a first order high pass filter.

Definition at line 45 of file lasp_biquadbank.cpp.

◆ reset()

void SeriesBiquad::reset ( )
finaloverridevirtual

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

Implements Filter.

Definition at line 87 of file lasp_biquadbank.cpp.


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