comparison dsp/onsets/DetectionFunction.h @ 227:f06672e8db10

* Make it possible to provide the detection function with frequency domain inputs (i.e. phase vocoder already run)
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 15 May 2006 11:21:47 +0000
parents 49844bc8a895
children da277e8b5244
comparison
equal deleted inserted replaced
226:55576b901c06 227:f06672e8db10
33 public: 33 public:
34 double* getSpectrumMagnitude(); 34 double* getSpectrumMagnitude();
35 DetectionFunction( DFConfig Config ); 35 DetectionFunction( DFConfig Config );
36 virtual ~DetectionFunction(); 36 virtual ~DetectionFunction();
37 double process( double* TDomain ); 37 double process( double* TDomain );
38 double process( double* magnitudes, double* phases );
38 39
39 private: 40 private:
41 double runDF();
42
40 double HFC( unsigned int length, double* src); 43 double HFC( unsigned int length, double* src);
41 double specDiff( unsigned int length, double* src); 44 double specDiff( unsigned int length, double* src);
42 double phaseDev(unsigned int length, double *srcMagnitude, double *srcPhase); 45 double phaseDev(unsigned int length, double *srcMagnitude, double *srcPhase);
43 double complexSD(unsigned int length, double *srcMagnitude, double *srcPhase); 46 double complexSD(unsigned int length, double *srcMagnitude, double *srcPhase);
44 47
48 51
49 int m_DFType; 52 int m_DFType;
50 unsigned int m_dataLength; 53 unsigned int m_dataLength;
51 unsigned int m_halfLength; 54 unsigned int m_halfLength;
52 55
53 double* magHistory; 56 double* m_magHistory;
54 double* phaseHistory; 57 double* m_phaseHistory;
55 double* phaseHistoryOld; 58 double* m_phaseHistoryOld;
56 59
57 double* m_DFWindowedFrame; // Array for windowed analysis frame 60 double* m_DFWindowedFrame; // Array for windowed analysis frame
58 double* m_magnitude; // Magnitude of analysis frame ( frequency domain ) 61 double* m_magnitude; // Magnitude of analysis frame ( frequency domain )
59 double* m_thetaAngle;// Phase of analysis frame ( frequency domain ) 62 double* m_thetaAngle;// Phase of analysis frame ( frequency domain )
60 63
61
62 vector < ComplexData > meas ;
63
64 ComplexData j;
65
66 Window<double> *m_window; 64 Window<double> *m_window;
67 65 PhaseVocoder* m_phaseVoc; // Phase Vocoder
68 PhaseVocoder* m_phaseVoc; // Phase Vocoder
69
70 }; 66 };
71 67
72 #endif 68 #endif