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

#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 ()
 

Detailed Description

template<class T>
class Gist< T >

Class for all performing all Gist audio analyses

Constructor & Destructor Documentation

◆ Gist()

template<class T >
Gist< T >::Gist ( int  audioFrameSize,
int  fs,
WindowType  windowType = HanningWindow 
)

Constructor

Parameters
audioFrameSizethe input audio frame size
fsthe input audio sample rate
windowTypethe type of window function to use

◆ ~Gist()

template<class T >
Gist< T >::~Gist

Destructor

Member Function Documentation

◆ complexSpectralDifference()

template<class T >
T Gist< T >::complexSpectralDifference

@Returns the complex spectral difference onset detection function sample for the magnitude spectrum frame

◆ energyDifference()

template<class T >
T Gist< T >::energyDifference

@Returns the energy difference onset detection function sample for the magnitude spectrum frame

◆ getAudioFrameSize()

template<class T >
int Gist< T >::getAudioFrameSize

@Returns the audio frame size currently being used

◆ getMagnitudeSpectrum()

template<class T >
const std::vector< T > & Gist< T >::getMagnitudeSpectrum

Gist automatically calculates the magnitude spectrum when processAudioFrame() is called, this function returns it.

Returns
the current magnitude spectrum

◆ getMelFrequencyCepstralCoefficients()

template<class T >
const std::vector< T > & Gist< T >::getMelFrequencyCepstralCoefficients

Calculates the Mel-frequency Cepstral Coefficients

◆ getMelFrequencySpectrum()

template<class T >
const std::vector< T > & Gist< T >::getMelFrequencySpectrum

Calculates the Mel Frequency Spectrum

◆ getSamplingFrequency()

template<class T >
int Gist< T >::getSamplingFrequency

@Returns the audio sampling frequency being used for analysis

◆ highFrequencyContent()

template<class T >
T Gist< T >::highFrequencyContent

@Returns the high frequency content onset detection function sample for the magnitude spectrum frame

◆ peakEnergy()

template<class T >
T Gist< T >::peakEnergy

@Returns the peak energy of the currently stored audio frame

◆ pitch()

template<class T >
T Gist< T >::pitch

@Returns a monophonic pitch estimate according to the Yin algorithm

◆ processAudioFrame() [1/2]

template<class T >
void Gist< T >::processAudioFrame ( const std::vector< T > &  audioFrame)

Process an audio frame

Parameters
audioFramea vector containing audio samples

◆ processAudioFrame() [2/2]

template<class T >
void Gist< T >::processAudioFrame ( const T *  frame,
int  numSamples 
)

Process an audio frame

Parameters
framea pointer to an array containing the audio frame
numSamplesthe number of samples in the audio frame

◆ rootMeanSquare()

template<class T >
T Gist< T >::rootMeanSquare

@Returns the root mean square (RMS) of the currently stored audio frame

◆ setAudioFrameSize()

template<class T >
void Gist< T >::setAudioFrameSize ( int  audioFrameSize)

Set the audio frame size.

Parameters
frameSize_the frame size to use

◆ setSamplingFrequency()

template<class T >
void Gist< T >::setSamplingFrequency ( int  fs)

Set the sampling frequency of input audio

Parameters
fsthe sampling frequency

◆ spectralCentroid()

template<class T >
T Gist< T >::spectralCentroid

@Returns the spectral centroid from the magnitude spectrum

◆ spectralCrest()

template<class T >
T Gist< T >::spectralCrest

@Returns the spectral crest

◆ spectralDifference()

template<class T >
T Gist< T >::spectralDifference

@Returns the spectral difference onset detection function sample for the magnitude spectrum frame

◆ spectralDifferenceHWR()

template<class T >
T Gist< T >::spectralDifferenceHWR

@Returns the half wave rectified complex spectral difference onset detection function sample for the magnitude spectrum frame

◆ spectralFlatness()

template<class T >
T Gist< T >::spectralFlatness

@Returns the spectral flatness of the magnitude spectrum

◆ spectralKurtosis()

template<class T >
T Gist< T >::spectralKurtosis

@Returns the spectral kurtosis of the magnitude spectrum

◆ spectralRolloff()

template<class T >
T Gist< T >::spectralRolloff

@Returns the spectral rolloff of the magnitude spectrum

◆ zeroCrossingRate()

template<class T >
T Gist< T >::zeroCrossingRate

@Returns the zero crossing rate of the currently stored audio frame


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