ConstantQTransform extract a ConstantQ spectrum using Blankertz's paper algorithm. More...
#include <ConstantQTransform.hxx>
Public Types | |
typedef std::vector< double > | ConstantQSpectrum |
typedef std::vector< double > | Spectrum |
Public Member Functions | |
void | doIt (const std::vector< double > &fftData) |
ConstantQTransform (unsigned FS, double fmin, double fmax, unsigned binsPerOctave) | |
void | sparsekernel (double) |
~ConstantQTransform () | |
const ConstantQSpectrum & | constantQSpectrum () const |
double | getQ () const |
int | getK () const |
int | getfftlength () const |
ConstantQTransform extract a ConstantQ spectrum using Blankertz's paper algorithm.
This transformation is similar to the Fourier transform but it generates bins which bins are proportional to their center frequency.
This implementation saves computational time by moving most computation to configuration time and using a fft as starting point for the transform.
Parameters:
Configuration Outputs:
Inputs:
Outputs:
Definition at line 57 of file ConstantQTransform.hxx.
typedef std::vector<double> Simac::ConstantQTransform::ConstantQSpectrum |
Definition at line 60 of file ConstantQTransform.hxx.
typedef std::vector<double> Simac::ConstantQTransform::Spectrum |
Definition at line 61 of file ConstantQTransform.hxx.
Simac::ConstantQTransform::ConstantQTransform | ( | unsigned | FS, | |
double | fmin, | |||
double | fmax, | |||
unsigned | binsPerOctave | |||
) |
Definition at line 42 of file ConstantQTransform.cxx.
References Simac::nextpow2().
Simac::ConstantQTransform::~ConstantQTransform | ( | ) |
Definition at line 59 of file ConstantQTransform.cxx.
const ConstantQSpectrum& Simac::ConstantQTransform::constantQSpectrum | ( | ) | const [inline] |
Definition at line 87 of file ConstantQTransform.hxx.
Referenced by doIt().
void Simac::ConstantQTransform::doIt | ( | const std::vector< double > & | fftData | ) |
Definition at line 116 of file ConstantQTransform.cxx.
References constantQSpectrum().
int Simac::ConstantQTransform::getfftlength | ( | ) | const [inline] |
Definition at line 90 of file ConstantQTransform.hxx.
int Simac::ConstantQTransform::getK | ( | ) | const [inline] |
Definition at line 89 of file ConstantQTransform.hxx.
double Simac::ConstantQTransform::getQ | ( | ) | const [inline] |
Definition at line 88 of file ConstantQTransform.hxx.
void Simac::ConstantQTransform::sparsekernel | ( | double | thresh | ) |
Definition at line 63 of file ConstantQTransform.cxx.
References FourierTransform::doIt(), FourierTransform::spectrum(), and Simac::squaredModule().
Referenced by Simac::ChordExtractor::~ChordExtractor().