summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2017-02-26 05:07:51 +1100
committerRobin Gareus <robin@gareus.org>2017-02-27 20:16:10 +0100
commit211226983df8e46e8849dd0aeca422b89d3d4d79 (patch)
tree9b6394904a9a54f42483db07df4fb033cc3e9cdd /gtk2_ardour/editor_drag.cc
parentc9387055e4e6ce15505509974fca24b4a6488767 (diff)
remove tempo end drag (the control drag on the curve). a;ter tempo marker drag.
- holding down shift before initiating a tempo mark drag alters the end tempo of the previous one as before, but this is now a separate drag. - restore vertical dragging of the tempo mark to alter start/ end tempo. shift during the makrker drag alters start tempo. xontrol + shift during the drag alters end tempo.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc33
1 files changed, 17 insertions, 16 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 9b9aa55d7d..3787db10a8 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -3448,20 +3448,21 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
}
}
+ if (ArdourKeyboard::indicates_constraint (event->button.state) && ArdourKeyboard::indicates_copy (event->button.state)) {
+ double new_bpm = max (1.5, _grab_bpm.end_note_types_per_minute() + ((grab_y() - min (-1.0, current_pointer_y())) / 5.0));
+ stringstream strs;
+ _editor->session()->tempo_map().gui_change_tempo (_real_section, Tempo (new_bpm, _real_section->note_type()), true);
+ strs << "end:" << fixed << setprecision(3) << new_bpm;
+ show_verbose_cursor_text (strs.str());
+
+ } else if (ArdourKeyboard::indicates_constraint (event->button.state)) {
+ /* use vertical movement to alter tempo .. should be log */
+ double new_bpm = max (1.5, _grab_bpm.note_types_per_minute() + ((grab_y() - min (-1.0, current_pointer_y())) / 5.0));
+ stringstream strs;
+ _editor->session()->tempo_map().gui_change_tempo (_real_section, Tempo (new_bpm, _real_section->note_type()), false);
+ strs << "start:" << fixed << setprecision(3) << new_bpm;
+ show_verbose_cursor_text (strs.str());
- if (ArdourKeyboard::indicates_constraint (event->button.state)) {
-
- /**
- adjust the end tempo of the previous ramped marker, or start and end tempo if constant.
- depending on position lock style, this may or may not move the mark.
- */
- framepos_t const pf = adjusted_current_frame (event, false);
- map.gui_stretch_tempo_end (&map.tempo_section_at_frame (_real_section->frame() - 1), map.frame_at_quarter_note (_grab_qn), pf);
-
- ostringstream sstr;
- sstr << "end: " << fixed << setprecision(3) << map.tempo_section_at_frame (_real_section->frame() - 1).end_note_types_per_minute() << "\n";
- sstr << "start: " << fixed << setprecision(3) << map.tempo_section_at_frame (_real_section->frame() - 1).note_types_per_minute();
- show_verbose_cursor_text (sstr.str());
} else if (_movable && !_real_section->locked_to_meter()) {
framepos_t pf;
@@ -3739,7 +3740,7 @@ TempoEndDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
ostringstream sstr;
sstr << "end: " << fixed << setprecision(3) << _tempo->end_note_types_per_minute() << "\n";
- sstr << "mouse: " << fixed << setprecision(3) << map.tempo_at_frame (raw_grab_frame()).note_types_per_minute();
+ sstr << "start: " << fixed << setprecision(3) << _tempo->end_note_types_per_minute();
show_verbose_cursor_text (sstr.str());
}
@@ -3781,11 +3782,11 @@ TempoEndDrag::motion (GdkEvent* event, bool first_move)
framepos_t const pf = adjusted_current_frame (event, false);
- map.gui_stretch_tempo_end (_tempo, map.frame_at_quarter_note (_grab_qn), pf);
+ map.gui_stretch_tempo_end (&map.tempo_section_at_frame (_tempo->frame() - 1), map.frame_at_quarter_note (_grab_qn), pf);
ostringstream sstr;
sstr << "end: " << fixed << setprecision(3) << _tempo->end_note_types_per_minute() << "\n";
- sstr << "mouse: " << fixed << setprecision(3) << map.tempo_at_frame (pf).note_types_per_minute();
+ sstr << "start: " << fixed << setprecision(3) << _tempo->note_types_per_minute();
show_verbose_cursor_text (sstr.str());
}