diff 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
line wrap: on
line diff
--- a/dsp/onsets/DetectionFunction.h	Wed Oct 02 18:22:06 2013 +0100
+++ b/dsp/onsets/DetectionFunction.h	Thu Oct 03 12:58:36 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,7 +84,7 @@
     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