Add 'libs/pbd/pbd/pthread_utils.h' to our pbd project (msvc)
[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         framepos_t pos = session->locations()->first_mark_before (session->transport_frame());
433         
434         // allow a quick double to go past a previous mark
435         if (session->transport_rolling() && elapsed < 500 && pos >= 0) {
436                 framepos_t pos_two_back = session->locations()->first_mark_before (pos);
437                 if (pos_two_back >= 0) {
438                         pos = pos_two_back;
439                 }
440         }
441
442         // move to the location, if it's valid
443         if (pos >= 0) {
444                 session->request_locate (pos, session->transport_rolling());
445         } else {
446                 session->request_locate (session->current_start_frame(), session->transport_rolling());
447         }
448
449         return on;
450 }
451
452 LedState 
453 MackieControlProtocol::frm_left_release (Button &)
454 {
455         return off;
456 }
457
458 LedState 
459 MackieControlProtocol::frm_right_press (Button &)
460 {
461         // can use first_mark_before/after as well
462         framepos_t pos = session->locations()->first_mark_after (session->transport_frame());
463         
464         if (pos >= 0) {
465                 session->request_locate (pos, session->transport_rolling());
466         } else {
467                 session->request_locate (session->current_end_frame(), session->transport_rolling());
468         }
469                 
470         return on;
471 }
472
473 LedState 
474 MackieControlProtocol::frm_right_release (Button &)
475 {
476         return off;
477 }
478
479 LedState 
480 MackieControlProtocol::stop_press (Button &)
481 {
482         transport_stop ();
483         return on;
484 }
485
486 LedState 
487 MackieControlProtocol::stop_release (Button &)
488 {
489         return session->transport_stopped();
490 }
491
492 LedState 
493 MackieControlProtocol::play_press (Button &)
494 {
495         /* if we're already rolling at normal speed, and we're pressed
496            again, jump back to where we started last time
497         */
498
499         transport_play (session->transport_speed() == 1.0);
500         return none;
501 }
502
503 LedState 
504 MackieControlProtocol::play_release (Button &)
505 {
506         return none;
507 }
508
509 LedState 
510 MackieControlProtocol::record_press (Button &)
511 {
512         rec_enable_toggle ();
513         return none;
514 }
515
516 LedState 
517 MackieControlProtocol::record_release (Button &)
518 {
519         return none;
520 }
521
522 LedState 
523 MackieControlProtocol::rewind_press (Button &)
524 {
525         if (_modifier_state == MODIFIER_CONTROL) {
526                 goto_start ();
527         } else {
528                 rewind ();
529         }
530         return none;
531 }
532
533 LedState 
534 MackieControlProtocol::rewind_release (Button &)
535 {
536         return none;
537 }
538
539 LedState 
540 MackieControlProtocol::ffwd_press (Button &)
541 {
542         if (_modifier_state == MODIFIER_CONTROL) {
543                 goto_end();
544         } else {
545                 ffwd ();
546         }
547         return none;
548 }
549
550 LedState 
551 MackieControlProtocol::ffwd_release (Button &)
552 {
553         return none;
554 }
555
556 LedState 
557 MackieControlProtocol::loop_press (Button &)
558 {
559         if (_modifier_state & MODIFIER_CONTROL) {
560                 set_view_mode (Loop);
561                 return on;
562         } else {
563                 session->request_play_loop (!session->get_play_loop());
564                 return none;
565         }
566 }
567
568 LedState 
569 MackieControlProtocol::loop_release (Button &)
570 {
571         return none;
572 }
573
574 LedState 
575 MackieControlProtocol::punch_in_press (Button &)
576 {
577         bool const state = !session->config.get_punch_in();
578         session->config.set_punch_in (state);
579         return state;
580 }
581
582 LedState 
583 MackieControlProtocol::punch_in_release (Button &)
584 {
585         return session->config.get_punch_in();
586 }
587
588 LedState 
589 MackieControlProtocol::punch_out_press (Button &)
590 {
591         bool const state = !session->config.get_punch_out();
592         session->config.set_punch_out (state);
593         return state;
594 }
595
596 LedState 
597 MackieControlProtocol::punch_out_release (Button &)
598 {
599         return session->config.get_punch_out();
600 }
601
602 LedState 
603 MackieControlProtocol::home_press (Button &)
604 {
605         session->goto_start();
606         return on;
607 }
608
609 LedState 
610 MackieControlProtocol::home_release (Button &)
611 {
612         return off;
613 }
614
615 LedState 
616 MackieControlProtocol::end_press (Button &)
617 {
618         session->goto_end();
619         return on;
620 }
621
622 LedState 
623 MackieControlProtocol::end_release (Button &)
624 {
625         return off;
626 }
627
628 LedState 
629 MackieControlProtocol::clicking_press (Button &)
630 {
631         bool state = !Config->get_clicking();
632         Config->set_clicking (state);
633         return state;
634 }
635
636 LedState 
637 MackieControlProtocol::clicking_release (Button &)
638 {
639         return Config->get_clicking();
640 }
641
642 LedState MackieControlProtocol::global_solo_press (Button &)
643 {
644         bool state = !session->soloing();
645         session->set_solo (session->get_routes(), state);
646         return state;
647 }
648
649 LedState MackieControlProtocol::global_solo_release (Button &)
650 {
651         return session->soloing();
652 }
653
654 LedState
655 MackieControlProtocol::enter_press (Button &) 
656
657         Enter(); /* EMIT SIGNAL */
658         return off;
659 }
660
661 LedState
662 MackieControlProtocol::enter_release (Button &) 
663
664         return off;
665 }
666
667 LedState
668 MackieControlProtocol::F1_press (Button &) 
669
670         return off; 
671 }
672 LedState
673 MackieControlProtocol::F1_release (Button &) 
674
675         return off; 
676 }
677 LedState
678 MackieControlProtocol::F2_press (Button &) 
679
680         return off; 
681 }
682 LedState
683 MackieControlProtocol::F2_release (Button &) 
684
685         return off; 
686 }
687 LedState
688 MackieControlProtocol::F3_press (Button &) 
689
690         return off; 
691 }
692 LedState
693 MackieControlProtocol::F3_release (Button &) 
694
695         return off; 
696 }
697 LedState
698 MackieControlProtocol::F4_press (Button &) 
699
700         return off; 
701 }
702 LedState
703 MackieControlProtocol::F4_release (Button &) 
704
705         return off; 
706 }
707 LedState
708 MackieControlProtocol::F5_press (Button &) 
709
710         return off; 
711 }
712 LedState
713 MackieControlProtocol::F5_release (Button &) 
714
715         return off; 
716 }
717 LedState
718 MackieControlProtocol::F6_press (Button &) 
719
720         return off; 
721 }
722 LedState
723 MackieControlProtocol::F6_release (Button &) 
724
725         return off; 
726 }
727 LedState
728 MackieControlProtocol::F7_press (Button &) 
729
730         return off; 
731 }
732 LedState
733 MackieControlProtocol::F7_release (Button &) 
734
735         return off; 
736 }
737 LedState
738 MackieControlProtocol::F8_press (Button &) 
739
740         CloseDialog (); /* EMIT SIGNAL */
741         return off; 
742 }
743 LedState
744 MackieControlProtocol::F8_release (Button &) 
745
746         return off; 
747 }
748
749 /* UNIMPLEMENTED */
750
751 LedState
752 MackieControlProtocol::io_press (Button &) 
753
754         return off; 
755 }
756 LedState
757 MackieControlProtocol::io_release (Button &) 
758
759         return off; 
760 }
761 LedState
762 MackieControlProtocol::sends_press (Button &) 
763
764         set_view_mode (Sends);
765         return on;
766 }
767 LedState
768 MackieControlProtocol::sends_release (Button &) 
769
770         return none; 
771 }
772 LedState
773 MackieControlProtocol::pan_press (Button &) 
774
775         return off; 
776 }
777 LedState
778 MackieControlProtocol::pan_release (Button &) 
779
780         return off; 
781 }
782 LedState
783 MackieControlProtocol::plugin_press (Button &) 
784
785         return off; 
786 }
787 LedState
788 MackieControlProtocol::plugin_release (Button &) 
789
790         return off; 
791 }
792 LedState
793 MackieControlProtocol::eq_press (Button &) 
794
795         set_view_mode (EQ);
796         return on;
797 }
798 LedState
799 MackieControlProtocol::eq_release (Button &) 
800
801         return none;
802 }
803 LedState
804 MackieControlProtocol::dyn_press (Button &) 
805
806         set_view_mode (Dynamics);
807         return on;
808 }
809 LedState
810 MackieControlProtocol::dyn_release (Button &) 
811
812         return none;
813 }
814 LedState
815 MackieControlProtocol::flip_press (Button &) 
816
817         if (_flip_mode != Normal) {
818                 set_flip_mode (Normal);
819         } else {
820                 set_flip_mode (Mirror);
821         }
822         return ((_flip_mode != Normal) ? on : off);
823 }
824 LedState
825 MackieControlProtocol::flip_release (Button &) 
826
827         return none;
828 }
829 LedState
830 MackieControlProtocol::edit_press (Button &) 
831
832         return off; 
833 }
834 LedState
835 MackieControlProtocol::edit_release (Button &) 
836
837         return off; 
838 }
839 LedState
840 MackieControlProtocol::name_value_press (Button &) 
841
842         return off; 
843 }
844 LedState
845 MackieControlProtocol::name_value_release (Button &) 
846
847         return off; 
848 }
849 LedState
850 MackieControlProtocol::F9_press (Button &) 
851
852         return off; 
853 }
854 LedState
855 MackieControlProtocol::F9_release (Button &) 
856
857         return off; 
858 }
859 LedState
860 MackieControlProtocol::F10_press (Button &) 
861
862         return off; 
863 }
864 LedState
865 MackieControlProtocol::F10_release (Button &) 
866
867         return off; 
868 }
869 LedState
870 MackieControlProtocol::F11_press (Button &) 
871
872         return off; 
873 }
874 LedState
875 MackieControlProtocol::F11_release (Button &) 
876
877         return off; 
878 }
879 LedState
880 MackieControlProtocol::F12_press (Button &) 
881
882         return off; 
883 }
884 LedState
885 MackieControlProtocol::F12_release (Button &) 
886
887         return off; 
888 }
889 LedState
890 MackieControlProtocol::F13_press (Button &) 
891
892         return off; 
893 }
894 LedState
895 MackieControlProtocol::F13_release (Button &) 
896
897         return off; 
898 }
899 LedState
900 MackieControlProtocol::F14_press (Button &) 
901
902         return off; 
903 }
904 LedState
905 MackieControlProtocol::F14_release (Button &) 
906
907         return off; 
908 }
909 LedState
910 MackieControlProtocol::F15_press (Button &) 
911
912         return off; 
913 }
914 LedState
915 MackieControlProtocol::F15_release (Button &) 
916
917         return off; 
918 }
919 LedState
920 MackieControlProtocol::F16_press (Button &) 
921
922         return off; 
923 }
924 LedState
925 MackieControlProtocol::F16_release (Button &) 
926
927         return off; 
928 }
929 LedState
930 MackieControlProtocol::on_press (Button &) 
931
932         return off; 
933 }
934 LedState
935 MackieControlProtocol::on_release (Button &) 
936
937         return off; 
938 }
939 LedState
940 MackieControlProtocol::rec_ready_press (Button &) 
941
942         return off; 
943 }
944 LedState
945 MackieControlProtocol::rec_ready_release (Button &) 
946
947         return off; 
948 }
949 LedState
950 MackieControlProtocol::touch_press (Button &) 
951
952         return off; 
953 }
954 LedState
955 MackieControlProtocol::touch_release (Button &) 
956
957         return off; 
958 }
959 LedState
960 MackieControlProtocol::cancel_press (Button &) 
961
962         return off; 
963 }
964 LedState
965 MackieControlProtocol::cancel_release (Button &) 
966
967         return off; 
968 }
969 LedState
970 MackieControlProtocol::mixer_press (Button &) 
971
972         return off; 
973 }
974 LedState
975 MackieControlProtocol::mixer_release (Button &) 
976
977         return off; 
978 }
979 LedState
980 MackieControlProtocol::user_a_press (Button &) 
981
982         transport_play (session->transport_speed() == 1.0);
983         return off; 
984 }
985 LedState
986 MackieControlProtocol::user_a_release (Button &) 
987
988         return off; 
989 }
990 LedState
991 MackieControlProtocol::user_b_press (Button &) 
992
993         transport_stop();
994         return off; 
995 }
996 LedState
997 MackieControlProtocol::user_b_release (Button &) 
998
999         return off; 
1000 }
1001
1002 LedState
1003 MackieControlProtocol::master_fader_touch_press (Mackie::Button &)
1004 {
1005         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_press\n");
1006
1007         Fader* master_fader = surfaces.front()->master_fader();
1008
1009         boost::shared_ptr<AutomationControl> ac = master_fader->control ();
1010
1011         master_fader->set_in_use (true);
1012         master_fader->start_touch (transport_frame());
1013
1014         return none;
1015 }
1016 LedState
1017 MackieControlProtocol::master_fader_touch_release (Mackie::Button &)
1018 {
1019         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_release\n");
1020
1021         Fader* master_fader = surfaces.front()->master_fader();
1022
1023         master_fader->set_in_use (false);
1024         master_fader->stop_touch (transport_frame(), true);
1025
1026         return none;
1027 }
1028
1029 Mackie::LedState 
1030 MackieControlProtocol::snapshot_press (Mackie::Button&) 
1031 {
1032         return none;
1033 }
1034 Mackie::LedState 
1035 MackieControlProtocol::snapshot_release (Mackie::Button&) 
1036 {
1037         return none;
1038 }
1039 Mackie::LedState 
1040 MackieControlProtocol::read_press (Mackie::Button&) 
1041 {
1042         _metering_active = !_metering_active;
1043         notify_metering_state_changed ();
1044         return _metering_active;
1045 }
1046 Mackie::LedState 
1047 MackieControlProtocol::read_release (Mackie::Button&) 
1048 {
1049         return _metering_active;
1050 }
1051 Mackie::LedState 
1052 MackieControlProtocol::write_press (Mackie::Button&) 
1053 {
1054         return none;
1055 }
1056 Mackie::LedState 
1057 MackieControlProtocol::write_release (Mackie::Button&) 
1058 {
1059         return none;
1060 }
1061 Mackie::LedState 
1062 MackieControlProtocol::fdrgroup_press (Mackie::Button&) 
1063 {
1064         return none;
1065 }
1066 Mackie::LedState 
1067 MackieControlProtocol::fdrgroup_release (Mackie::Button&) 
1068 {
1069         return none;
1070 }
1071 Mackie::LedState 
1072 MackieControlProtocol::clearsolo_press (Mackie::Button&) 
1073 {
1074         return none;
1075 }
1076 Mackie::LedState 
1077 MackieControlProtocol::clearsolo_release (Mackie::Button&) 
1078 {
1079         return none;
1080 }
1081 Mackie::LedState 
1082 MackieControlProtocol::track_press (Mackie::Button&) 
1083 {
1084         return none;
1085 }
1086 Mackie::LedState 
1087 MackieControlProtocol::track_release (Mackie::Button&) 
1088 {
1089         return none;
1090 }
1091 Mackie::LedState 
1092 MackieControlProtocol::send_press (Mackie::Button&) 
1093 {
1094         return none;
1095 }
1096 Mackie::LedState 
1097 MackieControlProtocol::send_release (Mackie::Button&) 
1098 {
1099         return none;
1100 }
1101 Mackie::LedState 
1102 MackieControlProtocol::miditracks_press (Mackie::Button&) 
1103 {
1104         return none;
1105 }
1106 Mackie::LedState 
1107 MackieControlProtocol::miditracks_release (Mackie::Button&) 
1108 {
1109         return none;
1110 }
1111 Mackie::LedState 
1112 MackieControlProtocol::inputs_press (Mackie::Button&) 
1113 {
1114         return none;
1115 }
1116 Mackie::LedState 
1117 MackieControlProtocol::inputs_release (Mackie::Button&) 
1118 {
1119         return none;
1120 }
1121 Mackie::LedState 
1122 MackieControlProtocol::audiotracks_press (Mackie::Button&) 
1123 {
1124         return none;
1125 }
1126 Mackie::LedState 
1127 MackieControlProtocol::audiotracks_release (Mackie::Button&) 
1128 {
1129         return none;
1130 }
1131 Mackie::LedState 
1132 MackieControlProtocol::audioinstruments_press (Mackie::Button&) 
1133 {
1134         return none;
1135 }
1136 Mackie::LedState 
1137 MackieControlProtocol::audioinstruments_release (Mackie::Button&) 
1138 {
1139         return none;
1140 }
1141 Mackie::LedState 
1142 MackieControlProtocol::aux_press (Mackie::Button&) 
1143 {
1144         return none;
1145 }
1146 Mackie::LedState 
1147 MackieControlProtocol::aux_release (Mackie::Button&) 
1148 {
1149         return none;
1150 }
1151 Mackie::LedState 
1152 MackieControlProtocol::busses_press (Mackie::Button&) 
1153 {
1154         return none;
1155 }
1156 Mackie::LedState 
1157 MackieControlProtocol::busses_release (Mackie::Button&) 
1158 {
1159         return none;
1160 }
1161 Mackie::LedState 
1162 MackieControlProtocol::outputs_press (Mackie::Button&) 
1163 {
1164         return none;
1165 }
1166 Mackie::LedState 
1167 MackieControlProtocol::outputs_release (Mackie::Button&) 
1168 {
1169         return none;
1170 }
1171 Mackie::LedState 
1172 MackieControlProtocol::user_press (Mackie::Button&) 
1173 {
1174         return none;
1175 }
1176 Mackie::LedState 
1177 MackieControlProtocol::user_release (Mackie::Button&) 
1178 {
1179         return none;
1180 }
1181 Mackie::LedState 
1182 MackieControlProtocol::trim_press (Mackie::Button&) 
1183 {
1184         return none;
1185 }
1186 Mackie::LedState 
1187 MackieControlProtocol::trim_release (Mackie::Button&) 
1188 {
1189         return none;
1190 }
1191 Mackie::LedState 
1192 MackieControlProtocol::latch_press (Mackie::Button&) 
1193 {
1194         return none;
1195 }
1196 Mackie::LedState 
1197 MackieControlProtocol::latch_release (Mackie::Button&) 
1198 {
1199         return none;
1200 }
1201 Mackie::LedState 
1202 MackieControlProtocol::grp_press (Mackie::Button&) 
1203 {
1204         return none;
1205 }
1206 Mackie::LedState 
1207 MackieControlProtocol::grp_release (Mackie::Button&) 
1208 {
1209         return none;
1210 }
1211 Mackie::LedState 
1212 MackieControlProtocol::nudge_press (Mackie::Button&) 
1213 {
1214         return none;
1215 }
1216 Mackie::LedState 
1217 MackieControlProtocol::nudge_release (Mackie::Button&) 
1218 {
1219         return none;
1220 }
1221 Mackie::LedState 
1222 MackieControlProtocol::replace_press (Mackie::Button&) 
1223 {
1224         return none;
1225 }
1226 Mackie::LedState 
1227 MackieControlProtocol::replace_release (Mackie::Button&) 
1228 {
1229         return none;
1230 }
1231 Mackie::LedState 
1232 MackieControlProtocol::click_press (Mackie::Button&) 
1233 {
1234         return none;
1235 }
1236 Mackie::LedState 
1237 MackieControlProtocol::click_release (Mackie::Button&) 
1238 {
1239         return none;
1240 }
1241 Mackie::LedState 
1242 MackieControlProtocol::view_press (Mackie::Button&) 
1243 {
1244         return none;
1245 }
1246 Mackie::LedState 
1247 MackieControlProtocol::view_release (Mackie::Button&) 
1248 {
1249         return none;
1250 }