#include <Chromagram.h>

Public Member Functions

 Chromagram (ChromaConfig Config)
 
 ~Chromagram ()
 
double * process (const double *data)
 Process a time-domain input signal of length equal to getFrameSize(). More...
 
double * process (const double *real, const double *imag)
 Process a frequency-domain input signal generated from a time-domain signal of length equal to getFrameSize() that has been windowed and "fftshifted" to place the zero index in the centre of the frame. More...
 
void unityNormalise (double *src)
 
double kabs (double real, double imag)
 
int getK ()
 
int getFrameSize ()
 
int getHopSize ()
 

Private Member Functions

int initialise (ChromaConfig Config)
 
int deInitialise ()
 

Private Attributes

Window< double > * m_window
 
double * m_windowbuf
 
double * m_chromadata
 
double m_FMin
 
double m_FMax
 
int m_BPO
 
int m_uK
 
MathUtilities::NormaliseType m_normalise
 
int m_frameSize
 
int m_hopSize
 
FFTRealm_FFT
 
ConstantQm_ConstantQ
 
double * m_FFTRe
 
double * m_FFTIm
 
double * m_CQRe
 
double * m_CQIm
 
bool m_skGenerated
 

Detailed Description

Definition at line 31 of file Chromagram.h.

Constructor & Destructor Documentation

Chromagram::Chromagram ( ChromaConfig  Config)

Definition at line 22 of file Chromagram.cpp.

References initialise().

Chromagram::~Chromagram ( )

Definition at line 77 of file Chromagram.cpp.

References deInitialise().

Member Function Documentation

double * Chromagram::process ( const double *  data)

Process a time-domain input signal of length equal to getFrameSize().

The returned buffer contains the chromagram values indexed by bin, with the number of values corresponding to the BPO field in the ChromaConfig supplied at construction. It is owned by the Chromagram object and is reused from one process call to the next.

Definition at line 124 of file Chromagram.cpp.

References Window< T >::cut(), FFTReal::forward(), HammingWindow, m_ConstantQ, m_FFT, m_FFTIm, m_FFTRe, m_frameSize, m_skGenerated, m_window, m_windowbuf, and ConstantQ::sparsekernel().

Referenced by GetKeyMode::process().

double * Chromagram::process ( const double *  real,
const double *  imag 
)

Process a frequency-domain input signal generated from a time-domain signal of length equal to getFrameSize() that has been windowed and "fftshifted" to place the zero index in the centre of the frame.

The real and imag buffers must each contain the full getFrameSize() frequency bins.

The returned buffer contains the chromagram values indexed by bin, with the number of values corresponding to the BPO field in the ChromaConfig supplied at construction. It is owned by the Chromagram object and is reused from one process call to the next.

Definition at line 155 of file Chromagram.cpp.

References kabs(), m_BPO, m_chromadata, m_ConstantQ, m_CQIm, m_CQRe, m_normalise, m_skGenerated, m_uK, MathUtilities::normalise(), ConstantQ::process(), and ConstantQ::sparsekernel().

void Chromagram::unityNormalise ( double *  src)

Definition at line 110 of file Chromagram.cpp.

References MathUtilities::getFrameMinMax(), and m_BPO.

double Chromagram::kabs ( double  real,
double  imag 
)

Definition at line 102 of file Chromagram.cpp.

Referenced by process().

int Chromagram::getK ( )
inline

Definition at line 70 of file Chromagram.h.

int Chromagram::getFrameSize ( )
inline

Definition at line 71 of file Chromagram.h.

Referenced by GetKeyMode::GetKeyMode().

int Chromagram::getHopSize ( )
inline

Definition at line 72 of file Chromagram.h.

int Chromagram::deInitialise ( )
private

Definition at line 82 of file Chromagram.cpp.

References m_chromadata, m_ConstantQ, m_CQIm, m_CQRe, m_FFT, m_FFTIm, m_FFTRe, m_window, and m_windowbuf.

Referenced by ~Chromagram().

Member Data Documentation

Window<double>* Chromagram::m_window
private

Definition at line 78 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

double* Chromagram::m_windowbuf
private

Definition at line 79 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

double* Chromagram::m_chromadata
private

Definition at line 81 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

double Chromagram::m_FMin
private

Definition at line 82 of file Chromagram.h.

Referenced by initialise().

double Chromagram::m_FMax
private

Definition at line 83 of file Chromagram.h.

Referenced by initialise().

int Chromagram::m_BPO
private

Definition at line 84 of file Chromagram.h.

Referenced by initialise(), process(), and unityNormalise().

int Chromagram::m_uK
private

Definition at line 85 of file Chromagram.h.

Referenced by initialise(), and process().

MathUtilities::NormaliseType Chromagram::m_normalise
private

Definition at line 87 of file Chromagram.h.

Referenced by initialise(), and process().

int Chromagram::m_frameSize
private

Definition at line 89 of file Chromagram.h.

Referenced by initialise(), and process().

int Chromagram::m_hopSize
private

Definition at line 90 of file Chromagram.h.

Referenced by initialise().

FFTReal* Chromagram::m_FFT
private

Definition at line 92 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

ConstantQ* Chromagram::m_ConstantQ
private

Definition at line 93 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

double* Chromagram::m_FFTRe
private

Definition at line 95 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

double* Chromagram::m_FFTIm
private

Definition at line 96 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

double* Chromagram::m_CQRe
private

Definition at line 97 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

double* Chromagram::m_CQIm
private

Definition at line 98 of file Chromagram.h.

Referenced by deInitialise(), initialise(), and process().

bool Chromagram::m_skGenerated
private

Definition at line 100 of file Chromagram.h.

Referenced by process().


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