Gist
Public Member Functions | List of all members
Yin< T > Class Template Reference

#include <Yin.h>

Public Member Functions

 Yin (int samplingFrequency)
 
void setSamplingFrequency (int samplingFrequency)
 
void setMaxFrequency (T maxFreq)
 
getMaxFrequency ()
 
pitchYin (const std::vector< T > &frame)
 

Detailed Description

template<class T>
class Yin< T >

template class for the pitch detection algorithm Yin. Instantiations of the class should be of either 'float' or 'double' types and no others

Constructor & Destructor Documentation

◆ Yin()

template<class T >
Yin< T >::Yin ( int  samplingFrequency)

constructor

Parameters
samplingFrequencythe sampling frequency

Member Function Documentation

◆ getMaxFrequency()

template<class T >
T Yin< T >::getMaxFrequency ( )
inline
Returns
the maximum frequency that the algorithm will return

◆ pitchYin()

template<class T >
T Yin< T >::pitchYin ( const std::vector< T > &  frame)

calculates the pitch of the audio frame passed to it

Parameters
framean audio frame stored in a vector
Returns
the estimated pitch in Hz

◆ setMaxFrequency()

template<class T >
void Yin< T >::setMaxFrequency ( maxFreq)

sets the maximum frequency that the algorithm will return

Parameters
maxFreqthe maximum frequency

◆ setSamplingFrequency()

template<class T >
void Yin< T >::setSamplingFrequency ( int  samplingFrequency)

sets the sampling frequency used to calculate pitch values

Parameters
samplingFrequencythe sampling frequency

The documentation for this class was generated from the following files: