Functions
tZeroCrossingCounter

Count the amount of zero crossings within a window of the input audio data. More...

Functions

void tZeroCrossingCounter_init (tZeroCrossingCounter *const, int maxWindowSize, LEAF *const leaf)
 Initialize a tZeroCrossingCounter to the default mempool of a LEAF instance. More...
 
void tZeroCrossingCounter_initToPool (tZeroCrossingCounter *const, int maxWindowSize, tMempool *const mempool)
 Initialize a tZeroCrossingCounter to a specified mempool. More...
 
void tZeroCrossingCounter_free (tZeroCrossingCounter *const)
 Free a tZeroCrossingCounter from its mempool. More...
 
float tZeroCrossingCounter_tick (tZeroCrossingCounter *const, float input)
 Tick the tZeroCrossingCounter. More...
 
void tZeroCrossingCounter_setWindowSize (tZeroCrossingCounter *const, float windowSize)
 Set the size of the window. Cannot be greater than the max size given on initialization. More...
 

Detailed Description

Count the amount of zero crossings within a window of the input audio data.

Function Documentation

◆ tZeroCrossingCounter_init()

void tZeroCrossingCounter_init ( tZeroCrossingCounter * const  counter,
int  maxWindowSize,
LEAF *const  leaf 
)

Initialize a tZeroCrossingCounter to the default mempool of a LEAF instance.

Parameters
counterA pointer to the tZeroCrossingCounter to initialize.
maxWindowSizeThe max and initial size of the window.
leafA pointer to the leaf instance.

◆ tZeroCrossingCounter_initToPool()

void tZeroCrossingCounter_initToPool ( tZeroCrossingCounter * const  counter,
int  maxWindowSize,
tMempool *const  mempool 
)

Initialize a tZeroCrossingCounter to a specified mempool.

Parameters
counterA pointer to the tZeroCrossingCounter to initialize.
maxWindowSizeThe max and initial size of the window.
mempoolA pointer to the tMempool to use.

◆ tZeroCrossingCounter_free()

void tZeroCrossingCounter_free ( tZeroCrossingCounter * const  counter)

Free a tZeroCrossingCounter from its mempool.

Parameters
counterA pointer to the tZeroCrossingCounter to free.

◆ tZeroCrossingCounter_tick()

float tZeroCrossingCounter_tick ( tZeroCrossingCounter * const  counter,
float  input 
)

Tick the tZeroCrossingCounter.

Parameters
counterA pointer to the relevant tZeroCrossingCounter.
inputThe input sample.
Returns
The amount of zero crossings as a proportion of the window.

◆ tZeroCrossingCounter_setWindowSize()

void tZeroCrossingCounter_setWindowSize ( tZeroCrossingCounter * const  counter,
float  windowSize 
)

Set the size of the window. Cannot be greater than the max size given on initialization.

Parameters
counterA pointer to the relevant tZeroCrossingCounter.
windowSizeThe new window size.