Functions
tPeriodDetector

Period detection algorithm from Joel de Guzman's Q Audio DSP Library. More...

Functions

void tPeriodDetector_init (tPeriodDetector *const detector, float lowestFreq, float highestFreq, float hysteresis, LEAF *const leaf)
 Initialize a tPeriodDetector to the default mempool of a LEAF instance. More...
 
void tPeriodDetector_initToPool (tPeriodDetector *const detector, float lowestFreq, float highestFreq, float hysteresis, tMempool *const mempool)
 Initialize a tPeriodDetector to a specified mempool. More...
 
void tPeriodDetector_free (tPeriodDetector *const detector)
 Free a tPeriodDetector from its mempool. More...
 
int tPeriodDetector_tick (tPeriodDetector *const detector, float sample)
 
float tPeriodDetector_getPeriod (tPeriodDetector *const detector)
 Get the periodicity for a given harmonic of the detected pitch. More...
 
float tPeriodDetector_getPeriodicity (tPeriodDetector *const detector)
 
float tPeriodDetector_harmonic (tPeriodDetector *const detector, int harmonicIndex)
 
float tPeriodDetector_predictPeriod (tPeriodDetector *const detector)
 
int tPeriodDetector_isReady (tPeriodDetector *const detector)
 
int tPeriodDetector_isReset (tPeriodDetector *const detector)
 
void tPeriodDetector_setHysteresis (tPeriodDetector *const detector, float hysteresis)
 Set the hysteresis used in zero crossing detection. More...
 

Detailed Description

Period detection algorithm from Joel de Guzman's Q Audio DSP Library.

Function Documentation

◆ tPeriodDetector_init()

void tPeriodDetector_init ( tPeriodDetector *const  detector,
float  lowestFreq,
float  highestFreq,
float  hysteresis,
LEAF *const  leaf 
)

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

Parameters

◆ tPeriodDetector_initToPool()

void tPeriodDetector_initToPool ( tPeriodDetector *const  detector,
float  lowestFreq,
float  highestFreq,
float  hysteresis,
tMempool *const  mempool 
)

Initialize a tPeriodDetector to a specified mempool.

Parameters

◆ tPeriodDetector_free()

void tPeriodDetector_free ( tPeriodDetector *const  detector)

Free a tPeriodDetector from its mempool.

Parameters
detectorA pointer to the tPeriodDetector to free.

◆ tPeriodDetector_tick()

int tPeriodDetector_tick ( tPeriodDetector *const  detector,
float  sample 
)
Parameters

◆ tPeriodDetector_getPeriod()

float tPeriodDetector_getPeriod ( tPeriodDetector *const  detector)

Get the periodicity for a given harmonic of the detected pitch.

Parameters

◆ tPeriodDetector_getPeriodicity()

float tPeriodDetector_getPeriodicity ( tPeriodDetector *const  detector)
Parameters

◆ tPeriodDetector_harmonic()

float tPeriodDetector_harmonic ( tPeriodDetector *const  detector,
int  harmonicIndex 
)
Parameters

◆ tPeriodDetector_predictPeriod()

float tPeriodDetector_predictPeriod ( tPeriodDetector *const  detector)
Parameters

◆ tPeriodDetector_isReady()

int tPeriodDetector_isReady ( tPeriodDetector *const  detector)
Parameters

◆ tPeriodDetector_isReset()

int tPeriodDetector_isReset ( tPeriodDetector *const  detector)
Parameters


◆ tPeriodDetector_setHysteresis()

void tPeriodDetector_setHysteresis ( tPeriodDetector *const  detector,
float  hysteresis 
)

Set the hysteresis used in zero crossing detection.

Parameters
detectorA pointer to the relevant tPeriodDetector.
hysteresisThe hysteresis in decibels. Defaults to -40db.