# HG changeset patch # User Adam Stark # Date 1504434844 -3600 # Node ID 1fcc06afd9cb09cbcd8d4d134d81d8631c25dedc # Parent 6aea5918992d53a03de4db22ea48104230574d63 Removed confusing and unnecessary 'tempo' member variable diff -r 6aea5918992d -r 1fcc06afd9cb src/BTrack.cpp --- 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); diff -r 6aea5918992d -r 1fcc06afd9cb src/BTrack.h --- 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 */