Make Mackie control surface LEDs for modifier keys only light while pressed. (fixes...
[ardour.git] / libs / surfaces / mackie / mcp_buttons.cc
1 /*
2         Copyright (C) 2006,2007 John Anderson
3         Copyright (C) 2012 Paul Davis
4
5         This program is free software; you can redistribute it and/or modify
6         it under the terms of the GNU General Public License as published by
7         the Free Software Foundation; either version 2 of the License, or
8         (at your option) any later version.
9
10         This program is distributed in the hope that it will be useful,
11         but WITHOUT ANY WARRANTY; without even the implied warranty of
12         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13         GNU General Public License for more details.
14
15         You should have received a copy of the GNU General Public License
16         along with this program; if not, write to the Free Software
17         Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #include <algorithm>
21
22 #include "pbd/memento_command.h"
23
24 #include "ardour/debug.h"
25 #include "ardour/session.h"
26 #include "ardour/route.h"
27 #include "ardour/location.h"
28 #include "ardour/rc_configuration.h"
29
30 #include "mackie_control_protocol.h"
31 #include "surface.h"
32 #include "fader.h"
33
34 #include "i18n.h"
35
36 /* handlers for all buttons, broken into a separate file to avoid clutter in
37  * mackie_control_protocol.cc 
38  */
39
40 using std::string;
41 using namespace ARDOUR;
42 using namespace PBD;
43 using namespace ArdourSurface;
44 using namespace Mackie;
45
46 LedState
47 MackieControlProtocol::shift_press (Button &)
48 {
49         _modifier_state |= MODIFIER_SHIFT;
50         return on;
51 }
52 LedState
53 MackieControlProtocol::shift_release (Button &)
54 {
55         _modifier_state &= ~MODIFIER_SHIFT;
56         return off;
57 }
58 LedState
59 MackieControlProtocol::option_press (Button &)
60 {
61         _modifier_state |= MODIFIER_OPTION;
62         return on;
63 }
64 LedState
65 MackieControlProtocol::option_release (Button &)
66 {
67         _modifier_state &= ~MODIFIER_OPTION;
68         return off;
69 }
70 LedState
71 MackieControlProtocol::control_press (Button &)
72 {
73         _modifier_state |= MODIFIER_CONTROL;
74         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Press: modifier state now set to %1\n", _modifier_state));
75         return on;
76 }
77 LedState
78 MackieControlProtocol::control_release (Button &)
79 {
80         _modifier_state &= ~MODIFIER_CONTROL;
81         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Release: modifier state now set to %1\n", _modifier_state));
82         return off;
83 }
84 LedState
85 MackieControlProtocol::cmd_alt_press (Button &)
86 {
87         _modifier_state |= MODIFIER_CMDALT;
88         return on;
89 }
90 LedState
91 MackieControlProtocol::cmd_alt_release (Button &)
92 {
93         _modifier_state &= ~MODIFIER_CMDALT;
94         return off;
95 }
96
97 LedState 
98 MackieControlProtocol::left_press (Button &)
99 {
100         Sorted sorted = get_sorted_routes();
101         uint32_t strip_cnt = n_strips (); 
102
103         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank left with current initial = %1 nstrips = %2 tracks/busses = %3\n",
104                                                            _current_initial_bank, strip_cnt, sorted.size()));
105         if (_current_initial_bank > 0) {
106                 switch_banks ((_current_initial_bank - 1) / strip_cnt * strip_cnt);
107         } else {
108                 switch_banks (0);
109         }
110
111
112         return on;
113 }
114
115 LedState 
116 MackieControlProtocol::left_release (Button &)
117 {
118         return off;
119 }
120
121 LedState 
122 MackieControlProtocol::right_press (Button &)
123 {
124         Sorted sorted = get_sorted_routes();
125         uint32_t strip_cnt = n_strips();
126         uint32_t route_cnt = sorted.size();
127         uint32_t max_bank = route_cnt / strip_cnt * strip_cnt;
128
129
130         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank right with current initial = %1 nstrips = %2 tracks/busses = %3\n",
131                                                            _current_initial_bank, strip_cnt, route_cnt));
132
133         if (_current_initial_bank < max_bank) {
134                 uint32_t new_initial = (_current_initial_bank / strip_cnt * strip_cnt) + strip_cnt;
135
136                 switch_banks (new_initial);
137         } else {
138                 switch_banks (max_bank);
139         }
140
141         return on;
142 }
143
144 LedState 
145 MackieControlProtocol::right_release (Button &)
146 {
147         if (_zoom_mode) {
148
149         }
150
151         return off;
152 }
153
154 LedState
155 MackieControlProtocol::cursor_left_press (Button& )
156 {
157         if (_zoom_mode) {
158
159                 if (_modifier_state & MODIFIER_OPTION) {
160                         /* reset selected tracks to default vertical zoom */
161                 } else {
162                         ZoomOut (); /* EMIT SIGNAL */
163                 }
164         } else {
165                 float page_fraction;
166                 if (_modifier_state == MODIFIER_CONTROL) {
167                         page_fraction = 1.0;
168                 } else if (_modifier_state == MODIFIER_OPTION) {
169                         page_fraction = 0.1;
170                 } else if (_modifier_state == MODIFIER_SHIFT) {
171                         page_fraction = 2.0;
172                 } else {
173                         page_fraction = 0.25;
174                 }
175
176                 ScrollTimeline (-page_fraction);
177         }
178
179         return off;
180 }
181
182 LedState
183 MackieControlProtocol::cursor_left_release (Button&)
184 {
185         return off;
186 }
187
188 LedState
189 MackieControlProtocol::cursor_right_press (Button& )
190 {
191         if (_zoom_mode) {
192                 
193                 if (_modifier_state & MODIFIER_OPTION) {
194                         /* reset selected tracks to default vertical zoom */
195                 } else {
196                         ZoomIn (); /* EMIT SIGNAL */
197                 }
198         } else {
199                 float page_fraction;
200                 if (_modifier_state == MODIFIER_CONTROL) {
201                         page_fraction = 1.0;
202                 } else if (_modifier_state == MODIFIER_OPTION) {
203                         page_fraction = 0.1;
204                 } else if (_modifier_state == MODIFIER_SHIFT) {
205                         page_fraction = 2.0;
206                 } else {
207                         page_fraction = 0.25;
208                 }
209
210                 ScrollTimeline (page_fraction);
211         }
212                         
213         return off;
214 }
215
216 LedState
217 MackieControlProtocol::cursor_right_release (Button&)
218 {
219         return off;
220 }
221
222 LedState
223 MackieControlProtocol::cursor_up_press (Button&)
224 {
225         if (_zoom_mode) {
226                 
227                 if (_modifier_state & MODIFIER_CONTROL) {
228                         VerticalZoomInSelected (); /* EMIT SIGNAL */
229                 } else {
230                         VerticalZoomInAll (); /* EMIT SIGNAL */
231                 }
232         } else {
233                 StepTracksUp (); /* EMIT SIGNAL */
234         }
235         return off;
236 }
237
238 LedState
239 MackieControlProtocol::cursor_up_release (Button&)
240 {
241         return off;
242 }
243
244 LedState
245 MackieControlProtocol::cursor_down_press (Button&)
246 {
247         if (_zoom_mode) {
248                 if (_modifier_state & MODIFIER_OPTION) {
249                         VerticalZoomOutSelected (); /* EMIT SIGNAL */
250                 } else {
251                         VerticalZoomOutAll (); /* EMIT SIGNAL */
252                 }
253         } else {
254                 StepTracksDown (); /* EMIT SIGNAL */
255         }
256         return off;
257 }
258
259 LedState
260 MackieControlProtocol::cursor_down_release (Button&)
261 {
262         return off;
263 }
264
265 LedState 
266 MackieControlProtocol::channel_left_press (Button &)
267 {
268         Sorted sorted = get_sorted_routes();
269         if (sorted.size() > n_strips()) {
270                 prev_track();
271                 return on;
272         } else {
273                 return flashing;
274         }
275 }
276
277 LedState 
278 MackieControlProtocol::channel_left_release (Button &)
279 {
280         return off;
281 }
282
283 LedState 
284 MackieControlProtocol::channel_right_press (Button &)
285 {
286         Sorted sorted = get_sorted_routes();
287         if (sorted.size() > n_strips()) {
288                 next_track();
289                 return on;
290         } else {
291                 return flashing;
292         }
293 }
294
295 LedState 
296 MackieControlProtocol::channel_right_release (Button &)
297 {
298         return off;
299 }
300
301 Mackie::LedState 
302 MackieControlProtocol::zoom_press (Mackie::Button &)
303 {
304         _zoom_mode = !_zoom_mode;
305         return (_zoom_mode ? on : off);
306 }
307
308 Mackie::LedState 
309 MackieControlProtocol::zoom_release (Mackie::Button &)
310 {
311         return (_zoom_mode ? on : off);
312 }
313
314 Mackie::LedState 
315 MackieControlProtocol::scrub_press (Mackie::Button &)
316 {
317         if (!surfaces.empty()) {
318                 // surfaces.front()->next_jog_mode ();
319                 _master_surface->next_jog_mode ();
320         }
321         return none;
322 }
323
324 Mackie::LedState 
325 MackieControlProtocol::scrub_release (Mackie::Button &)
326 {
327         return none;
328 }
329
330 LedState
331 MackieControlProtocol::undo_press (Button&)
332 {
333         if (_modifier_state & MODIFIER_SHIFT) {
334                 Redo(); /* EMIT SIGNAL */
335         } else {
336                 Undo(); /* EMIT SIGNAL */
337         }
338         return off;
339 }
340
341 LedState
342 MackieControlProtocol::undo_release (Button&)
343 {
344         return off;
345 }
346
347 LedState 
348 MackieControlProtocol::drop_press (Button &)
349 {
350         session->remove_last_capture();
351         return on;
352 }
353
354 LedState 
355 MackieControlProtocol::drop_release (Button &)
356 {
357         return off;
358 }
359
360 LedState 
361 MackieControlProtocol::save_press (Button &)
362 {
363         session->save_state ("");
364         return on;
365 }
366
367 LedState 
368 MackieControlProtocol::save_release (Button &)
369 {
370         return off;
371 }
372
373 LedState 
374 MackieControlProtocol::timecode_beats_press (Button &)
375 {
376         switch (_timecode_type) {
377         case ARDOUR::AnyTime::BBT:
378                 _timecode_type = ARDOUR::AnyTime::Timecode;
379                 break;
380         case ARDOUR::AnyTime::Timecode:
381                 _timecode_type = ARDOUR::AnyTime::BBT;
382                 break;
383         default:
384                 return off;
385         }
386
387         update_timecode_beats_led();
388
389         return on;
390 }
391
392 LedState 
393 MackieControlProtocol::timecode_beats_release (Button &)
394 {
395         return off;
396 }
397
398 /////////////////////////////////////
399 // Functions
400 /////////////////////////////////////
401 LedState 
402 MackieControlProtocol::marker_press (Button &)
403 {
404         string markername;
405
406         session->locations()->next_available_name (markername,"mcu");
407         add_marker (markername);
408
409         return on;
410 }
411
412 LedState 
413 MackieControlProtocol::marker_release (Button &)
414 {
415         return off;
416 }
417
418 /////////////////////////////////////
419 // Transport Buttons
420 /////////////////////////////////////
421
422 LedState 
423 MackieControlProtocol::stop_press (Button &)
424 {
425         transport_stop ();
426         return on;
427 }
428
429 LedState 
430 MackieControlProtocol::stop_release (Button &)
431 {
432         return session->transport_stopped();
433 }
434
435 LedState 
436 MackieControlProtocol::play_press (Button &)
437 {
438         /* if we're already rolling at normal speed, and we're pressed
439            again, jump back to where we started last time
440         */
441
442         transport_play (session->transport_speed() == 1.0);
443         return none;
444 }
445
446 LedState 
447 MackieControlProtocol::play_release (Button &)
448 {
449         return none;
450 }
451
452 LedState 
453 MackieControlProtocol::record_press (Button &)
454 {
455         rec_enable_toggle ();
456         return none;
457 }
458
459 LedState 
460 MackieControlProtocol::record_release (Button &)
461 {
462         return none;
463 }
464
465 LedState 
466 MackieControlProtocol::rewind_press (Button &)
467 {
468         if (_modifier_state == MODIFIER_CONTROL) {
469                 goto_start ();
470         } else {
471                 rewind ();
472         }
473         return none;
474 }
475
476 LedState 
477 MackieControlProtocol::rewind_release (Button &)
478 {
479         return none;
480 }
481
482 LedState 
483 MackieControlProtocol::ffwd_press (Button &)
484 {
485         if (_modifier_state == MODIFIER_CONTROL) {
486                 goto_end();
487         } else {
488                 ffwd ();
489         }
490         return none;
491 }
492
493 LedState 
494 MackieControlProtocol::ffwd_release (Button &)
495 {
496         return none;
497 }
498
499 LedState 
500 MackieControlProtocol::loop_press (Button &)
501 {
502         if (_modifier_state & MODIFIER_CONTROL) {
503                 set_view_mode (Loop);
504                 return on;
505         } else {
506                 session->request_play_loop (!session->get_play_loop());
507                 return none;
508         }
509 }
510
511 LedState 
512 MackieControlProtocol::loop_release (Button &)
513 {
514         return none;
515 }
516
517 LedState 
518 MackieControlProtocol::clicking_press (Button &)
519 {
520         bool state = !Config->get_clicking();
521         Config->set_clicking (state);
522         return state;
523 }
524
525 LedState 
526 MackieControlProtocol::clicking_release (Button &)
527 {
528         return Config->get_clicking();
529 }
530
531 LedState MackieControlProtocol::global_solo_press (Button &)
532 {
533         bool state = !session->soloing();
534         session->set_solo (session->get_routes(), state);
535         return state;
536 }
537
538 LedState MackieControlProtocol::global_solo_release (Button &)
539 {
540         return session->soloing();
541 }
542
543 LedState
544 MackieControlProtocol::enter_press (Button &) 
545
546         Enter(); /* EMIT SIGNAL */
547         return off;
548 }
549
550 LedState
551 MackieControlProtocol::enter_release (Button &) 
552
553         return off;
554 }
555
556 LedState
557 MackieControlProtocol::F1_press (Button &) 
558
559         return off; 
560 }
561 LedState
562 MackieControlProtocol::F1_release (Button &) 
563
564         return off; 
565 }
566 LedState
567 MackieControlProtocol::F2_press (Button &) 
568
569         return off; 
570 }
571 LedState
572 MackieControlProtocol::F2_release (Button &) 
573
574         return off; 
575 }
576 LedState
577 MackieControlProtocol::F3_press (Button &) 
578
579         return off; 
580 }
581 LedState
582 MackieControlProtocol::F3_release (Button &) 
583
584         return off; 
585 }
586 LedState
587 MackieControlProtocol::F4_press (Button &) 
588
589         return off; 
590 }
591 LedState
592 MackieControlProtocol::F4_release (Button &) 
593
594         return off; 
595 }
596 LedState
597 MackieControlProtocol::F5_press (Button &) 
598
599         return off; 
600 }
601 LedState
602 MackieControlProtocol::F5_release (Button &) 
603
604         return off; 
605 }
606 LedState
607 MackieControlProtocol::F6_press (Button &) 
608
609         return off; 
610 }
611 LedState
612 MackieControlProtocol::F6_release (Button &) 
613
614         return off; 
615 }
616 LedState
617 MackieControlProtocol::F7_press (Button &) 
618
619         return off; 
620 }
621 LedState
622 MackieControlProtocol::F7_release (Button &) 
623
624         return off; 
625 }
626 LedState
627 MackieControlProtocol::F8_press (Button &) 
628
629         CloseDialog (); /* EMIT SIGNAL */
630         return off; 
631 }
632 LedState
633 MackieControlProtocol::F8_release (Button &) 
634
635         return off; 
636 }
637
638 /* UNIMPLEMENTED */
639
640 LedState
641 MackieControlProtocol::pan_press (Button &) 
642
643         return off; 
644 }
645 LedState
646 MackieControlProtocol::pan_release (Button &) 
647
648         return off; 
649 }
650 LedState
651 MackieControlProtocol::plugin_press (Button &) 
652
653         return off; 
654 }
655 LedState
656 MackieControlProtocol::plugin_release (Button &) 
657
658         return off; 
659 }
660 LedState
661 MackieControlProtocol::eq_press (Button &) 
662
663         set_view_mode (EQ);
664         return on;
665 }
666 LedState
667 MackieControlProtocol::eq_release (Button &) 
668
669         return none;
670 }
671 LedState
672 MackieControlProtocol::dyn_press (Button &) 
673
674         set_view_mode (Dynamics);
675         return on;
676 }
677 LedState
678 MackieControlProtocol::dyn_release (Button &) 
679
680         return none;
681 }
682 LedState
683 MackieControlProtocol::flip_press (Button &) 
684
685         if (_flip_mode != Normal) {
686                 set_flip_mode (Normal);
687         } else {
688                 set_flip_mode (Mirror);
689         }
690         return ((_flip_mode != Normal) ? on : off);
691 }
692 LedState
693 MackieControlProtocol::flip_release (Button &) 
694
695         return none;
696 }
697 LedState
698 MackieControlProtocol::name_value_press (Button &) 
699
700         return off; 
701 }
702 LedState
703 MackieControlProtocol::name_value_release (Button &) 
704
705         return off; 
706 }
707 LedState
708 MackieControlProtocol::touch_press (Button &) 
709
710         return off; 
711 }
712 LedState
713 MackieControlProtocol::touch_release (Button &) 
714
715         return off; 
716 }
717 LedState
718 MackieControlProtocol::cancel_press (Button &) 
719
720         return off; 
721 }
722 LedState
723 MackieControlProtocol::cancel_release (Button &) 
724
725         return off; 
726 }
727 LedState
728 MackieControlProtocol::user_a_press (Button &) 
729
730         transport_play (session->transport_speed() == 1.0);
731         return off; 
732 }
733 LedState
734 MackieControlProtocol::user_a_release (Button &) 
735
736         return off; 
737 }
738 LedState
739 MackieControlProtocol::user_b_press (Button &) 
740
741         transport_stop();
742         return off; 
743 }
744 LedState
745 MackieControlProtocol::user_b_release (Button &) 
746
747         return off; 
748 }
749
750 LedState
751 MackieControlProtocol::master_fader_touch_press (Mackie::Button &)
752 {
753         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_press\n");
754
755         Fader* master_fader = _master_surface->master_fader();
756
757         boost::shared_ptr<AutomationControl> ac = master_fader->control ();
758
759         master_fader->set_in_use (true);
760         master_fader->start_touch (transport_frame());
761
762         return none;
763 }
764 LedState
765 MackieControlProtocol::master_fader_touch_release (Mackie::Button &)
766 {
767         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_release\n");
768
769         Fader* master_fader = _master_surface->master_fader();
770
771         master_fader->set_in_use (false);
772         master_fader->stop_touch (transport_frame(), true);
773
774         return none;
775 }
776
777 Mackie::LedState 
778 MackieControlProtocol::read_press (Mackie::Button&) 
779 {
780         _metering_active = !_metering_active;
781         notify_metering_state_changed ();
782         return _metering_active;
783 }
784 Mackie::LedState 
785 MackieControlProtocol::read_release (Mackie::Button&) 
786 {
787         return _metering_active;
788 }
789 Mackie::LedState 
790 MackieControlProtocol::write_press (Mackie::Button&) 
791 {
792         return none;
793 }
794 Mackie::LedState 
795 MackieControlProtocol::write_release (Mackie::Button&) 
796 {
797         return none;
798 }
799 Mackie::LedState 
800 MackieControlProtocol::clearsolo_press (Mackie::Button&) 
801 {
802         return none;
803 }
804 Mackie::LedState 
805 MackieControlProtocol::clearsolo_release (Mackie::Button&) 
806 {
807         return none;
808 }
809 Mackie::LedState 
810 MackieControlProtocol::track_press (Mackie::Button&) 
811 {
812
813         return none;
814 }
815 Mackie::LedState 
816 MackieControlProtocol::track_release (Mackie::Button&) 
817 {
818         return none;
819 }
820 Mackie::LedState 
821 MackieControlProtocol::send_press (Mackie::Button&) 
822 {
823 // code moved here from "sends_press"
824         set_view_mode (Sends);
825         return on;
826 //      return none;
827 }
828 Mackie::LedState 
829 MackieControlProtocol::send_release (Mackie::Button&) 
830 {
831         return none;
832 }
833 Mackie::LedState 
834 MackieControlProtocol::miditracks_press (Mackie::Button&) 
835 {
836         return none;
837 }
838 Mackie::LedState 
839 MackieControlProtocol::miditracks_release (Mackie::Button&) 
840 {
841         return none;
842 }
843 Mackie::LedState 
844 MackieControlProtocol::inputs_press (Mackie::Button&) 
845 {
846         return none;
847 }
848 Mackie::LedState 
849 MackieControlProtocol::inputs_release (Mackie::Button&) 
850 {
851         return none;
852 }
853 Mackie::LedState 
854 MackieControlProtocol::audiotracks_press (Mackie::Button&) 
855 {
856         return none;
857 }
858 Mackie::LedState 
859 MackieControlProtocol::audiotracks_release (Mackie::Button&) 
860 {
861         return none;
862 }
863 Mackie::LedState 
864 MackieControlProtocol::audioinstruments_press (Mackie::Button&) 
865 {
866         return none;
867 }
868 Mackie::LedState 
869 MackieControlProtocol::audioinstruments_release (Mackie::Button&) 
870 {
871         return none;
872 }
873 Mackie::LedState 
874 MackieControlProtocol::aux_press (Mackie::Button&) 
875 {
876         return none;
877 }
878 Mackie::LedState 
879 MackieControlProtocol::aux_release (Mackie::Button&) 
880 {
881         return none;
882 }
883 Mackie::LedState 
884 MackieControlProtocol::busses_press (Mackie::Button&) 
885 {
886         return none;
887 }
888 Mackie::LedState 
889 MackieControlProtocol::busses_release (Mackie::Button&) 
890 {
891         return none;
892 }
893 Mackie::LedState 
894 MackieControlProtocol::outputs_press (Mackie::Button&) 
895 {
896         return none;
897 }
898 Mackie::LedState 
899 MackieControlProtocol::outputs_release (Mackie::Button&) 
900 {
901         return none;
902 }
903 Mackie::LedState 
904 MackieControlProtocol::user_press (Mackie::Button&) 
905 {
906         return none;
907 }
908 Mackie::LedState 
909 MackieControlProtocol::user_release (Mackie::Button&) 
910 {
911         return none;
912 }
913 Mackie::LedState 
914 MackieControlProtocol::trim_press (Mackie::Button&) 
915 {
916         return none;
917 }
918 Mackie::LedState 
919 MackieControlProtocol::trim_release (Mackie::Button&) 
920 {
921         return none;
922 }
923 Mackie::LedState 
924 MackieControlProtocol::latch_press (Mackie::Button&) 
925 {
926         return none;
927 }
928 Mackie::LedState 
929 MackieControlProtocol::latch_release (Mackie::Button&) 
930 {
931         return none;
932 }
933 Mackie::LedState 
934 MackieControlProtocol::grp_press (Mackie::Button&) 
935 {
936         return none;
937 }
938 Mackie::LedState 
939 MackieControlProtocol::grp_release (Mackie::Button&) 
940 {
941         return none;
942 }
943 Mackie::LedState 
944 MackieControlProtocol::nudge_press (Mackie::Button&) 
945 {
946         return none;
947 }
948 Mackie::LedState 
949 MackieControlProtocol::nudge_release (Mackie::Button&) 
950 {
951         return none;
952 }
953 Mackie::LedState 
954 MackieControlProtocol::replace_press (Mackie::Button&) 
955 {
956         return none;
957 }
958 Mackie::LedState 
959 MackieControlProtocol::replace_release (Mackie::Button&) 
960 {
961         return none;
962 }
963 Mackie::LedState 
964 MackieControlProtocol::click_press (Mackie::Button&) 
965 {
966         return none;
967 }
968 Mackie::LedState 
969 MackieControlProtocol::click_release (Mackie::Button&) 
970 {
971         return none;
972 }
973 Mackie::LedState 
974 MackieControlProtocol::view_press (Mackie::Button&) 
975 {
976         return none;
977 }
978 Mackie::LedState 
979 MackieControlProtocol::view_release (Mackie::Button&) 
980 {
981         return none;
982 }