Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
qTDL

An implementation of the Tapped Delay Line (TDL) structure in O(1) More...

Data Structures

struct  qTDL_t
 A Tapped Delay Line (TDL) object. More...
 

Functions

void qTDL_Setup (qTDL_t *const q, float *const area, const size_t n, const float initVal)
 Setup and initialize a Tapped Delay Line (TDL) instance by setting the default optimal parameters.
 
void qTDL_Flush (qTDL_t *const q, const float initVal)
 Clears all delays from the TDL and sets them to the specified value.
 
float qTDL_GetOldest (const qTDL_t *const q)
 Get the oldest sample from the TDL x(k-n)
 
float qTDL_GetAtIndex (const qTDL_t *const q, const size_t i)
 Get the specified delayed sample from the TDL x(k-i)
 
float qTDL_GetRecent (const qTDL_t *const q)
 Get the most recent sample from the TDL x(k)
 
void qTDL_InsertSample (qTDL_t *const q, const float sample)
 Insert a new sample to the TDL removing the oldest sample.
 

Detailed Description

An implementation of the Tapped Delay Line (TDL) structure in O(1)

Function Documentation

◆ qTDL_Flush()

void qTDL_Flush ( qTDL_t *const q,
const float initVal )

Clears all delays from the TDL and sets them to the specified value.

Parameters
[in]qA pointer to the TDL instance.
[in]initValThe value with which all TDL delays will be initialized
Returns
none

◆ qTDL_GetAtIndex()

float qTDL_GetAtIndex ( const qTDL_t *const q,
const size_t i )

Get the specified delayed sample from the TDL x(k-i)

Parameters
[in]qA pointer to the TDL instance.
[in]iThe requested delay index
Returns
The requested value from the TDL

◆ qTDL_GetOldest()

float qTDL_GetOldest ( const qTDL_t *const q)

Get the oldest sample from the TDL x(k-n)

Parameters
[in]qA pointer to the TDL instance.
Returns
The requested value from the TDL

◆ qTDL_GetRecent()

float qTDL_GetRecent ( const qTDL_t *const q)

Get the most recent sample from the TDL x(k)

Parameters
[in]qA pointer to the TDL instance.
Returns
The requested value from the TDL

◆ qTDL_InsertSample()

void qTDL_InsertSample ( qTDL_t *const q,
const float sample )

Insert a new sample to the TDL removing the oldest sample.

Parameters
[in]qA pointer to the TDL instance.
[in]sampleThe new sample to insert.
Returns
none

◆ qTDL_Setup()

void qTDL_Setup ( qTDL_t *const q,
float *const area,
const size_t n,
const float initVal )

Setup and initialize a Tapped Delay Line (TDL) instance by setting the default optimal parameters.

Parameters
[in]qA pointer to the TDL instance.
[in]areaAn array of size n where delays will be stored
[in]nThe number of elements on area.
[in]initValThe value with which all TDL delays will be initialized
Returns
none