Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
QuadBiquad Class Reference

#include <QuadBiquad.h>

Public Member Functions

 QuadBiquad ()
 
void * operator new (size_t sz)
 
int setup (const BiquadCoeff::Settings &settings)
 
void update ()
 
void process (float data[kNumFilters])
 

Public Attributes

std::array< BiquadCoeffT
< float >, kNumFilters > 
filters
 

Static Public Attributes

static unsigned int constexpr kNumFilters = 4
 

Detailed Description

A class which processes four biquad filters in parallel in an optimised way.

These filters use float data types internally and the process() routine uses NEON intrinsics.

Constructor & Destructor Documentation

QuadBiquad::QuadBiquad ( )
inline

Construct the object.

May fail with std::bad_alloc if the provided memory is not properly aligned. This may occur when using a version of C++ prior to c++17 and doing heap allocation, e.g.: in an STL container (e.g.: std::vector). Use new to guarantee properly aligned memory.

Member Function Documentation

void* QuadBiquad::operator new ( size_t  sz)
inline

Allocate the object's memory so that it respects the desired alignment

int QuadBiquad::setup ( const BiquadCoeff::Settings settings)

Initialise the four filters and the QuadBiquad internals.

Alternatively, call setup() on each of the elements of filters and then call update().

void QuadBiquad::update ( )

Call this after manipulating the filter parameters of one or more of the individual elements of filters and before calling process().

void QuadBiquad::process ( float  data[kNumFilters])
inline

Process input data through the filter.

Parameters
datainput / output. Each element of the vector corresponds to the corresponding filtering channel in filters.

Member Data Documentation

std::array<BiquadCoeffT<float>, kNumFilters> QuadBiquad::filters

The four filters whose parameters are used by the QuadBiquad object.

You can set the filtering characteristics for each filter separately. After manipulating one or more of the elements of filters, call update() before calling QuadBiquad::process().


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