diff src/BTrack.h @ 59:ba3fc238ccad

Renamed many variables, functions and arguments so they have more sensible names. Also removed an apparently redundant variable in OnsetDetectionFunction called wframe
author Adam Stark <adamstark@users.noreply.github.com>
date Fri, 24 Jan 2014 21:45:55 +0000
parents f84ccd07e17f
children bf256abf1dd4
line wrap: on
line diff
--- a/src/BTrack.h	Thu Jan 23 18:00:53 2014 +0000
+++ b/src/BTrack.h	Fri Jan 24 21:45:55 2014 +0000
@@ -90,7 +90,7 @@
     void resampleOnsetDetectionFunction();
     
     /** update the cumulative score */
-    void updateCumulativeScore(double df_sample);
+    void updateCumulativeScore(double odfSample);
 	
     /** predicts the next beat */
     void predictBeat();
@@ -103,8 +103,8 @@
      */
     void adaptiveThreshold(double *x,int N);
     
-    /** calculates the mean of values in an array from index locations [start,end] */
-    double calculateMeanOfArray(double *array,int start,int end);
+    /** calculates the mean of values in an array from index locations [startIndex,endIndex] */
+    double calculateMeanOfArray(double *array,int startIndex,int endIndex);
     
     /** normalises a given array */
     void normaliseArray(double *array,int N);
@@ -150,9 +150,9 @@
     
     double latestCumulativeScoreValue;      /**< holds the latest value of the cumulative score function */
     
-    double p_fact;
+    double tempoToLagFactor;                /**< factor for converting between lag and tempo */
 	
-    int m0;                                 // indicates when the next point to predict the next beat is
+    int m0;                                 /**< indicates when the next point to predict the next beat is */
     
     int beatCounter;                        /**< keeps track of when the next beat is - will be zero when the beat is due, and is set elsewhere in the algorithm to be positive once a beat prediction is made */