Mercurial > hg > qm-dsp
diff 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 |
line wrap: on
line diff
--- a/dsp/onsets/DetectionFunction.h Tue Oct 01 15:15:59 2013 +0100 +++ b/dsp/onsets/DetectionFunction.h Fri Oct 04 16:43:44 2013 +0100 @@ -43,8 +43,18 @@ double* getSpectrumMagnitude(); DetectionFunction( DFConfig Config ); virtual ~DetectionFunction(); - double process( const double* TDomain ); - double process( const double* magnitudes, const double* phases ); + + /** + * Process a single time-domain frame of audio, provided as + * frameLength samples. + */ + double processTimeDomain(const double* samples); + + /** + * Process a single frequency-domain frame, provided as + * frameLength/2+1 real and imaginary component values. + */ + double processFrequencyDomain(const double* reals, const double* imags); private: void whiten(); @@ -74,9 +84,10 @@ double* m_phaseHistoryOld; double* m_magPeaks; - double* m_DFWindowedFrame; // Array for windowed analysis frame + double* m_windowed; // Array for windowed analysis frame double* m_magnitude; // Magnitude of analysis frame ( frequency domain ) double* m_thetaAngle;// Phase of analysis frame ( frequency domain ) + double* m_unwrapped; // Unwrapped phase of analysis frame Window<double> *m_window; PhaseVocoder* m_phaseVoc; // Phase Vocoder