}
if (!m) {
- _master_fader->set_control (boost::shared_ptr<AutomationControl>());
+ if (_master_fader) {
+ _master_fader->set_control (boost::shared_ptr<AutomationControl>());
+ }
master_connection.disconnect ();
return;
}
if (!_master_fader) {
- _master_fader = dynamic_cast<Fader*> (Fader::factory (*this, _mcp.device_info().strip_cnt(), "master", *groups["master"]));
-
Groups::iterator group_it;
+ Group* master_group;
group_it = groups.find("master");
+ if (group_it == groups.end()) {
+ groups["master"] = master_group = new Group ("master");
+ } else {
+ master_group = group_it->second;
+ }
+
+ _master_fader = dynamic_cast<Fader*> (Fader::factory (*this, _mcp.device_info().strip_cnt(), "master", *master_group));
+
DeviceInfo device_info = _mcp.device_info();
GlobalButtonInfo master_button = device_info.get_global_button(Button::MasterFaderTouch);
Button* bb = dynamic_cast<Button*> (Button::factory (
}
float delta = 0;
- if (mcp().main_modifier_state() == MackieControlProtocol::MODIFIER_CONTROL) {
+ if (mcp().main_modifier_state() == MackieControlProtocol::MODIFIER_SHIFT) {
delta = sign * (ticks / (float) 0xff);
} else {
delta = sign * (ticks / (float) 0x3f);
}
break;
+ case 0x06:
+ /* Behringer X-Touch Compact: Device Ready
+ */
+ DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Behringer X-Touch Compact ready, current status = %1\n", _active));
+ turn_it_on ();
+ break;
+
case 0x03: /* LCP Connection Confirmation */
DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device confirms connection, ardour replies\n");
if (bytes[4] == 0x10 || bytes[4] == 0x11) {
DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device denies connection\n");
_active = false;
break;
+
default:
+ DEBUG_TRACE (DEBUG::MackieControl, string_compose ("unknown device ID byte %1", (int) bytes[5]));
error << "MCP: unknown sysex: " << bytes << endmsg;
}
}
update_view_mode_display (false);
- if (_mcp.device_info ().has_global_controls ()) {
- _mcp.update_global_button (Button::Read, _mcp.metering_active ());
- }
+// if (_mcp.device_info ().has_global_controls ()) {
+// _mcp.update_global_button (Button::Read, _mcp.metering_active ());
+// }
}
void
}
void
-Surface::redisplay (ARDOUR::microseconds_t now)
+Surface::redisplay (ARDOUR::microseconds_t now, bool force)
{
for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
- (*s)->redisplay (now);
+ (*s)->redisplay (now, force);
}
}
Surface::update_flip_mode_display ()
{
for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
- (*s)->potmode_changed (true);
- }
-}
-
-void
-Surface::update_potmode ()
-{
- for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
- (*s)->potmode_changed (false);
+ (*s)->flip_mode_changed ();
}
}