Mercurial > hg > constant-q-cpp
view cpp-qm-dsp/ConstantQ.h @ 32:ba648b8672bd
Much of the actual CQ processing logic
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 06 Nov 2013 08:10:33 +0000 |
parents | 01a3e110bf8d |
children | e9752aa1b234 |
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ #ifndef CONSTANTQ_H #define CONSTANTQ_H #include "CQKernel.h" #include <vector> class Resampler; class FFTReal; class ConstantQ { public: ConstantQ(double sampleRate, double minFreq, double maxFreq, int binsPerOctave); ~ConstantQ(); std::vector<std::vector<double> > process(std::vector<double>); private: double m_sampleRate; double m_maxFrequency; double m_minFrequency; int m_binsPerOctave; int m_octaves; CQKernel *m_kernel; CQKernel::Properties m_p; int m_bigBlockSize; std::vector<Resampler *> m_decimators; std::vector<std::vector<double> > m_buffers; int m_totalLatency; std::vector<int> m_extraLatencies; // per resampler, to make up to total FFTReal *m_fft; void initialise(); std::vector<std::vector<double> > processBigBlock(); std::vector<std::vector<double> > processOctaveBlock(const double *data); }; #endif