Fix some uninitialised variable warnings.
[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 namespace Mackie;
41 using namespace ARDOUR;
42 using namespace PBD;
43 using std::string;
44
45 LedState
46 MackieControlProtocol::shift_press (Button &)
47 {
48         _modifier_state |= MODIFIER_SHIFT;
49         return on;
50 }
51 LedState
52 MackieControlProtocol::shift_release (Button &)
53 {
54         _modifier_state &= ~MODIFIER_SHIFT;
55         return on;
56 }
57 LedState
58 MackieControlProtocol::option_press (Button &)
59 {
60         _modifier_state |= MODIFIER_OPTION;
61         return on;
62 }
63 LedState
64 MackieControlProtocol::option_release (Button &)
65 {
66         _modifier_state &= ~MODIFIER_OPTION;
67         return on;
68 }
69 LedState
70 MackieControlProtocol::control_press (Button &)
71 {
72         _modifier_state |= MODIFIER_CONTROL;
73         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Press: modifier state now set to %1\n", _modifier_state));
74         return on;
75 }
76 LedState
77 MackieControlProtocol::control_release (Button &)
78 {
79         _modifier_state &= ~MODIFIER_CONTROL;
80         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Release: modifier state now set to %1\n", _modifier_state));
81         return on;
82 }
83 LedState
84 MackieControlProtocol::cmd_alt_press (Button &)
85 {
86         _modifier_state |= MODIFIER_CMDALT;
87         return on;
88 }
89 LedState
90 MackieControlProtocol::cmd_alt_release (Button &)
91 {
92         _modifier_state &= ~MODIFIER_CMDALT;
93         return on;
94 }
95
96 LedState 
97 MackieControlProtocol::left_press (Button &)
98 {
99         Sorted sorted = get_sorted_routes();
100         uint32_t strip_cnt = n_strips (); 
101
102         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank left with current initial = %1 nstrips = %2 tracks/busses = %3\n",
103                                                            _current_initial_bank, strip_cnt, sorted.size()));
104
105         if (_current_initial_bank > strip_cnt) {
106                 switch_banks (_current_initial_bank - strip_cnt);
107         } else {
108                 switch_banks (0);
109         }
110
111         return on;
112 }
113
114 LedState 
115 MackieControlProtocol::left_release (Button &)
116 {
117         return off;
118 }
119
120 LedState 
121 MackieControlProtocol::right_press (Button &)
122 {
123         Sorted sorted = get_sorted_routes();
124         uint32_t strip_cnt = n_strips();
125         uint32_t route_cnt = sorted.size();
126
127         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank right with current initial = %1 nstrips = %2 tracks/busses = %3\n",
128                                                            _current_initial_bank, strip_cnt, route_cnt));
129
130         uint32_t new_initial = std::min (_current_initial_bank + strip_cnt, route_cnt - 1);
131         switch_banks (new_initial);
132
133         return on;
134 }
135
136 LedState 
137 MackieControlProtocol::right_release (Button &)
138 {
139         if (_zoom_mode) {
140
141         }
142
143         return off;
144 }
145
146 LedState
147 MackieControlProtocol::cursor_left_press (Button& )
148 {
149         if (_zoom_mode) {
150
151                 if (_modifier_state & MODIFIER_OPTION) {
152                         /* reset selected tracks to default vertical zoom */
153                 } else {
154                         ZoomOut (); /* EMIT SIGNAL */
155                 }
156         } else {
157                 float page_fraction;
158                 if (_modifier_state == MODIFIER_CONTROL) {
159                         page_fraction = 1.0;
160                 } else if (_modifier_state == MODIFIER_OPTION) {
161                         page_fraction = 0.1;
162                 } else if (_modifier_state == MODIFIER_SHIFT) {
163                         page_fraction = 2.0;
164                 } else {
165                         page_fraction = 0.25;
166                 }
167
168                 ScrollTimeline (-page_fraction);
169         }
170
171         return off;
172 }
173
174 LedState
175 MackieControlProtocol::cursor_left_release (Button&)
176 {
177         return off;
178 }
179
180 LedState
181 MackieControlProtocol::cursor_right_press (Button& )
182 {
183         if (_zoom_mode) {
184                 
185                 if (_modifier_state & MODIFIER_OPTION) {
186                         /* reset selected tracks to default vertical zoom */
187                 } else {
188                         ZoomIn (); /* EMIT SIGNAL */
189                 }
190         } else {
191                 float page_fraction;
192                 if (_modifier_state == MODIFIER_CONTROL) {
193                         page_fraction = 1.0;
194                 } else if (_modifier_state == MODIFIER_OPTION) {
195                         page_fraction = 0.1;
196                 } else if (_modifier_state == MODIFIER_SHIFT) {
197                         page_fraction = 2.0;
198                 } else {
199                         page_fraction = 0.25;
200                 }
201
202                 ScrollTimeline (page_fraction);
203         }
204                         
205         return off;
206 }
207
208 LedState
209 MackieControlProtocol::cursor_right_release (Button&)
210 {
211         return off;
212 }
213
214 LedState
215 MackieControlProtocol::cursor_up_press (Button&)
216 {
217         if (_zoom_mode) {
218                 
219                 if (_modifier_state & MODIFIER_CONTROL) {
220                         VerticalZoomInSelected (); /* EMIT SIGNAL */
221                 } else {
222                         VerticalZoomInAll (); /* EMIT SIGNAL */
223                 }
224         } else {
225                 StepTracksUp (); /* EMIT SIGNAL */
226         }
227         return off;
228 }
229
230 LedState
231 MackieControlProtocol::cursor_up_release (Button&)
232 {
233         return off;
234 }
235
236 LedState
237 MackieControlProtocol::cursor_down_press (Button&)
238 {
239         if (_zoom_mode) {
240                 if (_modifier_state & MODIFIER_OPTION) {
241                         VerticalZoomOutSelected (); /* EMIT SIGNAL */
242                 } else {
243                         VerticalZoomOutAll (); /* EMIT SIGNAL */
244                 }
245         } else {
246                 StepTracksDown (); /* EMIT SIGNAL */
247         }
248         return off;
249 }
250
251 LedState
252 MackieControlProtocol::cursor_down_release (Button&)
253 {
254         return off;
255 }
256
257 LedState 
258 MackieControlProtocol::channel_left_press (Button &)
259 {
260         Sorted sorted = get_sorted_routes();
261         if (sorted.size() > n_strips()) {
262                 prev_track();
263                 return on;
264         } else {
265                 return flashing;
266         }
267 }
268
269 LedState 
270 MackieControlProtocol::channel_left_release (Button &)
271 {
272         return off;
273 }
274
275 LedState 
276 MackieControlProtocol::channel_right_press (Button &)
277 {
278         Sorted sorted = get_sorted_routes();
279         if (sorted.size() > n_strips()) {
280                 next_track();
281                 return on;
282         } else {
283                 return flashing;
284         }
285 }
286
287 LedState 
288 MackieControlProtocol::channel_right_release (Button &)
289 {
290         return off;
291 }
292
293 Mackie::LedState 
294 MackieControlProtocol::zoom_press (Mackie::Button &)
295 {
296         _zoom_mode = !_zoom_mode;
297         return (_zoom_mode ? on : off);
298 }
299
300 Mackie::LedState 
301 MackieControlProtocol::zoom_release (Mackie::Button &)
302 {
303         return (_zoom_mode ? on : off);
304 }
305
306 Mackie::LedState 
307 MackieControlProtocol::scrub_press (Mackie::Button &)
308 {
309         if (!surfaces.empty()) {
310                 surfaces.front()->next_jog_mode ();
311         }
312         return none;
313 }
314
315 Mackie::LedState 
316 MackieControlProtocol::scrub_release (Mackie::Button &)
317 {
318         return none;
319 }
320
321 LedState
322 MackieControlProtocol::undo_press (Button&)
323 {
324         if (_modifier_state & MODIFIER_SHIFT) {
325                 Redo(); /* EMIT SIGNAL */
326         } else {
327                 Undo(); /* EMIT SIGNAL */
328         }
329         return off;
330 }
331
332 LedState
333 MackieControlProtocol::undo_release (Button&)
334 {
335         return off;
336 }
337
338 LedState
339 MackieControlProtocol::redo_press (Button&)
340 {
341         Redo(); /* EMIT SIGNAL */
342         return off;
343 }
344
345 LedState
346 MackieControlProtocol::redo_release (Button&)
347 {
348         return off;
349 }
350
351 LedState 
352 MackieControlProtocol::drop_press (Button &)
353 {
354         session->remove_last_capture();
355         return on;
356 }
357
358 LedState 
359 MackieControlProtocol::drop_release (Button &)
360 {
361         return off;
362 }
363
364 LedState 
365 MackieControlProtocol::save_press (Button &)
366 {
367         session->save_state ("");
368         return on;
369 }
370
371 LedState 
372 MackieControlProtocol::save_release (Button &)
373 {
374         return off;
375 }
376
377 LedState 
378 MackieControlProtocol::timecode_beats_press (Button &)
379 {
380         switch (_timecode_type) {
381         case ARDOUR::AnyTime::BBT:
382                 _timecode_type = ARDOUR::AnyTime::Timecode;
383                 break;
384         case ARDOUR::AnyTime::Timecode:
385                 _timecode_type = ARDOUR::AnyTime::BBT;
386                 break;
387         default:
388                 return off;
389         }
390
391         update_timecode_beats_led();
392
393         return on;
394 }
395
396 LedState 
397 MackieControlProtocol::timecode_beats_release (Button &)
398 {
399         return off;
400 }
401
402 /////////////////////////////////////
403 // Functions
404 /////////////////////////////////////
405 LedState 
406 MackieControlProtocol::marker_press (Button &)
407 {
408         string markername;
409
410         session->locations()->next_available_name (markername,"mcu");
411         add_marker (markername);
412
413         return on;
414 }
415
416 LedState 
417 MackieControlProtocol::marker_release (Button &)
418 {
419         return off;
420 }
421
422 /////////////////////////////////////
423 // Transport Buttons
424 /////////////////////////////////////
425
426 LedState 
427 MackieControlProtocol::frm_left_press (Button &)
428 {
429         // can use first_mark_before/after as well
430         unsigned long elapsed = _frm_left_last.restart();
431
432         Location * loc = session->locations()->first_location_before (session->transport_frame());
433
434         // allow a quick double to go past a previous mark
435         if (session->transport_rolling() && elapsed < 500 && loc != 0) {
436                 Location * loc_two_back = session->locations()->first_location_before (loc->start());
437                 if (loc_two_back != 0)
438                 {
439                         loc = loc_two_back;
440                 }
441         }
442
443         // move to the location, if it's valid
444         if (loc != 0) {
445                 session->request_locate (loc->start(), session->transport_rolling());
446         } else {
447                 session->request_locate (session->locations()->session_range_location()->start(), session->transport_rolling());
448         }
449
450         return on;
451 }
452
453 LedState 
454 MackieControlProtocol::frm_left_release (Button &)
455 {
456         return off;
457 }
458
459 LedState 
460 MackieControlProtocol::frm_right_press (Button &)
461 {
462         // can use first_mark_before/after as well
463         Location * loc = session->locations()->first_location_after (session->transport_frame());
464         
465         if (loc != 0) {
466                 session->request_locate (loc->start(), session->transport_rolling());
467         } else {
468                 session->request_locate (session->locations()->session_range_location()->end(), session->transport_rolling());
469         }
470                 
471         return on;
472 }
473
474 LedState 
475 MackieControlProtocol::frm_right_release (Button &)
476 {
477         return off;
478 }
479
480 LedState 
481 MackieControlProtocol::stop_press (Button &)
482 {
483         transport_stop ();
484         return on;
485 }
486
487 LedState 
488 MackieControlProtocol::stop_release (Button &)
489 {
490         return session->transport_stopped();
491 }
492
493 LedState 
494 MackieControlProtocol::play_press (Button &)
495 {
496         /* if we're already rolling at normal speed, and we're pressed
497            again, jump back to where we started last time
498         */
499
500         transport_play (session->transport_speed() == 1.0);
501         return none;
502 }
503
504 LedState 
505 MackieControlProtocol::play_release (Button &)
506 {
507         return none;
508 }
509
510 LedState 
511 MackieControlProtocol::record_press (Button &)
512 {
513         rec_enable_toggle ();
514         return none;
515 }
516
517 LedState 
518 MackieControlProtocol::record_release (Button &)
519 {
520         return none;
521 }
522
523 LedState 
524 MackieControlProtocol::rewind_press (Button &)
525 {
526         if (_modifier_state == MODIFIER_CONTROL) {
527                 goto_start ();
528         } else {
529                 rewind ();
530         }
531         return none;
532 }
533
534 LedState 
535 MackieControlProtocol::rewind_release (Button &)
536 {
537         return none;
538 }
539
540 LedState 
541 MackieControlProtocol::ffwd_press (Button &)
542 {
543         if (_modifier_state == MODIFIER_CONTROL) {
544                 goto_end();
545         } else {
546                 ffwd ();
547         }
548         return none;
549 }
550
551 LedState 
552 MackieControlProtocol::ffwd_release (Button &)
553 {
554         return none;
555 }
556
557 LedState 
558 MackieControlProtocol::loop_press (Button &)
559 {
560         if (_modifier_state & MODIFIER_CONTROL) {
561                 set_view_mode (Loop);
562                 return on;
563         } else {
564                 session->request_play_loop (!session->get_play_loop());
565                 return none;
566         }
567 }
568
569 LedState 
570 MackieControlProtocol::loop_release (Button &)
571 {
572         return none;
573 }
574
575 LedState 
576 MackieControlProtocol::punch_in_press (Button &)
577 {
578         bool const state = !session->config.get_punch_in();
579         session->config.set_punch_in (state);
580         return state;
581 }
582
583 LedState 
584 MackieControlProtocol::punch_in_release (Button &)
585 {
586         return session->config.get_punch_in();
587 }
588
589 LedState 
590 MackieControlProtocol::punch_out_press (Button &)
591 {
592         bool const state = !session->config.get_punch_out();
593         session->config.set_punch_out (state);
594         return state;
595 }
596
597 LedState 
598 MackieControlProtocol::punch_out_release (Button &)
599 {
600         return session->config.get_punch_out();
601 }
602
603 LedState 
604 MackieControlProtocol::home_press (Button &)
605 {
606         session->goto_start();
607         return on;
608 }
609
610 LedState 
611 MackieControlProtocol::home_release (Button &)
612 {
613         return off;
614 }
615
616 LedState 
617 MackieControlProtocol::end_press (Button &)
618 {
619         session->goto_end();
620         return on;
621 }
622
623 LedState 
624 MackieControlProtocol::end_release (Button &)
625 {
626         return off;
627 }
628
629 LedState 
630 MackieControlProtocol::clicking_press (Button &)
631 {
632         bool state = !Config->get_clicking();
633         Config->set_clicking (state);
634         return state;
635 }
636
637 LedState 
638 MackieControlProtocol::clicking_release (Button &)
639 {
640         return Config->get_clicking();
641 }
642
643 LedState MackieControlProtocol::global_solo_press (Button &)
644 {
645         bool state = !session->soloing();
646         session->set_solo (session->get_routes(), state);
647         return state;
648 }
649
650 LedState MackieControlProtocol::global_solo_release (Button &)
651 {
652         return session->soloing();
653 }
654
655 LedState
656 MackieControlProtocol::enter_press (Button &) 
657
658         Enter(); /* EMIT SIGNAL */
659         return off;
660 }
661
662 LedState
663 MackieControlProtocol::enter_release (Button &) 
664
665         return off;
666 }
667
668 LedState
669 MackieControlProtocol::F1_press (Button &) 
670
671         return off; 
672 }
673 LedState
674 MackieControlProtocol::F1_release (Button &) 
675
676         return off; 
677 }
678 LedState
679 MackieControlProtocol::F2_press (Button &) 
680
681         return off; 
682 }
683 LedState
684 MackieControlProtocol::F2_release (Button &) 
685
686         return off; 
687 }
688 LedState
689 MackieControlProtocol::F3_press (Button &) 
690
691         return off; 
692 }
693 LedState
694 MackieControlProtocol::F3_release (Button &) 
695
696         return off; 
697 }
698 LedState
699 MackieControlProtocol::F4_press (Button &) 
700
701         return off; 
702 }
703 LedState
704 MackieControlProtocol::F4_release (Button &) 
705
706         return off; 
707 }
708 LedState
709 MackieControlProtocol::F5_press (Button &) 
710
711         return off; 
712 }
713 LedState
714 MackieControlProtocol::F5_release (Button &) 
715
716         return off; 
717 }
718 LedState
719 MackieControlProtocol::F6_press (Button &) 
720
721         return off; 
722 }
723 LedState
724 MackieControlProtocol::F6_release (Button &) 
725
726         return off; 
727 }
728 LedState
729 MackieControlProtocol::F7_press (Button &) 
730
731         return off; 
732 }
733 LedState
734 MackieControlProtocol::F7_release (Button &) 
735
736         return off; 
737 }
738 LedState
739 MackieControlProtocol::F8_press (Button &) 
740
741         CloseDialog (); /* EMIT SIGNAL */
742         return off; 
743 }
744 LedState
745 MackieControlProtocol::F8_release (Button &) 
746
747         return off; 
748 }
749
750 /* UNIMPLEMENTED */
751
752 LedState
753 MackieControlProtocol::io_press (Button &) 
754
755         return off; 
756 }
757 LedState
758 MackieControlProtocol::io_release (Button &) 
759
760         return off; 
761 }
762 LedState
763 MackieControlProtocol::sends_press (Button &) 
764
765         set_view_mode (Sends);
766         return on;
767 }
768 LedState
769 MackieControlProtocol::sends_release (Button &) 
770
771         return none; 
772 }
773 LedState
774 MackieControlProtocol::pan_press (Button &) 
775
776         return off; 
777 }
778 LedState
779 MackieControlProtocol::pan_release (Button &) 
780
781         return off; 
782 }
783 LedState
784 MackieControlProtocol::plugin_press (Button &) 
785
786         return off; 
787 }
788 LedState
789 MackieControlProtocol::plugin_release (Button &) 
790
791         return off; 
792 }
793 LedState
794 MackieControlProtocol::eq_press (Button &) 
795
796         set_view_mode (EQ);
797         return on;
798 }
799 LedState
800 MackieControlProtocol::eq_release (Button &) 
801
802         return none;
803 }
804 LedState
805 MackieControlProtocol::dyn_press (Button &) 
806
807         set_view_mode (Dynamics);
808         return on;
809 }
810 LedState
811 MackieControlProtocol::dyn_release (Button &) 
812
813         return none;
814 }
815 LedState
816 MackieControlProtocol::flip_press (Button &) 
817
818         set_flip_mode (!_flip_mode);
819         return (_flip_mode ? on : off);
820 }
821 LedState
822 MackieControlProtocol::flip_release (Button &) 
823
824         return none;
825 }
826 LedState
827 MackieControlProtocol::edit_press (Button &) 
828
829         return off; 
830 }
831 LedState
832 MackieControlProtocol::edit_release (Button &) 
833
834         return off; 
835 }
836 LedState
837 MackieControlProtocol::name_value_press (Button &) 
838
839         return off; 
840 }
841 LedState
842 MackieControlProtocol::name_value_release (Button &) 
843
844         return off; 
845 }
846 LedState
847 MackieControlProtocol::F9_press (Button &) 
848
849         return off; 
850 }
851 LedState
852 MackieControlProtocol::F9_release (Button &) 
853
854         return off; 
855 }
856 LedState
857 MackieControlProtocol::F10_press (Button &) 
858
859         return off; 
860 }
861 LedState
862 MackieControlProtocol::F10_release (Button &) 
863
864         return off; 
865 }
866 LedState
867 MackieControlProtocol::F11_press (Button &) 
868
869         return off; 
870 }
871 LedState
872 MackieControlProtocol::F11_release (Button &) 
873
874         return off; 
875 }
876 LedState
877 MackieControlProtocol::F12_press (Button &) 
878
879         return off; 
880 }
881 LedState
882 MackieControlProtocol::F12_release (Button &) 
883
884         return off; 
885 }
886 LedState
887 MackieControlProtocol::F13_press (Button &) 
888
889         return off; 
890 }
891 LedState
892 MackieControlProtocol::F13_release (Button &) 
893
894         return off; 
895 }
896 LedState
897 MackieControlProtocol::F14_press (Button &) 
898
899         return off; 
900 }
901 LedState
902 MackieControlProtocol::F14_release (Button &) 
903
904         return off; 
905 }
906 LedState
907 MackieControlProtocol::F15_press (Button &) 
908
909         return off; 
910 }
911 LedState
912 MackieControlProtocol::F15_release (Button &) 
913
914         return off; 
915 }
916 LedState
917 MackieControlProtocol::F16_press (Button &) 
918
919         return off; 
920 }
921 LedState
922 MackieControlProtocol::F16_release (Button &) 
923
924         return off; 
925 }
926 LedState
927 MackieControlProtocol::on_press (Button &) 
928
929         return off; 
930 }
931 LedState
932 MackieControlProtocol::on_release (Button &) 
933
934         return off; 
935 }
936 LedState
937 MackieControlProtocol::rec_ready_press (Button &) 
938
939         return off; 
940 }
941 LedState
942 MackieControlProtocol::rec_ready_release (Button &) 
943
944         return off; 
945 }
946 LedState
947 MackieControlProtocol::touch_press (Button &) 
948
949         return off; 
950 }
951 LedState
952 MackieControlProtocol::touch_release (Button &) 
953
954         return off; 
955 }
956 LedState
957 MackieControlProtocol::cancel_press (Button &) 
958
959         return off; 
960 }
961 LedState
962 MackieControlProtocol::cancel_release (Button &) 
963
964         return off; 
965 }
966 LedState
967 MackieControlProtocol::mixer_press (Button &) 
968
969         return off; 
970 }
971 LedState
972 MackieControlProtocol::mixer_release (Button &) 
973
974         return off; 
975 }
976 LedState
977 MackieControlProtocol::user_a_press (Button &) 
978
979         transport_play (session->transport_speed() == 1.0);
980         return off; 
981 }
982 LedState
983 MackieControlProtocol::user_a_release (Button &) 
984
985         return off; 
986 }
987 LedState
988 MackieControlProtocol::user_b_press (Button &) 
989
990         transport_stop();
991         return off; 
992 }
993 LedState
994 MackieControlProtocol::user_b_release (Button &) 
995
996         return off; 
997 }
998
999 LedState
1000 MackieControlProtocol::master_fader_touch_press (Mackie::Button &)
1001 {
1002         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_press\n");
1003
1004         Fader* master_fader = surfaces.front()->master_fader();
1005
1006         boost::shared_ptr<AutomationControl> ac = master_fader->control ();
1007
1008         master_fader->set_in_use (true);
1009         master_fader->start_touch (transport_frame());
1010
1011         return none;
1012 }
1013 LedState
1014 MackieControlProtocol::master_fader_touch_release (Mackie::Button &)
1015 {
1016         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_release\n");
1017
1018         Fader* master_fader = surfaces.front()->master_fader();
1019
1020         master_fader->set_in_use (false);
1021         master_fader->stop_touch (transport_frame(), true);
1022
1023         return none;
1024 }
1025
1026 Mackie::LedState 
1027 MackieControlProtocol::snapshot_press (Mackie::Button&) 
1028 {
1029         return none;
1030 }
1031 Mackie::LedState 
1032 MackieControlProtocol::snapshot_release (Mackie::Button&) 
1033 {
1034         return none;
1035 }
1036 Mackie::LedState 
1037 MackieControlProtocol::read_press (Mackie::Button&) 
1038 {
1039         _metering_active = !_metering_active;
1040         notify_metering_state_changed ();
1041         return _metering_active;
1042 }
1043 Mackie::LedState 
1044 MackieControlProtocol::read_release (Mackie::Button&) 
1045 {
1046         return _metering_active;
1047 }
1048 Mackie::LedState 
1049 MackieControlProtocol::write_press (Mackie::Button&) 
1050 {
1051         return none;
1052 }
1053 Mackie::LedState 
1054 MackieControlProtocol::write_release (Mackie::Button&) 
1055 {
1056         return none;
1057 }
1058 Mackie::LedState 
1059 MackieControlProtocol::fdrgroup_press (Mackie::Button&) 
1060 {
1061         return none;
1062 }
1063 Mackie::LedState 
1064 MackieControlProtocol::fdrgroup_release (Mackie::Button&) 
1065 {
1066         return none;
1067 }
1068 Mackie::LedState 
1069 MackieControlProtocol::clearsolo_press (Mackie::Button&) 
1070 {
1071         return none;
1072 }
1073 Mackie::LedState 
1074 MackieControlProtocol::clearsolo_release (Mackie::Button&) 
1075 {
1076         return none;
1077 }
1078 Mackie::LedState 
1079 MackieControlProtocol::track_press (Mackie::Button&) 
1080 {
1081         return none;
1082 }
1083 Mackie::LedState 
1084 MackieControlProtocol::track_release (Mackie::Button&) 
1085 {
1086         return none;
1087 }
1088 Mackie::LedState 
1089 MackieControlProtocol::send_press (Mackie::Button&) 
1090 {
1091         return none;
1092 }
1093 Mackie::LedState 
1094 MackieControlProtocol::send_release (Mackie::Button&) 
1095 {
1096         return none;
1097 }
1098 Mackie::LedState 
1099 MackieControlProtocol::miditracks_press (Mackie::Button&) 
1100 {
1101         return none;
1102 }
1103 Mackie::LedState 
1104 MackieControlProtocol::miditracks_release (Mackie::Button&) 
1105 {
1106         return none;
1107 }
1108 Mackie::LedState 
1109 MackieControlProtocol::inputs_press (Mackie::Button&) 
1110 {
1111         return none;
1112 }
1113 Mackie::LedState 
1114 MackieControlProtocol::inputs_release (Mackie::Button&) 
1115 {
1116         return none;
1117 }
1118 Mackie::LedState 
1119 MackieControlProtocol::audiotracks_press (Mackie::Button&) 
1120 {
1121         return none;
1122 }
1123 Mackie::LedState 
1124 MackieControlProtocol::audiotracks_release (Mackie::Button&) 
1125 {
1126         return none;
1127 }
1128 Mackie::LedState 
1129 MackieControlProtocol::audioinstruments_press (Mackie::Button&) 
1130 {
1131         return none;
1132 }
1133 Mackie::LedState 
1134 MackieControlProtocol::audioinstruments_release (Mackie::Button&) 
1135 {
1136         return none;
1137 }
1138 Mackie::LedState 
1139 MackieControlProtocol::aux_press (Mackie::Button&) 
1140 {
1141         return none;
1142 }
1143 Mackie::LedState 
1144 MackieControlProtocol::aux_release (Mackie::Button&) 
1145 {
1146         return none;
1147 }
1148 Mackie::LedState 
1149 MackieControlProtocol::busses_press (Mackie::Button&) 
1150 {
1151         return none;
1152 }
1153 Mackie::LedState 
1154 MackieControlProtocol::busses_release (Mackie::Button&) 
1155 {
1156         return none;
1157 }
1158 Mackie::LedState 
1159 MackieControlProtocol::outputs_press (Mackie::Button&) 
1160 {
1161         return none;
1162 }
1163 Mackie::LedState 
1164 MackieControlProtocol::outputs_release (Mackie::Button&) 
1165 {
1166         return none;
1167 }
1168 Mackie::LedState 
1169 MackieControlProtocol::user_press (Mackie::Button&) 
1170 {
1171         return none;
1172 }
1173 Mackie::LedState 
1174 MackieControlProtocol::user_release (Mackie::Button&) 
1175 {
1176         return none;
1177 }
1178 Mackie::LedState 
1179 MackieControlProtocol::trim_press (Mackie::Button&) 
1180 {
1181         return none;
1182 }
1183 Mackie::LedState 
1184 MackieControlProtocol::trim_release (Mackie::Button&) 
1185 {
1186         return none;
1187 }
1188 Mackie::LedState 
1189 MackieControlProtocol::latch_press (Mackie::Button&) 
1190 {
1191         return none;
1192 }
1193 Mackie::LedState 
1194 MackieControlProtocol::latch_release (Mackie::Button&) 
1195 {
1196         return none;
1197 }
1198 Mackie::LedState 
1199 MackieControlProtocol::grp_press (Mackie::Button&) 
1200 {
1201         return none;
1202 }
1203 Mackie::LedState 
1204 MackieControlProtocol::grp_release (Mackie::Button&) 
1205 {
1206         return none;
1207 }
1208 Mackie::LedState 
1209 MackieControlProtocol::nudge_press (Mackie::Button&) 
1210 {
1211         return none;
1212 }
1213 Mackie::LedState 
1214 MackieControlProtocol::nudge_release (Mackie::Button&) 
1215 {
1216         return none;
1217 }
1218 Mackie::LedState 
1219 MackieControlProtocol::replace_press (Mackie::Button&) 
1220 {
1221         return none;
1222 }
1223 Mackie::LedState 
1224 MackieControlProtocol::replace_release (Mackie::Button&) 
1225 {
1226         return none;
1227 }
1228 Mackie::LedState 
1229 MackieControlProtocol::click_press (Mackie::Button&) 
1230 {
1231         return none;
1232 }
1233 Mackie::LedState 
1234 MackieControlProtocol::click_release (Mackie::Button&) 
1235 {
1236         return none;
1237 }
1238 Mackie::LedState 
1239 MackieControlProtocol::view_press (Mackie::Button&) 
1240 {
1241         return none;
1242 }
1243 Mackie::LedState 
1244 MackieControlProtocol::view_release (Mackie::Button&) 
1245 {
1246         return none;
1247 }