Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstark committed May 10, 2016
1 parent ed96a61 commit 0791432
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions src/BTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];

}

//=======================================================================
Expand Down

0 comments on commit 0791432

Please sign in to comment.