diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-19 23:09:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-19 23:09:20 +0000 |
commit | f22f22b5998dbc873c0bd2e8ecb5c58c786dab6e (patch) | |
tree | 446aac833f5c1b2cee482505fa256fd3ae0a7ca6 /gtk2_ardour/editor_mixer.cc | |
parent | 6b459529cefd4c7cba4e00fbb896ca5e3592fd1b (diff) |
make transport buttons and shuttle controller work with MIDI CC's
git-svn-id: svn://localhost/ardour2/trunk@1477 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r-- | gtk2_ardour/editor_mixer.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index d1dd8be7fa..9048751611 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -158,6 +158,9 @@ Editor::set_selected_mixer_strip (TimeAxisView& view) } } +double current = 0.0; +bool currentInitialized = 0; + void Editor::update_current_screen () { @@ -194,7 +197,7 @@ Editor::update_current_screen () playhead_cursor->set_position (frame); -#undef CONTINUOUS_SCROLL +#define CONTINUOUS_SCROLL #ifdef CONTINUOUS_SCROLL /* don't do continuous scroll till the new position is in the rightmost quarter of the @@ -213,7 +216,15 @@ Editor::update_current_screen () } } #else - horizontal_adjustment.set_value (frame / frames_per_unit); + if (!currentInitialized) { + current = (frame - current_page_frames()/2) / frames_per_unit; + currentInitialized = 1; + } + + double target = (frame - current_page_frames()/2) / frames_per_unit; + target = (target * 0.1) + (current * 0.9); + horizontal_adjustment.set_value ( target ); + current = target; #endif #endif // CONTINUOUS_SCROLL |