Mercurial > hg > constant-q-cpp
view cpp-qm-dsp/CQKernel.h @ 23:4f2f28d5df58
Fix frequency calculation in cpp, and some diagnostics
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 01 Nov 2013 17:58:39 +0000 |
parents | 701900c371b0 |
children | 3973be829352 |
line wrap: on
line source
#ifndef CQ_KERNEL_H #define CQ_KERNEL_H #include <vector> class FFT; class CQKernel { public: CQKernel(double sampleRate, double maxFreq, int binsPerOctave); ~CQKernel(); struct Properties { double sampleRate; double maxFrequency; double minFrequency; int binsPerOctave; int fftSize; int fftHop; int atomsPerFrame; int atomSpacing; int firstCentre; double Q; }; Properties getProperties() const { return m_p; } private: Properties m_p; FFT *m_fft; struct KernelMatrix { std::vector<int> offsets; std::vector<std::vector<double> > real; std::vector<std::vector<double> > imag; }; KernelMatrix m_kernel; void generateKernel(); }; #endif