diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-18 17:34:31 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-18 17:34:31 +0000 |
commit | c7c9c1bd2622b86ca4494098c80463fe15afeca4 (patch) | |
tree | 054770e93af7704174064f6669b980b6c84cb4f7 /libs | |
parent | e9dcd14bb4add4882de1aba274af6a548720dae9 (diff) |
MCP: next try at vpot mode for pan width
git-svn-id: svn://localhost/ardour2/branches/3.0@12013 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/pot.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/mackie/strip.cc | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/libs/surfaces/mackie/pot.cc b/libs/surfaces/mackie/pot.cc index 9a3f3360d2..63b0424297 100644 --- a/libs/surfaces/mackie/pot.cc +++ b/libs/surfaces/mackie/pot.cc @@ -74,7 +74,11 @@ Pot::update_message () // position, but only if off hasn't explicitly been set if (on) { - msg += (lrintf (position * 10.0) + 1) & 0x0f; // 0b00001111 + if (mode == spread) { + msg += (lrintf (position * 6) + 1) & 0x0f; // 0b00001111 + } else { + msg += (lrintf (position * 10.0) + 1) & 0x0f; // 0b00001111 + } } /* outbound LED message requires 0x20 to be added to the LED's id diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index b3e51f5912..64d916a2a9 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -447,7 +447,7 @@ Strip::notify_panner_width_changed (bool force_update) _surface->write (_fader->set_position (pos)); do_parameter_display (PanWidthAutomation, pos); } else { - _surface->write (_vpot->set_all (pos, true, Pot::dot)); + _surface->write (_vpot->set_all (pos, true, Pot::spread)); do_parameter_display (PanWidthAutomation, pos); } @@ -853,6 +853,14 @@ Strip::flip_mode_changed (bool notify) return; } + if (_surface->mcp().flip_mode()) { + /* flip mode is on - save what it used to be */ + _preflip_vpot_mode = _vpot_mode; + } else { + /* flip mode is off - restore flip mode to what it used to be */ + _vpot_mode = _preflip_vpot_mode; + } + boost::shared_ptr<AutomationControl> fader_controllable = _fader->control (); boost::shared_ptr<AutomationControl> vpot_controllable = _vpot->control (); @@ -1067,7 +1075,7 @@ Strip::set_vpot_mode (PotMode m) /* gain to fader, pan width to vpot */ _fader->set_control (_route->gain_control()); if (pannable) { - _vpot->set_mode (Pot::dot); + _vpot->set_mode (Pot::spread); _vpot->set_control (pannable->pan_width_control); } } |