diff --git a/gtk2_ardour/beatbox_gui.cc b/gtk2_ardour/beatbox_gui.cc index 592ab3f58f..686fdf7270 100644 --- a/gtk2_ardour/beatbox_gui.cc +++ b/gtk2_ardour/beatbox_gui.cc @@ -147,6 +147,7 @@ BBGUI::grid_event (GdkEvent* ev) ret = grid_button_release_event (&ev->button); break; case GDK_SCROLL: + cerr << ' ' << ev->scroll.direction << show_gdk_event_state (ev->scroll.state); ret = grid_scroll_event (&ev->scroll); default: break; @@ -199,7 +200,13 @@ BBGUI::grid_scroll_event (GdkEventScroll* ev) break; } - adjust_step_pitch (seq, step, amt); + if (ev->state & GDK_MOD1_MASK) { + cerr << "adjust pitch by " << amt << endl; + adjust_step_pitch (seq, step, amt); + } else { + cerr << "adjust velocity by " << amt << endl; + adjust_step_velocity (seq, step, amt); + } return true; } @@ -220,6 +227,12 @@ BBGUI::adjust_step_pitch (int seq, int step, int amt) bbox->sequencer().adjust_step_pitch (seq, step, amt); } +void +BBGUI::adjust_step_velocity (int seq, int step, int amt) +{ + bbox->sequencer().adjust_step_velocity (seq, step, amt); +} + void BBGUI::update () { diff --git a/gtk2_ardour/beatbox_gui.h b/gtk2_ardour/beatbox_gui.h index b60ba7f631..9d55e1fd67 100644 --- a/gtk2_ardour/beatbox_gui.h +++ b/gtk2_ardour/beatbox_gui.h @@ -124,6 +124,7 @@ class BBGUI : public ArdourDialog { void set_grab_step (double x, double y); void adjust_step_pitch (int seq, int step, int amt); + void adjust_step_velocity (int seq, int step, int amt); }; #endif /* __gtk2_ardour_beatbox_gui_h__ */