comparison dsp/onsets/DetectionFunction.h @ 344:5eb9c2387108

Phase vocoder: provide time-domain and freq-domain inputs separately; update tests etc
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 03 Oct 2013 12:58:36 +0100
parents c99d83236f0d
children 2053a308bb4d
comparison
equal deleted inserted replaced
343:24d8ea972643 344:5eb9c2387108
41 { 41 {
42 public: 42 public:
43 double* getSpectrumMagnitude(); 43 double* getSpectrumMagnitude();
44 DetectionFunction( DFConfig Config ); 44 DetectionFunction( DFConfig Config );
45 virtual ~DetectionFunction(); 45 virtual ~DetectionFunction();
46 double process( const double* TDomain ); 46
47 double process( const double* magnitudes, const double* phases ); 47 /**
48 * Process a single time-domain frame of audio, provided as
49 * frameLength samples.
50 */
51 double processTimeDomain(const double* samples);
52
53 /**
54 * Process a single frequency-domain frame, provided as
55 * frameLength/2+1 real and imaginary component values.
56 */
57 double processFrequencyDomain(const double* reals, const double* imags);
48 58
49 private: 59 private:
50 void whiten(); 60 void whiten();
51 double runDF(); 61 double runDF();
52 62
72 double* m_magHistory; 82 double* m_magHistory;
73 double* m_phaseHistory; 83 double* m_phaseHistory;
74 double* m_phaseHistoryOld; 84 double* m_phaseHistoryOld;
75 double* m_magPeaks; 85 double* m_magPeaks;
76 86
77 double* m_DFWindowedFrame; // Array for windowed analysis frame 87 double* m_windowed; // Array for windowed analysis frame
78 double* m_magnitude; // Magnitude of analysis frame ( frequency domain ) 88 double* m_magnitude; // Magnitude of analysis frame ( frequency domain )
79 double* m_thetaAngle;// Phase of analysis frame ( frequency domain ) 89 double* m_thetaAngle;// Phase of analysis frame ( frequency domain )
80 double* m_unwrapped; // Unwrapped phase of analysis frame 90 double* m_unwrapped; // Unwrapped phase of analysis frame
81 91
82 Window<double> *m_window; 92 Window<double> *m_window;