Change the tap tempo estimator to least-squares regression
[ardour.git] / gtk2_ardour / tempo_dialog.h
index eda4e61f1a27a2145086f1629b3d53c40e9a8cc4..06c5db196da0545aaff24a39b890a412fb7e2642 100644 (file)
@@ -60,8 +60,10 @@ private:
        NoteTypes note_types;
 
        bool tapped;      // whether the tap-tempo button has been clicked
-       gint64 last_tap;
-       double average_interval;
+       double sum_x, sum_xx, sum_xy, sum_y;
+       double tap_count;
+       double last_t;
+       gint64 first_t;
 
        Gtk::ComboBoxText pulse_selector;
        Gtk::Adjustment   bpm_adjustment;