Mercurial > hg > qm-dsp
comparison dsp/onsets/DetectionFunction.h @ 347:e3dedded9c4d
Merge from pvoc branch
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 04 Oct 2013 16:43:44 +0100 |
parents | 5eb9c2387108 |
children | 2053a308bb4d |
comparison
equal
deleted
inserted
replaced
336:f665f9ce2fd1 | 347:e3dedded9c4d |
---|---|
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 ) |
90 double* m_unwrapped; // Unwrapped phase of analysis frame | |
80 | 91 |
81 Window<double> *m_window; | 92 Window<double> *m_window; |
82 PhaseVocoder* m_phaseVoc; // Phase Vocoder | 93 PhaseVocoder* m_phaseVoc; // Phase Vocoder |
83 }; | 94 }; |
84 | 95 |