|
Gist
|
#include <Yin.h>
Public Member Functions | |
| Yin (int samplingFrequency) | |
| void | setSamplingFrequency (int samplingFrequency) |
| void | setMaxFrequency (T maxFreq) |
| T | getMaxFrequency () |
| T | pitchYin (const std::vector< T > &frame) |
template class for the pitch detection algorithm Yin. Instantiations of the class should be of either 'float' or 'double' types and no others
constructor
| samplingFrequency | the sampling frequency |
|
inline |
| T Yin< T >::pitchYin | ( | const std::vector< T > & | frame | ) |
calculates the pitch of the audio frame passed to it
| frame | an audio frame stored in a vector |
| void Yin< T >::setMaxFrequency | ( | T | maxFreq | ) |
sets the maximum frequency that the algorithm will return
| maxFreq | the maximum frequency |
| void Yin< T >::setSamplingFrequency | ( | int | samplingFrequency | ) |
sets the sampling frequency used to calculate pitch values
| samplingFrequency | the sampling frequency |