diff options
author | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2014-02-10 21:14:59 +0000 |
---|---|---|
committer | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2014-07-05 21:47:48 +0100 |
commit | e0eaea6471e25f4c3797450a96f35fcdbb1c6992 (patch) | |
tree | 8f2cf248772c0f6cd30a72a468cec30bf31cfcfb /gtk2_ardour/tempo_dialog.h | |
parent | c9b0f0fcb7626de7afef2f3fca1b0c1dbd01bd5b (diff) |
Add 'Tap tempo' button to 'Edit tempo' dialogue
Add a 'Tap tempo' button to the 'Edit tempo' dialogue box that uses
gettimeofday() to time the interval between successive clicks and sets the
beats-per-minute appropriately.
Diffstat (limited to 'gtk2_ardour/tempo_dialog.h')
-rw-r--r-- | gtk2_ardour/tempo_dialog.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h index ba269a4425..848b55cb59 100644 --- a/gtk2_ardour/tempo_dialog.h +++ b/gtk2_ardour/tempo_dialog.h @@ -52,10 +52,13 @@ private: bool bpm_button_release (GdkEventButton* ); bool entry_key_release (GdkEventKey* ); void pulse_change (); + void tap_tempo (); typedef std::map<std::string,float> NoteTypes; NoteTypes note_types; + struct timeval last_tap; + Gtk::ComboBoxText pulse_selector; Gtk::Adjustment bpm_adjustment; Gtk::SpinButton bpm_spinner; @@ -64,6 +67,7 @@ private: Gtk::Label when_bar_label; Gtk::Label when_beat_label; Gtk::Label pulse_selector_label; + Gtk::Button tap_tempo_button; }; class MeterDialog : public ArdourDialog |