Combined pitch detection algorithm using both Joel de Guzman's Q Audio DSP Library and Katya Vetters algorithms.
More...
|
void | tDualPitchDetector_init (tDualPitchDetector *const detector, float lowestFreq, float highestFreq, float *inBuffer, int bufSize, LEAF *const leaf) |
| Initialize a tDualPitchDetector to the default mempool of a LEAF instance. More...
|
|
void | tDualPitchDetector_initToPool (tDualPitchDetector *const detector, float lowestFreq, float highestFreq, float *inBuffer, int bufSize, tMempool *const mempool) |
| Initialize a tDualPitchDetector to a specified mempool. More...
|
|
void | tDualPitchDetector_free (tDualPitchDetector *const detector) |
| Free a tDualPitchDetector from its mempool. More...
|
|
int | tDualPitchDetector_tick (tDualPitchDetector *const detector, float sample) |
|
float | tDualPitchDetector_getFrequency (tDualPitchDetector *const detector) |
|
float | tDualPitchDetector_getPeriodicity (tDualPitchDetector *const detector) |
|
float | tDualPitchDetector_harmonic (tDualPitchDetector *const detector, int harmonicIndex) |
|
float | tDualPitchDetector_predictFrequency (tDualPitchDetector *const detector) |
|
void | tDualPitchDetector_setHysteresis (tDualPitchDetector *const detector, float hysteresis) |
| Set the hysteresis used in zero crossing detection. More...
|
|
void | tDualPitchDetector_setPeriodicityThreshold (tDualPitchDetector *const detector, float thresh) |
| Set the threshold for periodicity of a signal to be considered as pitched. More...
|
|
Combined pitch detection algorithm using both Joel de Guzman's Q Audio DSP Library and Katya Vetters algorithms.
◆ tDualPitchDetector_init()
void tDualPitchDetector_init |
( |
tDualPitchDetector *const |
detector, |
|
|
float |
lowestFreq, |
|
|
float |
highestFreq, |
|
|
float * |
inBuffer, |
|
|
int |
bufSize, |
|
|
LEAF *const |
leaf |
|
) |
| |
Initialize a tDualPitchDetector to the default mempool of a LEAF instance.
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
lowestFreq | |
highestFreq | |
inputBuffer | A buffer of float to store input to the pitch detector. |
bufferSize | Size of the input buffer. |
leaf | A pointer to the leaf instance. |
◆ tDualPitchDetector_initToPool()
void tDualPitchDetector_initToPool |
( |
tDualPitchDetector *const |
detector, |
|
|
float |
lowestFreq, |
|
|
float |
highestFreq, |
|
|
float * |
inBuffer, |
|
|
int |
bufSize, |
|
|
tMempool *const |
mempool |
|
) |
| |
Initialize a tDualPitchDetector to a specified mempool.
- Parameters
-
detector | A pointer to the relevant tPitchDualDetector. |
lowestFreq | |
highestFreq | |
inputBuffer | A buffer of float to store input to the pitch detector. |
bufferSize | Size of the input buffer. |
mempool | A pointer to the tMempool to use. |
◆ tDualPitchDetector_free()
void tDualPitchDetector_free |
( |
tDualPitchDetector *const |
detector | ) |
|
Free a tDualPitchDetector from its mempool.
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
◆ tDualPitchDetector_tick()
int tDualPitchDetector_tick |
( |
tDualPitchDetector *const |
detector, |
|
|
float |
sample |
|
) |
| |
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
input | |
◆ tDualPitchDetector_getFrequency()
float tDualPitchDetector_getFrequency |
( |
tDualPitchDetector *const |
detector | ) |
|
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
- Returns
- The detected frequency.
◆ tDualPitchDetector_getPeriodicity()
float tDualPitchDetector_getPeriodicity |
( |
tDualPitchDetector *const |
detector | ) |
|
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
- Returns
- The periodicity of the input.
◆ tDualPitchDetector_harmonic()
float tDualPitchDetector_harmonic |
( |
tDualPitchDetector *const |
detector, |
|
|
int |
harmonicIndex |
|
) |
| |
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
harmonicIndex | |
- Returns
◆ tDualPitchDetector_predictFrequency()
float tDualPitchDetector_predictFrequency |
( |
tDualPitchDetector *const |
detector | ) |
|
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
- Returns
- The predicted frequency in Hz.
◆ tDualPitchDetector_setHysteresis()
void tDualPitchDetector_setHysteresis |
( |
tDualPitchDetector *const |
detector, |
|
|
float |
hysteresis |
|
) |
| |
Set the hysteresis used in zero crossing detection.
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
hysteresis | The hysteresis in decibels. Defaults to -40db. |
◆ tDualPitchDetector_setPeriodicityThreshold()
void tDualPitchDetector_setPeriodicityThreshold |
( |
tDualPitchDetector *const |
detector, |
|
|
float |
thresh |
|
) |
| |
Set the threshold for periodicity of a signal to be considered as pitched.
- Parameters
-
detector | A pointer to the relevant tDualPitchDetector. |
threshold | The periodicity threshold from 0.0 to 1.0 with 1.0 being perfectly periodic.  |