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