Mercurial > hg > qm-dsp
comparison dsp/chromagram/ConstantQ.h @ 483:fdaa63607c15
Untabify, indent, tidy
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 31 May 2019 11:54:32 +0100 |
parents | 50a97c8d52ed |
children | 5998ee1042d3 |
comparison
equal
deleted
inserted
replaced
482:cbe668c7d724 | 483:fdaa63607c15 |
---|---|
26 double max; // maximum frequency | 26 double max; // maximum frequency |
27 unsigned int BPO; // bins per octave | 27 unsigned int BPO; // bins per octave |
28 double CQThresh; // threshold | 28 double CQThresh; // threshold |
29 }; | 29 }; |
30 | 30 |
31 class ConstantQ { | 31 class ConstantQ |
32 | 32 { |
33 //public functions incl. sparsekernel so can keep out of loop in main | |
34 public: | 33 public: |
35 void process( const double* FFTRe, const double* FFTIm, | 34 void process( const double* FFTRe, const double* FFTIm, |
36 double* CQRe, double* CQIm ); | 35 double* CQRe, double* CQIm ); |
37 | 36 |
38 ConstantQ( CQConfig Config ); | 37 ConstantQ( CQConfig Config ); |
41 double* process( const double* FFTData ); | 40 double* process( const double* FFTData ); |
42 | 41 |
43 void sparsekernel(); | 42 void sparsekernel(); |
44 | 43 |
45 double hamming(int len, int n) { | 44 double hamming(int len, int n) { |
46 double out = 0.54 - 0.46*cos(2*PI*n/len); | 45 double out = 0.54 - 0.46*cos(2*PI*n/len); |
47 return(out); | 46 return(out); |
48 } | 47 } |
49 | 48 |
50 int getnumwin() { return m_numWin;} | 49 int getnumwin() { return m_numWin;} |
51 double getQ() { return m_dQ;} | 50 double getQ() { return m_dQ;} |
52 int getK() {return m_uK ;} | 51 int getK() {return m_uK ;} |
53 int getfftlength() { return m_FFTLength;} | 52 int getfftlength() { return m_FFTLength;} |
54 int gethop() { return m_hop;} | 53 int gethop() { return m_hop;} |
55 | 54 |
56 private: | 55 private: |
57 void initialise( CQConfig Config ); | 56 void initialise( CQConfig Config ); |
58 void deInitialise(); | 57 void deInitialise(); |
59 | 58 |
60 double* m_CQdata; | 59 double* m_CQdata; |
61 double m_FS; | 60 double m_FS; |
62 double m_FMin; | 61 double m_FMin; |
63 double m_FMax; | 62 double m_FMax; |
64 double m_dQ; | 63 double m_dQ; |