Skip to content

Class daisysp::FIRFilterImplGeneric

template <size_t max_size, size_t max_block>

ClassList > daisysp > FIRFilterImplGeneric

More...

  • #include <fir.h>

Inherits the following classes: daisysp::FIRMemory

Public Functions

Type Name
FIRFilterImplGeneric ()
auto Init (Args &&... args)
float Process (float in)
void ProcessBlock (const float * pSrc, float * pDst, size_t block)
void Reset ()
bool SetIR (const float * ir, size_t len, bool reverse)

Public Functions inherited from daisysp::FIRMemory

See daisysp::FIRMemory

Type Name
void Reset ()

Public Static Functions

Type Name
constexpr size_t GetLatency ()

Protected Attributes

Type Name
float coefs_
size_t size_
float state_

Protected Attributes inherited from daisysp::FIRMemory

See daisysp::FIRMemory

Type Name
float coefs_
size_t size_
float state_

Protected Static Attributes inherited from daisysp::FIRMemory

See daisysp::FIRMemory

Type Name
constexpr size_t state_size_ = [**max\_size**](classdaisysp_1_1DelayLine.md) + [**max\_block**](classdaisysp_1_1DelayLine.md) - 1[**u**](classdaisysp_1_1DelayLine.md)

Protected Functions inherited from daisysp::FIRMemory

See daisysp::FIRMemory

Type Name
FIRMemory ()
bool SetCoefs (const float coefs, size_t size, bool reverse)

Protected Static Functions inherited from daisysp::FIRMemory

See daisysp::FIRMemory

Type Name
constexpr size_t MaxBlock ()

Detailed Description

Generic FIR implementation is always available

Parameters:

  • max_size - maximal filter length
  • max_block - maximal block size for ProcessBlock() if both parameters are 0 (via FIRFILTER_USER_MEMORY macro) Assumes the user will provide own memory buffers via SetIR() and SetStateBuffer() functions Otherwise statically allocates the necessary buffers itself

Public Functions Documentation

function FIRFilterImplGeneric

inline daisysp::FIRFilterImplGeneric::FIRFilterImplGeneric () 

function Init

template<typename... Args>
inline auto daisysp::FIRFilterImplGeneric::Init (
    Args &&... args
) 

function Process

inline float daisysp::FIRFilterImplGeneric::Process (
    float in
) 

function ProcessBlock

inline void daisysp::FIRFilterImplGeneric::ProcessBlock (
    const  float * pSrc,
    float * pDst,
    size_t block
) 

function Reset

inline void daisysp::FIRFilterImplGeneric::Reset () 

function SetIR

inline bool daisysp::FIRFilterImplGeneric::SetIR (
    const  float * ir,
    size_t len,
    bool reverse
) 

Set filter coefficients (aka Impulse Response) Coefficients need to be in reversed order (tail-first) If internal storage is used, makes a local copy and allows reversing the impulse response


Public Static Functions Documentation

function GetLatency

static inline constexpr  size_t daisysp::FIRFilterImplGeneric::GetLatency () 

Protected Attributes Documentation

variable coefs_

float daisysp::FIRMemory< max_size, max_block >::coefs_[max_size];

variable size_

size_t daisysp::FIRMemory< max_size, max_block >::size_;

variable state_

float daisysp::FIRMemory< max_size, max_block >::state_[state_size_];


The documentation for this class was generated from the following file external-docs/DaisySP/Source/Filters/fir.h