comparison src/BTrack.cpp @ 106:6f5ba0250afd

Fixed some comments
author Adam Stark <adamstark.uk@gmail.com>
date Tue, 12 Sep 2017 01:00:53 +0100
parents 3647be01027b
children a6701b3f636f
comparison
equal deleted inserted replaced
105:3647be01027b 106:6f5ba0250afd
669 669
670 double logGaussianTransitionWeighting[pastWindowSize]; 670 double logGaussianTransitionWeighting[pastWindowSize];
671 createLogGaussianTransitionWeighting (logGaussianTransitionWeighting, pastWindowSize, beatPeriod); 671 createLogGaussianTransitionWeighting (logGaussianTransitionWeighting, pastWindowSize, beatPeriod);
672 672
673 // Calculate the future cumulative score, by shifting the log Gaussian transition weighting from its 673 // Calculate the future cumulative score, by shifting the log Gaussian transition weighting from its
674 // start position of [-2 beat periods, 0.5 beat periods] forwards over the size of the beat 674 // start position of [-2 beat periods, - 0.5 beat periods] forwards over the size of the beat
675 // expectation window, calculating a new cumulative score where the onset detection function sample 675 // expectation window, calculating a new cumulative score where the onset detection function sample
676 // is zero. This uses the "momentum" of the function to generate itself into the future. 676 // is zero. This uses the "momentum" of the function to generate itself into the future.
677 for (int i = onsetDFBufferSize; i < (onsetDFBufferSize + beatExpectationWindowSize); i++) 677 for (int i = onsetDFBufferSize; i < (onsetDFBufferSize + beatExpectationWindowSize); i++)
678 { 678 {
679 // note here that we pass 0.0 in for the onset detection function value and 1.0 for the alpha weighting factor 679 // note here that we pass 0.0 in for the onset detection function sample and 1.0 for the alpha weighting factor
680 // see equation 3.4 and page 60 - 62 of Adam Stark's PhD thesis for details 680 // see equation 3.4 and page 60 - 62 of Adam Stark's PhD thesis for details
681 futureCumulativeScore[i] = calculateNewCumulativeScoreValue (futureCumulativeScore, logGaussianTransitionWeighting, startIndex, endIndex, 0.0, 1.0); 681 futureCumulativeScore[i] = calculateNewCumulativeScoreValue (futureCumulativeScore, logGaussianTransitionWeighting, startIndex, endIndex, 0.0, 1.0);
682 682
683 startIndex++; 683 startIndex++;
684 endIndex++; 684 endIndex++;