summaryrefslogtreecommitdiff
path: root/gtk2_ardour/tempo_dialog.h
diff options
context:
space:
mode:
authorPavel Potocek <pavelpotocek@gmail.com>2016-01-13 15:04:29 +0100
committerTim Mayberry <mojofunk@gmail.com>2016-02-18 10:32:49 +1000
commit8d408d000d99616b98a5680df8612491189eb6e0 (patch)
tree6f53654edf85f2bfa0a8eab134571964ea54a32f /gtk2_ardour/tempo_dialog.h
parentec708926fa09b8e0a168029a69cb484fbc52a97a (diff)
Change the tap tempo estimator to least-squares regression
Diffstat (limited to 'gtk2_ardour/tempo_dialog.h')
-rw-r--r--gtk2_ardour/tempo_dialog.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index eda4e61f1a..06c5db196d 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -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;