2 Copyright (C) 2012 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include "midi++/port.h"
28 #include "ardour/automation_control.h"
29 #include "ardour/debug.h"
30 #include "ardour/route.h"
31 #include "ardour/panner.h"
32 #include "ardour/panner_shell.h"
33 #include "ardour/rc_configuration.h"
34 #include "ardour/session.h"
35 #include "ardour/utils.h"
37 #include "control_group.h"
38 #include "surface_port.h"
41 #include "mackie_control_protocol.h"
42 #include "jog_wheel.h"
56 using namespace Mackie;
59 using ARDOUR::Pannable;
60 using ARDOUR::AutomationControl;
62 #define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */
64 // The MCU sysex header.4th byte Will be overwritten
65 // when we get an incoming sysex that identifies
67 static MidiByteArray mackie_sysex_hdr (5, MIDI::sysex, 0x0, 0x0, 0x66, 0x14);
69 // The MCU extender sysex header.4th byte Will be overwritten
70 // when we get an incoming sysex that identifies
72 static MidiByteArray mackie_sysex_hdr_xt (5, MIDI::sysex, 0x0, 0x0, 0x66, 0x15);
74 static MidiByteArray empty_midi_byte_array;
76 Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, uint32_t number, surface_type_t stype)
85 , _last_master_gain_written (-0.0f)
87 DEBUG_TRACE (DEBUG::MackieControl, "Surface::Surface init\n");
90 _port = new SurfacePort (*this);
92 throw failed_constructor ();
95 /* only the first Surface object has global controls */
98 DEBUG_TRACE (DEBUG::MackieControl, "Surface is first. Might have global controls.\n");
99 if (_mcp.device_info().has_global_controls()) {
101 DEBUG_TRACE (DEBUG::MackieControl, "init_controls done\n");
104 if (_mcp.device_info().has_master_fader()) {
106 DEBUG_TRACE (DEBUG::MackieControl, "setup_master done\n");
110 uint32_t n = _mcp.device_info().strip_cnt();
114 DEBUG_TRACE (DEBUG::MackieControl, "init_strips done\n");
117 connect_to_signals ();
119 DEBUG_TRACE (DEBUG::MackieControl, "Surface::Surface done\n");
124 DEBUG_TRACE (DEBUG::MackieControl, "Surface::~Surface init\n");
129 for (Groups::iterator it = groups.begin(); it != groups.end(); ++it) {
134 for (Controls::iterator it = controls.begin(); it != controls.end(); ++it) {
141 DEBUG_TRACE (DEBUG::MackieControl, "Surface::~Surface done\n");
148 snprintf (buf, sizeof (buf), X_("surface-%u"), _number);
149 XMLNode* node = new XMLNode (buf);
151 node->add_child_nocopy (_port->get_state());
157 Surface::set_state (const XMLNode& node, int version)
160 snprintf (buf, sizeof (buf), X_("surface-%u"), _number);
161 XMLNode* mynode = node.child (buf);
167 XMLNode* portnode = mynode->child (X_("Port"));
169 if (_port->set_state (*portnode, version)) {
178 Surface::sysex_hdr() const
181 case mcu: return mackie_sysex_hdr;
182 case ext: return mackie_sysex_hdr_xt;
184 cout << "SurfacePort::sysex_hdr _port_type not known" << endl;
185 return mackie_sysex_hdr;
188 static GlobalControlDefinition mackie_global_controls[] = {
189 { "external", Pot::External, Pot::factory, "none" },
190 { "fader_touch", Led::FaderTouch, Led::factory, "master" },
191 { "timecode", Led::Timecode, Led::factory, "none" },
192 { "beats", Led::Beats, Led::factory, "none" },
193 { "solo", Led::RudeSolo, Led::factory, "none" },
194 { "relay_click", Led::RelayClick, Led::factory, "none" },
195 { "", 0, Led::factory, "" }
199 Surface::init_controls()
203 DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: creating groups\n");
204 groups["assignment"] = new Group ("assignment");
205 groups["automation"] = new Group ("automation");
206 groups["bank"] = new Group ("bank");
207 groups["cursor"] = new Group ("cursor");
208 groups["display"] = new Group ("display");
209 groups["function select"] = new Group ("function select");
210 groups["global view"] = new Group ("global view");
211 groups["master"] = new Group ("master");
212 groups["modifiers"] = new Group ("modifiers");
213 groups["none"] = new Group ("none");
214 groups["transport"] = new Group ("transport");
215 groups["user"] = new Group ("user");
216 groups["utilities"] = new Group ("utilities");
218 DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: creating jog wheel\n");
219 if (_mcp.device_info().has_jog_wheel()) {
220 _jog_wheel = new Mackie::JogWheel (_mcp);
223 DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: creating global controls\n");
224 for (uint32_t n = 0; mackie_global_controls[n].name[0]; ++n) {
225 group = groups[mackie_global_controls[n].group_name];
226 Control* control = mackie_global_controls[n].factory (*this, mackie_global_controls[n].id, mackie_global_controls[n].name, *group);
227 controls_by_device_independent_id[mackie_global_controls[n].id] = control;
230 /* add global buttons */
231 DEBUG_TRACE (DEBUG::MackieControl, "Surface::init_controls: adding global buttons\n");
232 const map<Button::ID,GlobalButtonInfo>& global_buttons (_mcp.device_info().global_buttons());
234 for (map<Button::ID,GlobalButtonInfo>::const_iterator b = global_buttons.begin(); b != global_buttons.end(); ++b){
235 group = groups[b->second.group];
236 controls_by_device_independent_id[b->first] = Button::factory (*this, b->first, b->second.id, b->second.label, *group);
241 Surface::init_strips (uint32_t n)
243 const map<Button::ID,StripButtonInfo>& strip_buttons (_mcp.device_info().strip_buttons());
245 for (uint32_t i = 0; i < n; ++i) {
249 snprintf (name, sizeof (name), "strip_%d", (8* _number) + i);
251 Strip* strip = new Strip (*this, name, i, strip_buttons);
253 groups[name] = strip;
254 strips.push_back (strip);
259 Surface::setup_master ()
261 boost::shared_ptr<Route> m;
263 if ((m = _mcp.get_session().monitor_out()) == 0) {
264 m = _mcp.get_session().master_out();
271 _master_fader = dynamic_cast<Fader*> (Fader::factory (*this, _mcp.device_info().strip_cnt(), "master", *groups["master"]));
273 _master_fader->set_control (m->gain_control());
274 m->gain_control()->Changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&Surface::master_gain_changed, this), ui_context());
276 Groups::iterator group_it;
277 group_it = groups.find("master");
279 DeviceInfo device_info = _mcp.device_info();
280 GlobalButtonInfo master_button = device_info.get_global_button(Button::MasterFaderTouch);
281 Button* bb = dynamic_cast<Button*> (Button::factory (
283 Button::MasterFaderTouch,
288 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("surface %1 Master Fader new button BID %2 id %3\n",
289 number(), Button::MasterFaderTouch, bb->id()));
293 Surface::master_gain_changed ()
295 if (!_master_fader) {
299 boost::shared_ptr<AutomationControl> ac = _master_fader->control();
304 float normalized_position = ac->internal_to_interface (ac->get_value());
305 if (normalized_position == _last_master_gain_written) {
309 DEBUG_TRACE (DEBUG::MackieControl, "Surface::master_gain_changed: updating surface master fader\n");
311 _port->write (_master_fader->set_position (normalized_position));
312 _last_master_gain_written = normalized_position;
316 Surface::scaled_delta (float delta, float current_speed)
318 /* XXX needs work before use */
319 const float sign = delta < 0.0 ? -1.0 : 1.0;
321 return ((sign * std::pow (delta + 1.0, 2.0)) + current_speed) / 100.0;
325 Surface::display_bank_start (uint32_t current_bank)
327 if (current_bank == 0) {
328 // send Ar. to 2-char display on the master
329 show_two_char_display ("Ar", "..");
331 // write the current first remote_id to the 2-char display
332 show_two_char_display (current_bank);
337 Surface::blank_jog_ring ()
339 Control* control = controls_by_device_independent_id[Jog::ID];
342 Pot* pot = dynamic_cast<Pot*> (control);
344 _port->write (pot->set (0.0, false, Pot::spread));
350 Surface::scrub_scaling_factor () const
356 Surface::connect_to_signals ()
361 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface %1 connecting to signals on port %2\n",
362 number(), _port->input_port().name()));
364 MIDI::Parser* p = _port->input_port().parser();
367 p->sysex.connect_same_thread (*this, boost::bind (&Surface::handle_midi_sysex, this, _1, _2, _3));
368 /* V-Pot messages are Controller */
369 p->controller.connect_same_thread (*this, boost::bind (&Surface::handle_midi_controller_message, this, _1, _2));
370 /* Button messages are NoteOn */
371 p->note_on.connect_same_thread (*this, boost::bind (&Surface::handle_midi_note_on_message, this, _1, _2));
372 /* Button messages are NoteOn but libmidi++ sends note-on w/velocity = 0 as note-off so catch them too */
373 p->note_off.connect_same_thread (*this, boost::bind (&Surface::handle_midi_note_on_message, this, _1, _2));
374 /* Fader messages are Pitchbend */
376 for (i = 0; i < _mcp.device_info().strip_cnt(); i++) {
377 p->channel_pitchbend[i].connect_same_thread (*this, boost::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, i));
380 p->channel_pitchbend[_mcp.device_info().strip_cnt()].connect_same_thread (*this, boost::bind (&Surface::handle_midi_pitchbend_message, this, _1, _2, _mcp.device_info().strip_cnt()));
387 Surface::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uint32_t fader_id)
389 /* Pitchbend messages are fader position messages. Nothing in the data we get
390 * from the MIDI::Parser conveys the fader ID, which was given by the
391 * channel ID in the status byte.
393 * Instead, we have used bind() to supply the fader-within-strip ID
394 * when we connected to the per-channel pitchbend events.
397 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface::handle_midi_pitchbend_message on port %3, fader = %1 value = %2\n",
398 fader_id, pb, _number));
400 if (_mcp.device_info().no_handshake()) {
404 Fader* fader = faders[fader_id];
407 Strip* strip = dynamic_cast<Strip*> (&fader->group());
408 float pos = (pb >> 4)/1023.0; // only the top 10 bytes are used
410 strip->handle_fader (*fader, pos);
412 DEBUG_TRACE (DEBUG::MackieControl, "Handling master fader\n");
414 fader->set_value (pos); // alter master gain
415 _port->write (fader->set_position (pos)); // write back value (required for servo)
418 DEBUG_TRACE (DEBUG::MackieControl, "fader not found\n");
423 Surface::handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes* ev)
425 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface::handle_midi_note_on_message %1 = %2\n", (int) ev->note_number, (int) ev->velocity));
427 if (_mcp.device_info().no_handshake()) {
431 /* fader touch sense is given by "buttons" 0xe..0xe7 and 0xe8 for the
435 if (ev->note_number >= 0xE0 && ev->note_number <= 0xE8) {
436 Fader* fader = faders[ev->note_number];
438 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface: fader touch message, fader = %1\n", fader));
442 Strip* strip = dynamic_cast<Strip*> (&fader->group());
444 if (ev->velocity > 64) {
445 strip->handle_fader_touch (*fader, true);
447 strip->handle_fader_touch (*fader, false);
453 Button* button = buttons[ev->note_number];
456 Strip* strip = dynamic_cast<Strip*> (&button->group());
459 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("strip %1 button %2 pressed ? %3\n",
460 strip->index(), button->name(), (ev->velocity > 64)));
461 strip->handle_button (*button, ev->velocity > 64 ? press : release);
464 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("global button %1\n", button->id()));
465 _mcp.handle_button_event (*this, *button, ev->velocity > 64 ? press : release);
468 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("no button found for %1\n", (int) ev->note_number));
473 Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev)
475 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("SurfacePort::handle_midi_controller %1 = %2\n", (int) ev->controller_number, (int) ev->value));
477 if (_mcp.device_info().no_handshake()) {
481 Pot* pot = pots[ev->controller_number];
483 // bit 6 gives the sign
484 float sign = (ev->value & 0x40) == 0 ? 1.0 : -1.0;
485 // bits 0..5 give the velocity. we interpret this as "ticks
486 // moved before this message was sent"
487 float ticks = (ev->value & 0x3f);
489 /* euphonix and perhaps other devices send zero
490 when they mean 1, we think.
494 float delta = sign * (ticks / (float) 0x3f);
497 if (ev->controller_number == Jog::ID && _jog_wheel) {
499 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Jog wheel moved %1\n", ticks));
500 _jog_wheel->jog_event (delta);
507 Strip* strip = dynamic_cast<Strip*> (&pot->group());
509 strip->handle_pot (*pot, delta);
514 Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count)
516 MidiByteArray bytes (count, raw_bytes);
518 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
520 if (_mcp.device_info().no_handshake()) {
524 /* always save the device type ID so that our outgoing sysex messages
529 mackie_sysex_hdr[4] = bytes[4];
531 mackie_sysex_hdr_xt[4] = bytes[4];
537 LCP: Connection Challenge
539 if (bytes[4] == 0x10 || bytes[4] == 0x11) {
540 DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device connection challenge\n");
541 write_sysex (host_connection_query (bytes));
543 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mackie Control Device ready, current status = %1\n", _active));
550 case 0x03: /* LCP Connection Confirmation */
551 DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device confirms connection, ardour replies\n");
552 if (bytes[4] == 0x10 || bytes[4] == 0x11) {
553 write_sysex (host_connection_confirmation (bytes));
558 case 0x04: /* LCP: Confirmation Denied */
559 DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device denies connection\n");
563 error << "MCP: unknown sysex: " << bytes << endmsg;
568 calculate_challenge_response (MidiByteArray::iterator begin, MidiByteArray::iterator end)
571 back_insert_iterator<MidiByteArray> back (l);
572 copy (begin, end, back);
574 MidiByteArray retval;
576 // this is how to calculate the response to the challenge.
577 // from the Logic docs.
578 retval << (0x7f & (l[0] + (l[1] ^ 0xa) - l[3]));
579 retval << (0x7f & ( (l[2] >> l[3]) ^ (l[0] + l[3])));
580 retval << (0x7f & ((l[3] - (l[2] << 2)) ^ (l[0] | l[1])));
581 retval << (0x7f & (l[1] - l[2] + (0xf0 ^ (l[3] << 4))));
586 // not used right now
588 Surface::host_connection_query (MidiByteArray & bytes)
590 MidiByteArray response;
592 if (bytes[4] != 0x10 && bytes[4] != 0x11) {
593 /* not a Logic Control device - no response required */
597 // handle host connection query
598 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("host connection query: %1\n", bytes));
600 if (bytes.size() != 18) {
601 cerr << "expecting 18 bytes, read " << bytes << " from " << _port->input_port().name() << endl;
605 // build and send host connection reply
607 copy (bytes.begin() + 6, bytes.begin() + 6 + 7, back_inserter (response));
608 response << calculate_challenge_response (bytes.begin() + 6 + 7, bytes.begin() + 6 + 7 + 4);
612 // not used right now
614 Surface::host_connection_confirmation (const MidiByteArray & bytes)
616 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("host_connection_confirmation: %1\n", bytes));
618 // decode host connection confirmation
619 if (bytes.size() != 14) {
621 os << "expecting 14 bytes, read " << bytes << " from " << _port->input_port().name();
622 throw MackieControlException (os.str());
625 // send version request
626 return MidiByteArray (2, 0x13, 0x00);
630 Surface::turn_it_on ()
638 _mcp.device_ready ();
640 for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
644 update_view_mode_display ();
646 if (_mcp.device_info ().has_global_controls ()) {
647 _mcp.update_global_button (Button::Read, _mcp.metering_active ());
652 Surface::write_sysex (const MidiByteArray & mba)
659 buf << sysex_hdr() << mba << MIDI::eox;
664 Surface::write_sysex (MIDI::byte msg)
667 buf << sysex_hdr() << msg << MIDI::eox;
672 Surface::n_strips (bool with_locked_strips) const
674 if (with_locked_strips) {
675 return strips.size();
680 for (Strips::const_iterator it = strips.begin(); it != strips.end(); ++it) {
681 if (!(*it)->locked()) {
689 Surface::nth_strip (uint32_t n) const
691 if (n > n_strips()) {
700 if (_mcp.device_info().has_timecode_display ()) {
701 display_timecode (string (10, '0'), string (10, ' '));
704 if (_mcp.device_info().has_two_character_display()) {
705 show_two_char_display (string (2, '0'), string (2, ' '));
708 if (_mcp.device_info().has_master_fader () && _master_fader) {
709 _port->write (_master_fader->zero ());
713 for (Strips::iterator it = strips.begin(); it != strips.end(); ++it) {
721 Surface::zero_controls ()
723 if (!_mcp.device_info().has_global_controls()) {
727 // turn off global buttons and leds
728 // global buttons are only ever on mcu_port, so we don't have
729 // to figure out which port.
731 for (Controls::iterator it = controls.begin(); it != controls.end(); ++it) {
732 Control & control = **it;
733 if (!control.group().is_strip()) {
734 _port->write (control.zero());
738 // and the led ring for the master strip
741 _last_master_gain_written = 0.0f;
745 Surface::periodic (uint64_t now_usecs)
747 master_gain_changed();
748 for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
749 (*s)->periodic (now_usecs);
754 Surface::write (const MidiByteArray& data)
759 DEBUG_TRACE (DEBUG::MackieControl, "surface not active, write ignored\n");
764 Surface::map_routes (const vector<boost::shared_ptr<Route> >& routes)
766 vector<boost::shared_ptr<Route> >::const_iterator r;
767 Strips::iterator s = strips.begin();
769 DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mapping %1 routes", routes.size()));
771 for (r = routes.begin(); r != routes.end() && s != strips.end(); ++s) {
773 /* don't try to assign routes to a locked strip. it won't
774 use it anyway, but if we do, then we get out of sync
775 with the proposed mapping.
778 if (!(*s)->locked()) {
779 (*s)->set_route (*r);
784 for (; s != strips.end(); ++s) {
785 (*s)->set_route (boost::shared_ptr<Route>());
792 translate_seven_segment (char achar)
794 achar = toupper (achar);
796 if (achar >= 0x40 && achar <= 0x60) {
798 } else if (achar >= 0x21 && achar <= 0x3f) {
806 Surface::show_two_char_display (const std::string & msg, const std::string & dots)
808 if (_stype != mcu || !_mcp.device_info().has_two_character_display() || msg.length() != 2 || dots.length() != 2) {
812 MidiByteArray right (3, 0xb0, 0x4b, 0x00);
813 MidiByteArray left (3, 0xb0, 0x4a, 0x00);
815 right[2] = translate_seven_segment (msg[0]) + (dots[0] == '.' ? 0x40 : 0x00);
816 left[2] = translate_seven_segment (msg[1]) + (dots[1] == '.' ? 0x40 : 0x00);
818 _port->write (right);
823 Surface::show_two_char_display (unsigned int value, const std::string & /*dots*/)
826 os << setfill('0') << setw(2) << value % 100;
827 show_two_char_display (os.str());
831 Surface::display_timecode (const std::string & timecode, const std::string & last_timecode)
833 if (!_active || !_mcp.device_info().has_timecode_display()) {
836 // if there's no change, send nothing, not even sysex header
837 if (timecode == last_timecode) return;
839 // length sanity checking
840 string local_timecode = timecode;
842 // truncate to 10 characters
843 if (local_timecode.length() > 10) {
844 local_timecode = local_timecode.substr (0, 10);
847 // pad to 10 characters
848 while (local_timecode.length() < 10) {
849 local_timecode += " ";
852 // translate characters.
853 // Only the characters that actually changed are sent.
856 for (i = local_timecode.length () - 1; i >= 0; i--) {
858 if (local_timecode[i] == last_timecode[i]) {
861 MidiByteArray retval (2, 0xb0, position);
862 retval << translate_seven_segment (local_timecode[i]);
863 _port->write (retval);
868 Surface::update_flip_mode_display ()
870 for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
871 (*s)->flip_mode_changed (true);
876 Surface::update_view_mode_display ()
885 switch (_mcp.view_mode()) {
886 case MackieControlProtocol::Mixer:
887 show_two_char_display ("Mx");
890 case MackieControlProtocol::Dynamics:
891 show_two_char_display ("Dy");
894 case MackieControlProtocol::EQ:
895 show_two_char_display ("EQ");
898 case MackieControlProtocol::Loop:
899 show_two_char_display ("LP");
902 case MackieControlProtocol::AudioTracks:
903 show_two_char_display ("AT");
905 case MackieControlProtocol::MidiTracks:
906 show_two_char_display ("MT");
908 case MackieControlProtocol::Sends:
909 show_two_char_display ("Sn");
912 case MackieControlProtocol::Plugins:
913 show_two_char_display ("Pl");
922 /* we are attempting to turn a global button/LED on */
924 map<int,Control*>::iterator x = controls_by_device_independent_id.find (id);
926 if (x != controls_by_device_independent_id.end()) {
927 Button* button = dynamic_cast<Button*> (x->second);
929 _port->write (button->set_state (on));
935 for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
936 _port->write ((*s)->display (1, text));
942 Surface::gui_selection_changed (const ARDOUR::StrongRouteNotificationList& routes)
944 for (Strips::iterator s = strips.begin(); s != strips.end(); ++s) {
945 (*s)->gui_selection_changed (routes);
950 Surface::say_hello ()
952 /* wakeup for Mackie Control */
953 MidiByteArray wakeup (7, MIDI::sysex, 0x00, 0x00, 0x66, 0x14, 0x00, MIDI::eox);
954 _port->write (wakeup);
955 wakeup[4] = 0x15; /* wakup Mackie XT */
956 _port->write (wakeup);
957 wakeup[4] = 0x10; /* wakupe Logic Control */
958 _port->write (wakeup);
959 wakeup[4] = 0x11; /* wakeup Logic Control XT */
960 _port->write (wakeup);
964 Surface::next_jog_mode ()
969 Surface::set_jog_mode (JogWheel::Mode)
974 Surface::route_is_locked_to_strip (boost::shared_ptr<Route> r) const
976 for (Strips::const_iterator s = strips.begin(); s != strips.end(); ++s) {
977 if ((*s)->route() == r && (*s)->locked()) {
985 Surface::notify_metering_state_changed()
987 for (Strips::const_iterator s = strips.begin(); s != strips.end(); ++s) {
988 (*s)->notify_metering_state_changed ();