AuLib  1.0beta
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AuLib::Iir Class Reference

#include <AuLib/Iir.h>

Inheritance diagram for AuLib::Iir:
Inheritance graph
[legend]
Collaboration diagram for AuLib::Iir:
Collaboration graph
[legend]

Public Member Functions

 Iir (const double *a, const double *b, uint32_t vframes=def_vframes, double sr=def_sr)
 
 Iir (uint32_t vframes=def_vframes, double sr=def_sr)
 
const double * process (const double *sig)
 
const double * process (const double *sig, const double *a, const double *b)
 
const Iirprocess (const AudioBase &obj)
 
const Iirprocess (const AudioBase &obj, const double *c, bool iir=true)
 
const Iirprocess (const AudioBase &obj, const double *a, const double *b)
 
const Iiroperator() (const AudioBase &obj)
 
template<typename T >
const Iiroperator() (const AudioBase &obj, T a)
 
template<typename T , typename U >
const Iiroperator() (const AudioBase &obj, T a, U b)
 
- Public Member Functions inherited from AuLib::AudioBase
 AudioBase (uint32_t nchnls=def_nchnls, uint32_t vframes=def_vframes, double sr=def_sr)
 
virtual const AudioBaseoperator*= (double scal)
 
virtual const AudioBaseoperator*= (const double *sig)
 
virtual const AudioBaseoperator*= (const AudioBase &obj)
 
virtual const AudioBaseoperator+= (double offs)
 
virtual const AudioBaseoperator+= (const double *sig)
 
virtual const AudioBaseoperator+= (const AudioBase &obj)
 
double & operator[] (uint32_t ndx)
 
const double & operator[] (uint32_t ndx) const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const AudioBaseset (const AudioBase &obj)
 
const AudioBaseset (const double *sig)
 
const double * set (double v)
 
double set (double v, uint32_t p)
 
 operator const std::vector< double > & () const
 
 operator const double * () const
 
const double * vector () const
 
double vector (uint32_t frndx, uint32_t chn) const
 
uint32_t vframes (uint32_t frames)
 
uint32_t resize_exact (uint32_t frames)
 
uint32_t vframes () const
 
uint32_t vsamps () const
 
uint32_t nchnls () const
 
uint32_t sr () const
 
uint32_t error () const
 
virtual const char * error_message () const
 

Protected Member Functions

virtual const double * dsp (const double *sig)
 
virtual void update ()
 

Protected Attributes

double m_del [2]
 
double m_a [3]
 
double m_b [2]
 
double m_scal
 
- Protected Attributes inherited from AuLib::AudioBase
uint32_t m_nchnls
 
uint32_t m_vframes
 
std::vector< double > m_vector
 
double m_sr
 
uint32_t m_error
 

Additional Inherited Members

- Public Types inherited from AuLib::AudioBase
typedef std::vector< double >::iterator iterator
 
typedef std::vector< double >::const_iterator const_iterator
 

Detailed Description

General-purpose 2nd-order IIR filter section

Constructor & Destructor Documentation

◆ Iir() [1/2]

AuLib::Iir::Iir ( const double *  a,
const double *  b,
uint32_t  vframes = def_vframes,
double  sr = def_sr 
)
inline

Iir constructor

a - feedforward coef list (a0,a1,a2) b - feedback coefs (b1, b2) vframes - vector size
sr - sampling rate

◆ Iir() [2/2]

AuLib::Iir::Iir ( uint32_t  vframes = def_vframes,
double  sr = def_sr 
)
inline

Iir constructor

vframes - vector size
sr - sampling rate

Member Function Documentation

◆ dsp()

const double * AuLib::Iir::dsp ( const double *  sig)
protectedvirtual

Filter kernel

◆ operator()() [1/3]

const Iir& AuLib::Iir::operator() ( const AudioBase obj)
inline

operator(a) convenience

◆ operator()() [2/3]

template<typename T >
const Iir& AuLib::Iir::operator() ( const AudioBase obj,
a 
)
inline

operator(a, b) convenience

◆ operator()() [3/3]

template<typename T , typename U >
const Iir& AuLib::Iir::operator() ( const AudioBase obj,
a,
b 
)
inline

operator(a, b, c) convenience

◆ process() [1/5]

const double* AuLib::Iir::process ( const double *  sig)
inline

process a signal sig

◆ process() [2/5]

const double* AuLib::Iir::process ( const double *  sig,
const double *  a,
const double *  b 
)
inline

process a signal sig with coefficients lists a and b

◆ process() [3/5]

const Iir& AuLib::Iir::process ( const AudioBase obj)
inline

process a signal in obj

◆ process() [4/5]

const Iir& AuLib::Iir::process ( const AudioBase obj,
const double *  c,
bool  iir = true 
)
inline

process a signal in obj with coefficient lists c as an iir or fir

◆ process() [5/5]

const Iir& AuLib::Iir::process ( const AudioBase obj,
const double *  a,
const double *  b 
)
inline

process a signal in obj with coefficients lists a and b

◆ update()

virtual void AuLib::Iir::update ( )
inlineprotectedvirtual

Coefficients update

Reimplemented in AuLib::BandP, AuLib::LowP, AuLib::ResonR, AuLib::ResonZ, AuLib::BandR, and AuLib::HighP.

Member Data Documentation

◆ m_a

double AuLib::Iir::m_a[3]
protected

◆ m_b

double AuLib::Iir::m_b[2]
protected

◆ m_del

double AuLib::Iir::m_del[2]
protected

◆ m_scal

double AuLib::Iir::m_scal
protected

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