Mercurial > hg > btrack
changeset 101:1fcc06afd9cb
Removed confusing and unnecessary 'tempo' member variable
author | Adam Stark <adamstark.uk@gmail.com> |
---|---|
date | Sun, 03 Sep 2017 11:34:04 +0100 |
parents | 6aea5918992d |
children | 0a99d93955bb |
files | src/BTrack.cpp src/BTrack.h |
diffstat | 2 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/BTrack.cpp Sun Aug 13 11:00:31 2017 +0100 +++ b/src/BTrack.cpp Sun Sep 03 11:34:04 2017 +0100 @@ -104,7 +104,6 @@ // initialise parameters tightness = 5; alpha = 0.9; - tempo = 120; estimatedTempo = 120.0; tempoToLagFactor = 60. * 44100. / 512.; @@ -146,7 +145,6 @@ // initialise algorithm given the hopsize setHopSize (hopSize_); - // Set up FFT for calculating the auto-correlation function FFTLengthForACFCalculation = 1024; @@ -171,8 +169,7 @@ { hopSize = hopSize_; onsetDFBufferSize = (512 * 512) / hopSize; // calculate df buffer size - - beatPeriod = round(60/((((double) hopSize)/44100)*tempo)); + beatPeriod = round(60/((((double) hopSize)/44100) * 120.)); // set size of onset detection function buffer onsetDF.resize (onsetDFBufferSize);
--- a/src/BTrack.h Sun Aug 13 11:00:31 2017 +0100 +++ b/src/BTrack.h Sun Sep 03 11:34:04 2017 +0100 @@ -202,7 +202,6 @@ double tightness; /**< the tightness of the weighting used to calculate cumulative score */ double alpha; /**< the mix between the current detection function sample and the cumulative score's "momentum" */ double beatPeriod; /**< the beat period, in detection function samples */ - double tempo; /**< the tempo in beats per minute */ double estimatedTempo; /**< the current tempo estimation being used by the algorithm */ double latestCumulativeScoreValue; /**< holds the latest value of the cumulative score function */ double tempoToLagFactor; /**< factor for converting between lag and tempo */