From 0791432d54037dc6950555c47b34f7d3b1e48990 Mon Sep 17 00:00:00 2001 From: Adam Stark Date: Tue, 10 May 2016 23:54:33 +0100 Subject: [PATCH] Tidy --- src/BTrack.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/BTrack.cpp b/src/BTrack.cpp index 62b7b0d..7dd3dcb 100755 --- a/src/BTrack.cpp +++ b/src/BTrack.cpp @@ -229,15 +229,8 @@ void BTrack::processOnsetDetectionFunctionSample(double newSample) m0--; beatCounter--; beatDueInFrame = false; - -// // move all samples back one step -// for (int i=0;i < (onsetDFBufferSize-1);i++) -// { -// onsetDF[i] = onsetDF[i+1]; -// } - + // add new sample at the end - //onsetDF[onsetDFBufferSize-1] = newSample; onsetDF.addSampleToEnd(newSample); // update cumulative score @@ -685,22 +678,10 @@ void BTrack::updateCumulativeScore(double odfSample) n++; } - -// // shift cumulative score back one -// for (int i = 0;i < (onsetDFBufferSize-1);i++) -// { -// cumulativeScore[i] = cumulativeScore[i+1]; -// } - + latestCumulativeScoreValue = ((1-alpha)*odfSample) + (alpha*max); cumulativeScore.addSampleToEnd(latestCumulativeScoreValue); - - // add new value to cumulative score - //cumulativeScore[onsetDFBufferSize-1] = ((1-alpha)*odfSample) + (alpha*max); - - //latestCumulativeScoreValue = cumulativeScore[onsetDFBufferSize-1]; - } //=======================================================================