summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Anderson <ardour@semiosix.com>2007-07-20 14:26:35 +0000
committerJohn Anderson <ardour@semiosix.com>2007-07-20 14:26:35 +0000
commitd013570b133ed28086767b443c1f0e30d47237b8 (patch)
tree6aa1534da2b636c31c454a07d5e73676d9394174
parentcf90cfa4c10ee58ec65da833f5969b3f5f9c931e (diff)
make scrolling work. various comments and TODO cleanups
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2161 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/surfaces/mackie/TODO15
-rw-r--r--libs/surfaces/mackie/mackie_jog_wheel.cc35
2 files changed, 20 insertions, 30 deletions
diff --git a/libs/surfaces/mackie/TODO b/libs/surfaces/mackie/TODO
index e351f903ea..04d7692417 100644
--- a/libs/surfaces/mackie/TODO
+++ b/libs/surfaces/mackie/TODO
@@ -1,24 +1,23 @@
* update manual with jog wheel states
-* alsa/sequencer ports unstable
-* crash when mmc port set to mcu
+* alsa/sequencer ports unstable. possibly problems with use of ::poll
+* use glib::timeout for check_scrubbing
+* crash when mmc port set to mcu?
* remappable buttons
* how long can UI signal callbacks take to execute? What happens if they block?
where ENSURE_CORRECT_THREAD is a macro that is modelled on ENSURE_GUI_THREAD
if the handler is not called in the "correct thread", it will use a pseudo-RT-safe-enough technique to get the correct thread to recall "handler" later on, and return.
-* jog with transport rolling doesn't work properly. My use of ScrollTimeline also doesn't work.
-* use jog to increase/decrease ffwd/rew speed
-* make loop button sensitive to current transport state
-* finish button mapping. Only shifted buttons left for bcf.
+* finish button implementations.
* concurrency for bank switching? And make sure "old" events aren't sent to "new" faders
* TODOs in code
* removal of a route results in a strip that isn't dead, but doesn't have any effect on the session
* use i18n. see string_compose
-* docs in manual, including button assignment diagram
Later
-----
* remove commented couts
+* talk to route plugins
+* check for excessiveness (ie too many events making other subsystems work too hard)
* Queueing of writes?
* Generic surface code to common location
* bulk remote id changes cause too many surface updates. use Config->remote_model.
@@ -33,7 +32,7 @@ Need UI integration
-------------------
* Some indication on the UI of currently bank-switched-in routes?
Useful for surfaces that don't have a scribble strip.
-* use current zoom setting and snap state for shuttle wheel
+* use current zoom setting and snap state for jog wheel
Actual Mackie
-------------
diff --git a/libs/surfaces/mackie/mackie_jog_wheel.cc b/libs/surfaces/mackie/mackie_jog_wheel.cc
index 481c45bffc..9996a7bb29 100644
--- a/libs/surfaces/mackie/mackie_jog_wheel.cc
+++ b/libs/surfaces/mackie/mackie_jog_wheel.cc
@@ -67,15 +67,10 @@ void JogWheel::jog_event( SurfacePort & port, Control & control, const ControlSt
switch ( jog_wheel_state() )
{
case scroll:
- //ScrollTimeline causes crashes
- if ( _mcp.mcu_port().emulation() == MackiePort::bcf2000 )
- _mcp.ScrollTimeline( state.ticks * state.sign / 100.0 );
- else
- _mcp.ScrollTimeline( state.ticks * state.sign / 100.0 );
+ _mcp.ScrollTimeline( state.delta * state.sign );
break;
case zoom:
- // TODO do a for loop for each, to number of ticks
if ( state.sign > 0 )
for ( unsigned int i = 0; i < state.ticks; ++i ) _mcp.ZoomIn();
else
@@ -83,27 +78,23 @@ void JogWheel::jog_event( SurfacePort & port, Control & control, const ControlSt
break;
case speed:
- {
- // block because we initialize a variable
- // locally, _transport_speed is an absolute value...
- // fairly arbitrary scaling function
- _transport_speed += scaled_delta( state, _mcp.get_session().transport_speed() );
-
- // make sure not weirdness get so the session
- if ( _transport_speed < 0 || isnan( _transport_speed ) )
- {
- _transport_speed = 0.0;
- }
-
- // translated current speed to a signed transport velocity
- _mcp.get_session().request_transport_speed( transport_speed() * transport_direction() );
+ // locally, _transport_speed is an positive value
+ // fairly arbitrary scaling function
+ _transport_speed += scaled_delta( state, _mcp.get_session().transport_speed() );
+
+ // make sure not weirdness get so the session
+ if ( _transport_speed < 0 || isnan( _transport_speed ) )
+ {
+ _transport_speed = 0.0;
+ }
+
+ // translate _transport_speed speed to a signed transport velocity
+ _mcp.get_session().request_transport_speed( transport_speed() * transport_direction() );
break;
- }
case scrub:
{
add_scrub_interval( _scrub_timer.restart() );
- // copied from tranzport driver
float speed = 0.0;
// This should really be part of the surface object