Functions
tPitchDetector

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

Functions

void tPitchDetector_init (tPitchDetector *const detector, float lowestFreq, float highestFreq, LEAF *const leaf)
 Initialize a tPitchDetector to the default mempool of a LEAF instance. More...
 
void tPitchDetector_initToPool (tPitchDetector *const detector, float lowestFreq, float highestFreq, tMempool *const mempool)
 Initialize a tPitchDetector to a specified mempool. More...
 
void tPitchDetector_free (tPitchDetector *const detector)
 Free a tPitchDetector from its mempool. More...
 
int tPitchDetector_tick (tPitchDetector *const detector, float sample)
 
float tPitchDetector_getFrequency (tPitchDetector *const detector)
 
float tPitchDetector_getPeriodicity (tPitchDetector *const detector)
 
float tPitchDetector_harmonic (tPitchDetector *const detector, int harmonicIndex)
 
float tPitchDetector_predictFrequency (tPitchDetector *const detector)
 
void tPitchDetector_setHysteresis (tPitchDetector *const detector, float hysteresis)
 Set the hysteresis used in zero crossing detection. More...
 

Detailed Description

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

Function Documentation

◆ tPitchDetector_init()

void tPitchDetector_init ( tPitchDetector *const  detector,
float  lowestFreq,
float  highestFreq,
LEAF *const  leaf 
)

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

Parameters
detectorA pointer to the relevant tPitchDetector.
lowestFreq
highestFreq
leafA pointer to the leaf instance.

◆ tPitchDetector_initToPool()

void tPitchDetector_initToPool ( tPitchDetector *const  detector,
float  lowestFreq,
float  highestFreq,
tMempool *const  mempool 
)

Initialize a tPitchDetector to a specified mempool.

Parameters
detectorA pointer to the relevant tPitchDetector.
lowestFreq
highestFreq
mempoolA pointer to the tMempool to use.

◆ tPitchDetector_free()

void tPitchDetector_free ( tPitchDetector *const  detector)

Free a tPitchDetector from its mempool.

Parameters
detectorA pointer to the relevant tPitchDetector.

◆ tPitchDetector_tick()

int tPitchDetector_tick ( tPitchDetector *const  detector,
float  sample 
)
Parameters
detectorA pointer to the relevant tPitchDetector.
input

◆ tPitchDetector_getFrequency()

float tPitchDetector_getFrequency ( tPitchDetector *const  detector)
Parameters
detectorA pointer to the relevant tPitchDetector.

◆ tPitchDetector_getPeriodicity()

float tPitchDetector_getPeriodicity ( tPitchDetector *const  detector)
Parameters
detectorA pointer to the relevant tPitchDetector.

◆ tPitchDetector_harmonic()

float tPitchDetector_harmonic ( tPitchDetector *const  detector,
int  harmonicIndex 
)
Parameters
detectorA pointer to the relevant tPitchDetector.
harmonicIndex

◆ tPitchDetector_predictFrequency()

float tPitchDetector_predictFrequency ( tPitchDetector *const  detector)
Parameters
detectorA pointer to the relevant tPitchDetector.

◆ tPitchDetector_setHysteresis()

void tPitchDetector_setHysteresis ( tPitchDetector *const  detector,
float  hysteresis 
)

Set the hysteresis used in zero crossing detection.

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