diff src/BTrack.cpp @ 28:7af87d3f2ce2 develop

Added a function to allow updates to the hop and frame size of the beat tracker
author Adam <adamstark.uk@gmail.com>
date Tue, 28 Jan 2014 00:31:17 +0000
parents e4d5f045064d
children bddd59087c36
line wrap: on
line diff
--- a/src/BTrack.cpp	Tue Jan 28 00:19:21 2014 +0000
+++ b/src/BTrack.cpp	Tue Jan 28 00:31:17 2014 +0000
@@ -149,6 +149,16 @@
 }
 
 //=======================================================================
+void BTrack::updateHopAndFrameSize(int hopSize_,int frameSize_)
+{
+    // update the onset detection function object
+    odf.initialise(hopSize_, frameSize_, ComplexSpectralDifferenceHWR, HanningWindow);
+    
+    // update the hop size being used by the beat tracker
+    setHopSize(hopSize_);
+}
+
+//=======================================================================
 bool BTrack::beatDueInCurrentFrame()
 {
     return beatDueInFrame;