summaryrefslogtreecommitdiff
path: root/gtk2_ardour/tempo_dialog.h
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-12-20 04:41:45 +1100
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:09 +1000
commit7fc3b0c34c552d7be862897bd0aaa542453e9973 (patch)
tree35898328a86aefec5ac18a00c56c8577f4779d1f /gtk2_ardour/tempo_dialog.h
parent94187e66a2ae2bc2ab082ef614c25b35ec0d5e24 (diff)
Initial stab at tempo ramps.
Replaces the list of points in TempoMap with TempoSection functions, which compute tempo-at or tick-at time relative to tempo section start. TempoMap consults them additively to determine things like bbt_time(), frame_time() get_grid() etc. This has a marked effect on scrolling speed along with the code simplification in the places it has been attempted. Several things are broken here. Currently every ramp except the last one is an exponential ramp. this may be simple to fix :). Mouse-over midi grid doesn't match mouse click grid. should also be simple. Many things seem to work, but their accuracy should be in question until each area has been addressed.
Diffstat (limited to 'gtk2_ardour/tempo_dialog.h')
-rw-r--r--gtk2_ardour/tempo_dialog.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index 06c5db196d..f04a5417f7 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -44,6 +44,7 @@ public:
double get_bpm ();
double get_note_type ();
bool get_bbt_time (Timecode::BBT_Time&);
+ ARDOUR::TempoSection::TempoSectionType get_tempo_type ();
private:
void init (const Timecode::BBT_Time& start, double, double, bool);
@@ -59,6 +60,9 @@ private:
typedef std::map<std::string,float> NoteTypes;
NoteTypes note_types;
+ typedef std::map<std::string, ARDOUR::TempoSection::TempoSectionType> TempoTypes;
+ TempoTypes tempo_types;
+
bool tapped; // whether the tap-tempo button has been clicked
double sum_x, sum_xx, sum_xy, sum_y;
double tap_count;
@@ -74,6 +78,8 @@ private:
Gtk::Label when_beat_label;
Gtk::Label pulse_selector_label;
Gtk::Button tap_tempo_button;
+ Gtk::ComboBoxText tempo_type;
+
};
class MeterDialog : public ArdourDialog