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