, public AbstractUI<MackieControlUIRequest>
{
public:
+ static const int MODIFIER_OPTION;
+ static const int MODIFIER_CONTROL;
+ static const int MODIFIER_SHIFT;
+ static const int MODIFIER_CMDALT;
+
MackieControlProtocol(ARDOUR::Session &);
virtual ~MackieControlProtocol();
ARDOUR::Session & get_session() { return *session; }
void add_in_use_timeout (Mackie::Surface& surface, Mackie::Control& in_use_control, Mackie::Control* touch_control);
+
+ int modifier_state();
protected:
// shut down the surface
bool _scrub_mode;
bool _flip_mode;
int _current_selected_track;
-
- static const int MODIFIER_OPTION;
- static const int MODIFIER_CONTROL;
- static const int MODIFIER_SHIFT;
- static const int MODIFIER_CMDALT;
-
int _modifier_state;
typedef std::list<GSource*> PortSources;
return;
}
- boost::shared_ptr<Panner> panner = _route->panner_shell()->panner();
- // pan for mono input routes, or stereo linked panners
- if (panner) {
- double p = panner->position ();
+ boost::shared_ptr<Pannable> pannable = _route->pannable();
+
+ if (pannable) {
+ boost::shared_ptr<AutomationControl> ac;
+
+ if (_surface->mcp().modifier_state() & MackieControlProtocol::MODIFIER_CONTROL) {
+ ac = pannable->pan_width_control;
+ } else {
+ ac = pannable->pan_azimuth_control;
+ }
+
+ double p = ac->get_value();
// calculate new value, and adjust
p += state.delta * state.sign;
p = min (1.0, p);
p = max (0.0, p);
- panner->set_position (p);
+
+ ac->set_value (p);
}
}