Gist
|
#include <Gist.h>
Public Member Functions | |
Gist (int audioFrameSize, int fs, WindowType windowType=HanningWindow) | |
~Gist () | |
void | setAudioFrameSize (int audioFrameSize) |
void | setSamplingFrequency (int fs) |
int | getAudioFrameSize () |
int | getSamplingFrequency () |
void | processAudioFrame (const std::vector< T > &audioFrame) |
void | processAudioFrame (const T *frame, int numSamples) |
const std::vector< T > & | getMagnitudeSpectrum () |
T | rootMeanSquare () |
T | peakEnergy () |
T | zeroCrossingRate () |
T | spectralCentroid () |
T | spectralCrest () |
T | spectralFlatness () |
T | spectralRolloff () |
T | spectralKurtosis () |
T | energyDifference () |
T | spectralDifference () |
T | spectralDifferenceHWR () |
T | complexSpectralDifference () |
T | highFrequencyContent () |
T | pitch () |
const std::vector< T > & | getMelFrequencySpectrum () |
const std::vector< T > & | getMelFrequencyCepstralCoefficients () |
Class for all performing all Gist audio analyses
Gist< T >::Gist | ( | int | audioFrameSize, |
int | fs, | ||
WindowType | windowType = HanningWindow |
||
) |
Constructor
audioFrameSize | the input audio frame size |
fs | the input audio sample rate |
windowType | the type of window function to use |
T Gist< T >::complexSpectralDifference |
@Returns the complex spectral difference onset detection function sample for the magnitude spectrum frame
T Gist< T >::energyDifference |
@Returns the energy difference onset detection function sample for the magnitude spectrum frame
int Gist< T >::getAudioFrameSize |
@Returns the audio frame size currently being used
const std::vector< T > & Gist< T >::getMagnitudeSpectrum |
Gist automatically calculates the magnitude spectrum when processAudioFrame() is called, this function returns it.
const std::vector< T > & Gist< T >::getMelFrequencyCepstralCoefficients |
Calculates the Mel-frequency Cepstral Coefficients
const std::vector< T > & Gist< T >::getMelFrequencySpectrum |
Calculates the Mel Frequency Spectrum
int Gist< T >::getSamplingFrequency |
@Returns the audio sampling frequency being used for analysis
T Gist< T >::highFrequencyContent |
@Returns the high frequency content onset detection function sample for the magnitude spectrum frame
T Gist< T >::peakEnergy |
@Returns the peak energy of the currently stored audio frame
T Gist< T >::pitch |
@Returns a monophonic pitch estimate according to the Yin algorithm
void Gist< T >::processAudioFrame | ( | const std::vector< T > & | audioFrame | ) |
Process an audio frame
audioFrame | a vector containing audio samples |
void Gist< T >::processAudioFrame | ( | const T * | frame, |
int | numSamples | ||
) |
Process an audio frame
frame | a pointer to an array containing the audio frame |
numSamples | the number of samples in the audio frame |
T Gist< T >::rootMeanSquare |
@Returns the root mean square (RMS) of the currently stored audio frame
void Gist< T >::setAudioFrameSize | ( | int | audioFrameSize | ) |
Set the audio frame size.
frameSize_ | the frame size to use |
void Gist< T >::setSamplingFrequency | ( | int | fs | ) |
Set the sampling frequency of input audio
fs | the sampling frequency |
T Gist< T >::spectralCentroid |
@Returns the spectral centroid from the magnitude spectrum
T Gist< T >::spectralCrest |
@Returns the spectral crest
T Gist< T >::spectralDifference |
@Returns the spectral difference onset detection function sample for the magnitude spectrum frame
T Gist< T >::spectralDifferenceHWR |
@Returns the half wave rectified complex spectral difference onset detection function sample for the magnitude spectrum frame
T Gist< T >::spectralFlatness |
@Returns the spectral flatness of the magnitude spectrum
T Gist< T >::spectralKurtosis |
@Returns the spectral kurtosis of the magnitude spectrum
T Gist< T >::spectralRolloff |
@Returns the spectral rolloff of the magnitude spectrum
T Gist< T >::zeroCrossingRate |
@Returns the zero crossing rate of the currently stored audio frame