2 Generated by scripts/generate-surface.rb
5 #include "bcf_surface.h"
8 #include "mackie_button_handler.h"
10 using namespace Mackie;
12 void Mackie::BcfSurface::init_controls()
14 // intialise groups and strips
17 // make sure there are enough strips
20 group = new Group ( "user" );
21 groups["user"] = group;
23 group = new Group ( "assignment" );
24 groups["assignment"] = group;
26 group = new Group ( "none" );
27 groups["none"] = group;
29 group = new MasterStrip ( "master", 0 );
30 groups["master"] = group;
31 strips[0] = dynamic_cast<Strip*>( group );
33 group = new Strip ( "strip_1", 0 );
34 groups["strip_1"] = group;
35 strips[0] = dynamic_cast<Strip*>( group );
37 group = new Group ( "cursor" );
38 groups["cursor"] = group;
40 group = new Strip ( "strip_2", 1 );
41 groups["strip_2"] = group;
42 strips[1] = dynamic_cast<Strip*>( group );
44 group = new Group ( "functions" );
45 groups["functions"] = group;
47 group = new Group ( "automation" );
48 groups["automation"] = group;
50 group = new Strip ( "strip_3", 2 );
51 groups["strip_3"] = group;
52 strips[2] = dynamic_cast<Strip*>( group );
54 group = new Group ( "display" );
55 groups["display"] = group;
57 group = new Strip ( "strip_4", 3 );
58 groups["strip_4"] = group;
59 strips[3] = dynamic_cast<Strip*>( group );
61 group = new Strip ( "strip_5", 4 );
62 groups["strip_5"] = group;
63 strips[4] = dynamic_cast<Strip*>( group );
65 group = new Strip ( "strip_6", 5 );
66 groups["strip_6"] = group;
67 strips[5] = dynamic_cast<Strip*>( group );
69 group = new Group ( "transport" );
70 groups["transport"] = group;
72 group = new Strip ( "strip_7", 6 );
73 groups["strip_7"] = group;
74 strips[6] = dynamic_cast<Strip*>( group );
76 group = new Group ( "modifiers" );
77 groups["modifiers"] = group;
79 group = new Group ( "bank" );
80 groups["bank"] = group;
83 // initialise controls
84 Control * control = 0;
86 group = groups["strip_1"];
87 control = new Fader ( 0, 1, "gain", *group );
88 faders[0x00] = control;
89 controls.push_back( control );
90 group->add( *control );
92 group = groups["strip_2"];
93 control = new Fader ( 1, 2, "gain", *group );
94 faders[0x01] = control;
95 controls.push_back( control );
96 group->add( *control );
98 group = groups["strip_3"];
99 control = new Fader ( 2, 3, "gain", *group );
100 faders[0x02] = control;
101 controls.push_back( control );
102 group->add( *control );
104 group = groups["strip_4"];
105 control = new Fader ( 3, 4, "gain", *group );
106 faders[0x03] = control;
107 controls.push_back( control );
108 group->add( *control );
110 group = groups["strip_5"];
111 control = new Fader ( 4, 5, "gain", *group );
112 faders[0x04] = control;
113 controls.push_back( control );
114 group->add( *control );
116 group = groups["strip_6"];
117 control = new Fader ( 5, 6, "gain", *group );
118 faders[0x05] = control;
119 controls.push_back( control );
120 group->add( *control );
122 group = groups["strip_7"];
123 control = new Fader ( 6, 7, "gain", *group );
124 faders[0x06] = control;
125 controls.push_back( control );
126 group->add( *control );
128 group = groups["master"];
129 control = new Fader ( 7, 1, "gain", *group );
130 faders[0x07] = control;
131 controls.push_back( control );
132 group->add( *control );
134 group = groups["strip_1"];
135 control = new Pot ( 16, 1, "vpot", *group );
136 pots[0x10] = control;
137 controls.push_back( control );
138 group->add( *control );
140 group = groups["strip_2"];
141 control = new Pot ( 17, 2, "vpot", *group );
142 pots[0x11] = control;
143 controls.push_back( control );
144 group->add( *control );
146 group = groups["strip_3"];
147 control = new Pot ( 18, 3, "vpot", *group );
148 pots[0x12] = control;
149 controls.push_back( control );
150 group->add( *control );
152 group = groups["strip_4"];
153 control = new Pot ( 19, 4, "vpot", *group );
154 pots[0x13] = control;
155 controls.push_back( control );
156 group->add( *control );
158 group = groups["strip_5"];
159 control = new Pot ( 20, 5, "vpot", *group );
160 pots[0x14] = control;
161 controls.push_back( control );
162 group->add( *control );
164 group = groups["strip_6"];
165 control = new Pot ( 21, 6, "vpot", *group );
166 pots[0x15] = control;
167 controls.push_back( control );
168 group->add( *control );
170 group = groups["strip_7"];
171 control = new Pot ( 22, 7, "vpot", *group );
172 pots[0x16] = control;
173 controls.push_back( control );
174 group->add( *control );
176 group = groups["none"];
177 control = new Pot ( 23, 1, "jog", *group );
178 pots[0x17] = control;
179 controls.push_back( control );
180 controls_by_name["jog"] = control;
181 group->add( *control );
183 group = groups["none"];
184 control = new Pot ( 46, 1, "external", *group );
185 pots[0x2e] = control;
186 controls.push_back( control );
187 controls_by_name["external"] = control;
188 group->add( *control );
190 group = groups["strip_1"];
191 control = new Button ( 24, 1, "recenable", *group );
192 buttons[0x18] = control;
193 controls.push_back( control );
194 group->add( *control );
196 group = groups["strip_2"];
197 control = new Button ( 25, 2, "recenable", *group );
198 buttons[0x19] = control;
199 controls.push_back( control );
200 group->add( *control );
202 group = groups["strip_3"];
203 control = new Button ( 26, 3, "recenable", *group );
204 buttons[0x1a] = control;
205 controls.push_back( control );
206 group->add( *control );
208 group = groups["strip_4"];
209 control = new Button ( 27, 4, "recenable", *group );
210 buttons[0x1b] = control;
211 controls.push_back( control );
212 group->add( *control );
214 group = groups["strip_5"];
215 control = new Button ( 28, 5, "recenable", *group );
216 buttons[0x1c] = control;
217 controls.push_back( control );
218 group->add( *control );
220 group = groups["strip_6"];
221 control = new Button ( 29, 6, "recenable", *group );
222 buttons[0x1d] = control;
223 controls.push_back( control );
224 group->add( *control );
226 group = groups["strip_7"];
227 control = new Button ( 30, 7, "recenable", *group );
228 buttons[0x1e] = control;
229 controls.push_back( control );
230 group->add( *control );
232 group = groups["strip_1"];
233 control = new Button ( 32, 1, "solo", *group );
234 buttons[0x20] = control;
235 controls.push_back( control );
236 group->add( *control );
238 group = groups["strip_2"];
239 control = new Button ( 33, 2, "solo", *group );
240 buttons[0x21] = control;
241 controls.push_back( control );
242 group->add( *control );
244 group = groups["strip_3"];
245 control = new Button ( 34, 3, "solo", *group );
246 buttons[0x22] = control;
247 controls.push_back( control );
248 group->add( *control );
250 group = groups["strip_4"];
251 control = new Button ( 35, 4, "solo", *group );
252 buttons[0x23] = control;
253 controls.push_back( control );
254 group->add( *control );
256 group = groups["strip_5"];
257 control = new Button ( 36, 5, "solo", *group );
258 buttons[0x24] = control;
259 controls.push_back( control );
260 group->add( *control );
262 group = groups["strip_6"];
263 control = new Button ( 37, 6, "solo", *group );
264 buttons[0x25] = control;
265 controls.push_back( control );
266 group->add( *control );
268 group = groups["strip_7"];
269 control = new Button ( 38, 7, "solo", *group );
270 buttons[0x26] = control;
271 controls.push_back( control );
272 group->add( *control );
274 group = groups["strip_1"];
275 control = new Button ( 16, 1, "mute", *group );
276 buttons[0x10] = control;
277 controls.push_back( control );
278 group->add( *control );
280 group = groups["strip_2"];
281 control = new Button ( 17, 2, "mute", *group );
282 buttons[0x11] = control;
283 controls.push_back( control );
284 group->add( *control );
286 group = groups["strip_3"];
287 control = new Button ( 18, 3, "mute", *group );
288 buttons[0x12] = control;
289 controls.push_back( control );
290 group->add( *control );
292 group = groups["strip_4"];
293 control = new Button ( 19, 4, "mute", *group );
294 buttons[0x13] = control;
295 controls.push_back( control );
296 group->add( *control );
298 group = groups["strip_5"];
299 control = new Button ( 20, 5, "mute", *group );
300 buttons[0x14] = control;
301 controls.push_back( control );
302 group->add( *control );
304 group = groups["strip_6"];
305 control = new Button ( 21, 6, "mute", *group );
306 buttons[0x15] = control;
307 controls.push_back( control );
308 group->add( *control );
310 group = groups["strip_7"];
311 control = new Button ( 22, 7, "mute", *group );
312 buttons[0x16] = control;
313 controls.push_back( control );
314 group->add( *control );
316 group = groups["strip_1"];
317 control = new Button ( 0, 1, "select", *group );
318 buttons[0x00] = control;
319 controls.push_back( control );
320 group->add( *control );
322 group = groups["strip_2"];
323 control = new Button ( 1, 2, "select", *group );
324 buttons[0x01] = control;
325 controls.push_back( control );
326 group->add( *control );
328 group = groups["strip_3"];
329 control = new Button ( 2, 3, "select", *group );
330 buttons[0x02] = control;
331 controls.push_back( control );
332 group->add( *control );
334 group = groups["strip_4"];
335 control = new Button ( 3, 4, "select", *group );
336 buttons[0x03] = control;
337 controls.push_back( control );
338 group->add( *control );
340 group = groups["strip_5"];
341 control = new Button ( 4, 5, "select", *group );
342 buttons[0x04] = control;
343 controls.push_back( control );
344 group->add( *control );
346 group = groups["strip_6"];
347 control = new Button ( 5, 6, "select", *group );
348 buttons[0x05] = control;
349 controls.push_back( control );
350 group->add( *control );
352 group = groups["strip_7"];
353 control = new Button ( 6, 7, "select", *group );
354 buttons[0x06] = control;
355 controls.push_back( control );
356 group->add( *control );
358 group = groups["strip_1"];
359 control = new Button ( 8, 1, "vselect", *group );
360 buttons[0x08] = control;
361 controls.push_back( control );
362 group->add( *control );
364 group = groups["strip_2"];
365 control = new Button ( 9, 2, "vselect", *group );
366 buttons[0x09] = control;
367 controls.push_back( control );
368 group->add( *control );
370 group = groups["strip_3"];
371 control = new Button ( 10, 3, "vselect", *group );
372 buttons[0x0a] = control;
373 controls.push_back( control );
374 group->add( *control );
376 group = groups["strip_4"];
377 control = new Button ( 11, 4, "vselect", *group );
378 buttons[0x0b] = control;
379 controls.push_back( control );
380 group->add( *control );
382 group = groups["strip_5"];
383 control = new Button ( 12, 5, "vselect", *group );
384 buttons[0x0c] = control;
385 controls.push_back( control );
386 group->add( *control );
388 group = groups["strip_6"];
389 control = new Button ( 13, 6, "vselect", *group );
390 buttons[0x0d] = control;
391 controls.push_back( control );
392 group->add( *control );
394 group = groups["strip_7"];
395 control = new Button ( 14, 7, "vselect", *group );
396 buttons[0x0e] = control;
397 controls.push_back( control );
398 group->add( *control );
400 group = groups["assignment"];
401 control = new Button ( 40, 1, "io", *group );
402 buttons[0x28] = control;
403 controls.push_back( control );
404 controls_by_name["io"] = control;
405 group->add( *control );
407 group = groups["assignment"];
408 control = new Button ( 90, 1, "sends", *group );
409 buttons[0x5a] = control;
410 controls.push_back( control );
411 controls_by_name["sends"] = control;
412 group->add( *control );
414 group = groups["assignment"];
415 control = new Button ( 89, 1, "pan", *group );
416 buttons[0x59] = control;
417 controls.push_back( control );
418 controls_by_name["pan"] = control;
419 group->add( *control );
421 group = groups["assignment"];
422 control = new Button ( 87, 1, "plugin", *group );
423 buttons[0x57] = control;
424 controls.push_back( control );
425 controls_by_name["plugin"] = control;
426 group->add( *control );
428 group = groups["assignment"];
429 control = new Button ( 88, 1, "eq", *group );
430 buttons[0x58] = control;
431 controls.push_back( control );
432 controls_by_name["eq"] = control;
433 group->add( *control );
435 group = groups["assignment"];
436 control = new Button ( 45, 1, "dyn", *group );
437 buttons[0x2d] = control;
438 controls.push_back( control );
439 controls_by_name["dyn"] = control;
440 group->add( *control );
442 group = groups["bank"];
443 control = new Button ( 46, 1, "left", *group );
444 buttons[0x2e] = control;
445 controls.push_back( control );
446 controls_by_name["left"] = control;
447 group->add( *control );
449 group = groups["bank"];
450 control = new Button ( 47, 1, "right", *group );
451 buttons[0x2f] = control;
452 controls.push_back( control );
453 controls_by_name["right"] = control;
454 group->add( *control );
456 group = groups["bank"];
457 control = new Button ( 48, 1, "channel_left", *group );
458 buttons[0x30] = control;
459 controls.push_back( control );
460 controls_by_name["channel_left"] = control;
461 group->add( *control );
463 group = groups["bank"];
464 control = new Button ( 49, 1, "channel_right", *group );
465 buttons[0x31] = control;
466 controls.push_back( control );
467 controls_by_name["channel_right"] = control;
468 group->add( *control );
470 group = groups["none"];
471 control = new Button ( 50, 1, "flip", *group );
472 buttons[0x32] = control;
473 controls.push_back( control );
474 controls_by_name["flip"] = control;
475 group->add( *control );
477 group = groups["none"];
478 control = new Button ( 86, 1, "edit", *group );
479 buttons[0x56] = control;
480 controls.push_back( control );
481 controls_by_name["edit"] = control;
482 group->add( *control );
484 group = groups["display"];
485 control = new Button ( 52, 1, "name_value", *group );
486 buttons[0x34] = control;
487 controls.push_back( control );
488 controls_by_name["name_value"] = control;
489 group->add( *control );
491 group = groups["display"];
492 control = new Button ( 53, 1, "smpte_beats", *group );
493 buttons[0x35] = control;
494 controls.push_back( control );
495 controls_by_name["smpte_beats"] = control;
496 group->add( *control );
498 group = groups["none"];
499 control = new Button ( 54, 1, "F1", *group );
500 buttons[0x36] = control;
501 controls.push_back( control );
502 controls_by_name["F1"] = control;
503 group->add( *control );
505 group = groups["none"];
506 control = new Button ( 55, 1, "F2", *group );
507 buttons[0x37] = control;
508 controls.push_back( control );
509 controls_by_name["F2"] = control;
510 group->add( *control );
512 group = groups["none"];
513 control = new Button ( 56, 1, "F3", *group );
514 buttons[0x38] = control;
515 controls.push_back( control );
516 controls_by_name["F3"] = control;
517 group->add( *control );
519 group = groups["none"];
520 control = new Button ( 57, 1, "F4", *group );
521 buttons[0x39] = control;
522 controls.push_back( control );
523 controls_by_name["F4"] = control;
524 group->add( *control );
526 group = groups["none"];
527 control = new Button ( 58, 1, "F5", *group );
528 buttons[0x3a] = control;
529 controls.push_back( control );
530 controls_by_name["F5"] = control;
531 group->add( *control );
533 group = groups["none"];
534 control = new Button ( 59, 1, "F6", *group );
535 buttons[0x3b] = control;
536 controls.push_back( control );
537 controls_by_name["F6"] = control;
538 group->add( *control );
540 group = groups["none"];
541 control = new Button ( 60, 1, "F7", *group );
542 buttons[0x3c] = control;
543 controls.push_back( control );
544 controls_by_name["F7"] = control;
545 group->add( *control );
547 group = groups["none"];
548 control = new Button ( 61, 1, "F8", *group );
549 buttons[0x3d] = control;
550 controls.push_back( control );
551 controls_by_name["F8"] = control;
552 group->add( *control );
554 group = groups["none"];
555 control = new Button ( 62, 1, "F9", *group );
556 buttons[0x3e] = control;
557 controls.push_back( control );
558 controls_by_name["F9"] = control;
559 group->add( *control );
561 group = groups["none"];
562 control = new Button ( 63, 1, "F10", *group );
563 buttons[0x3f] = control;
564 controls.push_back( control );
565 controls_by_name["F10"] = control;
566 group->add( *control );
568 group = groups["none"];
569 control = new Button ( 64, 1, "F11", *group );
570 buttons[0x40] = control;
571 controls.push_back( control );
572 controls_by_name["F11"] = control;
573 group->add( *control );
575 group = groups["none"];
576 control = new Button ( 65, 1, "F12", *group );
577 buttons[0x41] = control;
578 controls.push_back( control );
579 controls_by_name["F12"] = control;
580 group->add( *control );
582 group = groups["none"];
583 control = new Button ( 66, 1, "F13", *group );
584 buttons[0x42] = control;
585 controls.push_back( control );
586 controls_by_name["F13"] = control;
587 group->add( *control );
589 group = groups["none"];
590 control = new Button ( 67, 1, "F14", *group );
591 buttons[0x43] = control;
592 controls.push_back( control );
593 controls_by_name["F14"] = control;
594 group->add( *control );
596 group = groups["none"];
597 control = new Button ( 68, 1, "F15", *group );
598 buttons[0x44] = control;
599 controls.push_back( control );
600 controls_by_name["F15"] = control;
601 group->add( *control );
603 group = groups["none"];
604 control = new Button ( 69, 1, "F16", *group );
605 buttons[0x45] = control;
606 controls.push_back( control );
607 controls_by_name["F16"] = control;
608 group->add( *control );
610 group = groups["none"];
611 control = new Button ( 39, 1, "global_solo", *group );
612 buttons[0x27] = control;
613 controls.push_back( control );
614 controls_by_name["global_solo"] = control;
615 group->add( *control );
617 group = groups["modifiers"];
618 control = new Button ( 80, 1, "option", *group );
619 buttons[0x50] = control;
620 controls.push_back( control );
621 controls_by_name["option"] = control;
622 group->add( *control );
624 group = groups["modifiers"];
625 control = new Button ( 73, 1, "cmd_alt", *group );
626 buttons[0x49] = control;
627 controls.push_back( control );
628 controls_by_name["cmd_alt"] = control;
629 group->add( *control );
631 group = groups["automation"];
632 control = new Button ( 74, 1, "on", *group );
633 buttons[0x4a] = control;
634 controls.push_back( control );
635 controls_by_name["on"] = control;
636 group->add( *control );
638 group = groups["automation"];
639 control = new Button ( 75, 1, "rec_ready", *group );
640 buttons[0x4b] = control;
641 controls.push_back( control );
642 controls_by_name["rec_ready"] = control;
643 group->add( *control );
645 group = groups["functions"];
646 control = new Button ( 76, 1, "undo", *group );
647 buttons[0x4c] = control;
648 controls.push_back( control );
649 controls_by_name["undo"] = control;
650 group->add( *control );
652 group = groups["automation"];
653 control = new Button ( 77, 1, "snapshot", *group );
654 buttons[0x4d] = control;
655 controls.push_back( control );
656 controls_by_name["snapshot"] = control;
657 group->add( *control );
659 group = groups["functions"];
660 control = new Button ( 79, 1, "redo", *group );
661 buttons[0x4f] = control;
662 controls.push_back( control );
663 controls_by_name["redo"] = control;
664 group->add( *control );
666 group = groups["functions"];
667 control = new Button ( 71, 1, "marker", *group );
668 buttons[0x47] = control;
669 controls.push_back( control );
670 controls_by_name["marker"] = control;
671 group->add( *control );
673 group = groups["functions"];
674 control = new Button ( 81, 1, "enter", *group );
675 buttons[0x51] = control;
676 controls.push_back( control );
677 controls_by_name["enter"] = control;
678 group->add( *control );
680 group = groups["functions"];
681 control = new Button ( 82, 1, "cancel", *group );
682 buttons[0x52] = control;
683 controls.push_back( control );
684 controls_by_name["cancel"] = control;
685 group->add( *control );
687 group = groups["functions"];
688 control = new Button ( 83, 1, "mixer", *group );
689 buttons[0x53] = control;
690 controls.push_back( control );
691 controls_by_name["mixer"] = control;
692 group->add( *control );
694 group = groups["transport"];
695 control = new Button ( 91, 1, "frm_left", *group );
696 buttons[0x5b] = control;
697 controls.push_back( control );
698 controls_by_name["frm_left"] = control;
699 group->add( *control );
701 group = groups["transport"];
702 control = new Button ( 92, 1, "frm_right", *group );
703 buttons[0x5c] = control;
704 controls.push_back( control );
705 controls_by_name["frm_right"] = control;
706 group->add( *control );
708 group = groups["transport"];
709 control = new Button ( 70, 1, "loop", *group );
710 buttons[0x46] = control;
711 controls.push_back( control );
712 controls_by_name["loop"] = control;
713 group->add( *control );
715 group = groups["transport"];
716 control = new Button ( 72, 1, "punch_in", *group );
717 buttons[0x48] = control;
718 controls.push_back( control );
719 controls_by_name["punch_in"] = control;
720 group->add( *control );
722 group = groups["transport"];
723 control = new Button ( 78, 1, "punch_out", *group );
724 buttons[0x4e] = control;
725 controls.push_back( control );
726 controls_by_name["punch_out"] = control;
727 group->add( *control );
729 group = groups["transport"];
730 control = new Button ( 42, 1, "home", *group );
731 buttons[0x2a] = control;
732 controls.push_back( control );
733 controls_by_name["home"] = control;
734 group->add( *control );
736 group = groups["transport"];
737 control = new Button ( 41, 1, "end", *group );
738 buttons[0x29] = control;
739 controls.push_back( control );
740 controls_by_name["end"] = control;
741 group->add( *control );
743 group = groups["transport"];
744 control = new Button ( 44, 1, "rewind", *group );
745 buttons[0x2c] = control;
746 controls.push_back( control );
747 controls_by_name["rewind"] = control;
748 group->add( *control );
750 group = groups["transport"];
751 control = new Button ( 43, 1, "ffwd", *group );
752 buttons[0x2b] = control;
753 controls.push_back( control );
754 controls_by_name["ffwd"] = control;
755 group->add( *control );
757 group = groups["transport"];
758 control = new Button ( 93, 1, "stop", *group );
759 buttons[0x5d] = control;
760 controls.push_back( control );
761 controls_by_name["stop"] = control;
762 group->add( *control );
764 group = groups["transport"];
765 control = new Button ( 94, 1, "play", *group );
766 buttons[0x5e] = control;
767 controls.push_back( control );
768 controls_by_name["play"] = control;
769 group->add( *control );
771 group = groups["transport"];
772 control = new Button ( 31, 1, "record", *group );
773 buttons[0x1f] = control;
774 controls.push_back( control );
775 controls_by_name["record"] = control;
776 group->add( *control );
778 group = groups["cursor"];
779 control = new Button ( 96, 1, "cursor_up", *group );
780 buttons[0x60] = control;
781 controls.push_back( control );
782 controls_by_name["cursor_up"] = control;
783 group->add( *control );
785 group = groups["cursor"];
786 control = new Button ( 97, 1, "cursor_down", *group );
787 buttons[0x61] = control;
788 controls.push_back( control );
789 controls_by_name["cursor_down"] = control;
790 group->add( *control );
792 group = groups["cursor"];
793 control = new Button ( 98, 1, "cursor_left", *group );
794 buttons[0x62] = control;
795 controls.push_back( control );
796 controls_by_name["cursor_left"] = control;
797 group->add( *control );
799 group = groups["cursor"];
800 control = new Button ( 99, 1, "cursor_right", *group );
801 buttons[0x63] = control;
802 controls.push_back( control );
803 controls_by_name["cursor_right"] = control;
804 group->add( *control );
806 group = groups["none"];
807 control = new Button ( 100, 1, "zoom", *group );
808 buttons[0x64] = control;
809 controls.push_back( control );
810 controls_by_name["zoom"] = control;
811 group->add( *control );
813 group = groups["none"];
814 control = new Button ( 101, 1, "scrub", *group );
815 buttons[0x65] = control;
816 controls.push_back( control );
817 controls_by_name["scrub"] = control;
818 group->add( *control );
820 group = groups["user"];
821 control = new Button ( 102, 1, "user_a", *group );
822 buttons[0x66] = control;
823 controls.push_back( control );
824 controls_by_name["user_a"] = control;
825 group->add( *control );
827 group = groups["user"];
828 control = new Button ( 103, 1, "user_b", *group );
829 buttons[0x67] = control;
830 controls.push_back( control );
831 controls_by_name["user_b"] = control;
832 group->add( *control );
834 group = groups["strip_1"];
835 control = new Button ( 104, 1, "fader_touch", *group );
836 buttons[0x68] = control;
837 controls.push_back( control );
838 group->add( *control );
840 group = groups["strip_2"];
841 control = new Button ( 105, 2, "fader_touch", *group );
842 buttons[0x69] = control;
843 controls.push_back( control );
844 group->add( *control );
846 group = groups["strip_3"];
847 control = new Button ( 106, 3, "fader_touch", *group );
848 buttons[0x6a] = control;
849 controls.push_back( control );
850 group->add( *control );
852 group = groups["strip_4"];
853 control = new Button ( 107, 4, "fader_touch", *group );
854 buttons[0x6b] = control;
855 controls.push_back( control );
856 group->add( *control );
858 group = groups["strip_5"];
859 control = new Button ( 108, 5, "fader_touch", *group );
860 buttons[0x6c] = control;
861 controls.push_back( control );
862 group->add( *control );
864 group = groups["strip_6"];
865 control = new Button ( 109, 6, "fader_touch", *group );
866 buttons[0x6d] = control;
867 controls.push_back( control );
868 group->add( *control );
870 group = groups["strip_7"];
871 control = new Button ( 110, 7, "fader_touch", *group );
872 buttons[0x6e] = control;
873 controls.push_back( control );
874 group->add( *control );
876 group = groups["master"];
877 control = new Button ( 111, 1, "fader_touch", *group );
878 buttons[0x6f] = control;
879 controls.push_back( control );
880 group->add( *control );
882 group = groups["master"];
883 control = new Button ( 23, 1, "mute", *group );
884 buttons[0x17] = control;
885 controls.push_back( control );
886 group->add( *control );
888 group = groups["none"];
889 control = new Button ( 51, 1, "clicking", *group );
890 buttons[0x33] = control;
891 controls.push_back( control );
892 controls_by_name["clicking"] = control;
893 group->add( *control );
895 group = groups["none"];
896 control = new Led ( 113, 1, "smpte", *group );
897 leds[0x71] = control;
898 controls.push_back( control );
899 controls_by_name["smpte"] = control;
900 group->add( *control );
902 group = groups["none"];
903 control = new Led ( 114, 1, "beats", *group );
904 leds[0x72] = control;
905 controls.push_back( control );
906 controls_by_name["beats"] = control;
907 group->add( *control );
909 group = groups["none"];
910 control = new Led ( 115, 1, "solo", *group );
911 leds[0x73] = control;
912 controls.push_back( control );
913 controls_by_name["solo"] = control;
914 group->add( *control );
916 group = groups["none"];
917 control = new Led ( 118, 1, "relay_click", *group );
918 leds[0x76] = control;
919 controls.push_back( control );
920 controls_by_name["relay_click"] = control;
921 group->add( *control );
925 void Mackie::BcfSurface::handle_button( MackieButtonHandler & mbh, ButtonState bs, Button & button )
927 if ( bs != press && bs != release )
929 mbh.update_led( button, none );
934 switch ( button.id() )
939 case press: ls = mbh.io_press( button ); break;
940 case release: ls = mbh.io_release( button ); break;
947 case press: ls = mbh.sends_press( button ); break;
948 case release: ls = mbh.sends_release( button ); break;
955 case press: ls = mbh.pan_press( button ); break;
956 case release: ls = mbh.pan_release( button ); break;
963 case press: ls = mbh.plugin_press( button ); break;
964 case release: ls = mbh.plugin_release( button ); break;
971 case press: ls = mbh.eq_press( button ); break;
972 case release: ls = mbh.eq_release( button ); break;
979 case press: ls = mbh.dyn_press( button ); break;
980 case release: ls = mbh.dyn_release( button ); break;
987 case press: ls = mbh.left_press( button ); break;
988 case release: ls = mbh.left_release( button ); break;
995 case press: ls = mbh.right_press( button ); break;
996 case release: ls = mbh.right_release( button ); break;
1001 case 0x30: // channel_left
1003 case press: ls = mbh.channel_left_press( button ); break;
1004 case release: ls = mbh.channel_left_release( button ); break;
1005 case neither: break;
1009 case 0x31: // channel_right
1011 case press: ls = mbh.channel_right_press( button ); break;
1012 case release: ls = mbh.channel_right_release( button ); break;
1013 case neither: break;
1019 case press: ls = mbh.flip_press( button ); break;
1020 case release: ls = mbh.flip_release( button ); break;
1021 case neither: break;
1027 case press: ls = mbh.edit_press( button ); break;
1028 case release: ls = mbh.edit_release( button ); break;
1029 case neither: break;
1033 case 0x34: // name_value
1035 case press: ls = mbh.name_value_press( button ); break;
1036 case release: ls = mbh.name_value_release( button ); break;
1037 case neither: break;
1041 case 0x35: // smpte_beats
1043 case press: ls = mbh.smpte_beats_press( button ); break;
1044 case release: ls = mbh.smpte_beats_release( button ); break;
1045 case neither: break;
1051 case press: ls = mbh.F1_press( button ); break;
1052 case release: ls = mbh.F1_release( button ); break;
1053 case neither: break;
1059 case press: ls = mbh.F2_press( button ); break;
1060 case release: ls = mbh.F2_release( button ); break;
1061 case neither: break;
1067 case press: ls = mbh.F3_press( button ); break;
1068 case release: ls = mbh.F3_release( button ); break;
1069 case neither: break;
1075 case press: ls = mbh.F4_press( button ); break;
1076 case release: ls = mbh.F4_release( button ); break;
1077 case neither: break;
1083 case press: ls = mbh.F5_press( button ); break;
1084 case release: ls = mbh.F5_release( button ); break;
1085 case neither: break;
1091 case press: ls = mbh.F6_press( button ); break;
1092 case release: ls = mbh.F6_release( button ); break;
1093 case neither: break;
1099 case press: ls = mbh.F7_press( button ); break;
1100 case release: ls = mbh.F7_release( button ); break;
1101 case neither: break;
1107 case press: ls = mbh.F8_press( button ); break;
1108 case release: ls = mbh.F8_release( button ); break;
1109 case neither: break;
1115 case press: ls = mbh.F9_press( button ); break;
1116 case release: ls = mbh.F9_release( button ); break;
1117 case neither: break;
1123 case press: ls = mbh.F10_press( button ); break;
1124 case release: ls = mbh.F10_release( button ); break;
1125 case neither: break;
1131 case press: ls = mbh.F11_press( button ); break;
1132 case release: ls = mbh.F11_release( button ); break;
1133 case neither: break;
1139 case press: ls = mbh.F12_press( button ); break;
1140 case release: ls = mbh.F12_release( button ); break;
1141 case neither: break;
1147 case press: ls = mbh.F13_press( button ); break;
1148 case release: ls = mbh.F13_release( button ); break;
1149 case neither: break;
1155 case press: ls = mbh.F14_press( button ); break;
1156 case release: ls = mbh.F14_release( button ); break;
1157 case neither: break;
1163 case press: ls = mbh.F15_press( button ); break;
1164 case release: ls = mbh.F15_release( button ); break;
1165 case neither: break;
1171 case press: ls = mbh.F16_press( button ); break;
1172 case release: ls = mbh.F16_release( button ); break;
1173 case neither: break;
1177 case 0x27: // global_solo
1179 case press: ls = mbh.global_solo_press( button ); break;
1180 case release: ls = mbh.global_solo_release( button ); break;
1181 case neither: break;
1185 case 0x50: // option
1187 case press: ls = mbh.option_press( button ); break;
1188 case release: ls = mbh.option_release( button ); break;
1189 case neither: break;
1193 case 0x49: // cmd_alt
1195 case press: ls = mbh.cmd_alt_press( button ); break;
1196 case release: ls = mbh.cmd_alt_release( button ); break;
1197 case neither: break;
1203 case press: ls = mbh.on_press( button ); break;
1204 case release: ls = mbh.on_release( button ); break;
1205 case neither: break;
1209 case 0x4b: // rec_ready
1211 case press: ls = mbh.rec_ready_press( button ); break;
1212 case release: ls = mbh.rec_ready_release( button ); break;
1213 case neither: break;
1219 case press: ls = mbh.undo_press( button ); break;
1220 case release: ls = mbh.undo_release( button ); break;
1221 case neither: break;
1225 case 0x4d: // snapshot
1227 case press: ls = mbh.snapshot_press( button ); break;
1228 case release: ls = mbh.snapshot_release( button ); break;
1229 case neither: break;
1235 case press: ls = mbh.redo_press( button ); break;
1236 case release: ls = mbh.redo_release( button ); break;
1237 case neither: break;
1241 case 0x47: // marker
1243 case press: ls = mbh.marker_press( button ); break;
1244 case release: ls = mbh.marker_release( button ); break;
1245 case neither: break;
1251 case press: ls = mbh.enter_press( button ); break;
1252 case release: ls = mbh.enter_release( button ); break;
1253 case neither: break;
1257 case 0x52: // cancel
1259 case press: ls = mbh.cancel_press( button ); break;
1260 case release: ls = mbh.cancel_release( button ); break;
1261 case neither: break;
1267 case press: ls = mbh.mixer_press( button ); break;
1268 case release: ls = mbh.mixer_release( button ); break;
1269 case neither: break;
1273 case 0x5b: // frm_left
1275 case press: ls = mbh.frm_left_press( button ); break;
1276 case release: ls = mbh.frm_left_release( button ); break;
1277 case neither: break;
1281 case 0x5c: // frm_right
1283 case press: ls = mbh.frm_right_press( button ); break;
1284 case release: ls = mbh.frm_right_release( button ); break;
1285 case neither: break;
1291 case press: ls = mbh.loop_press( button ); break;
1292 case release: ls = mbh.loop_release( button ); break;
1293 case neither: break;
1297 case 0x48: // punch_in
1299 case press: ls = mbh.punch_in_press( button ); break;
1300 case release: ls = mbh.punch_in_release( button ); break;
1301 case neither: break;
1305 case 0x4e: // punch_out
1307 case press: ls = mbh.punch_out_press( button ); break;
1308 case release: ls = mbh.punch_out_release( button ); break;
1309 case neither: break;
1315 case press: ls = mbh.home_press( button ); break;
1316 case release: ls = mbh.home_release( button ); break;
1317 case neither: break;
1323 case press: ls = mbh.end_press( button ); break;
1324 case release: ls = mbh.end_release( button ); break;
1325 case neither: break;
1329 case 0x2c: // rewind
1331 case press: ls = mbh.rewind_press( button ); break;
1332 case release: ls = mbh.rewind_release( button ); break;
1333 case neither: break;
1339 case press: ls = mbh.ffwd_press( button ); break;
1340 case release: ls = mbh.ffwd_release( button ); break;
1341 case neither: break;
1347 case press: ls = mbh.stop_press( button ); break;
1348 case release: ls = mbh.stop_release( button ); break;
1349 case neither: break;
1355 case press: ls = mbh.play_press( button ); break;
1356 case release: ls = mbh.play_release( button ); break;
1357 case neither: break;
1361 case 0x1f: // record
1363 case press: ls = mbh.record_press( button ); break;
1364 case release: ls = mbh.record_release( button ); break;
1365 case neither: break;
1369 case 0x60: // cursor_up
1371 case press: ls = mbh.cursor_up_press( button ); break;
1372 case release: ls = mbh.cursor_up_release( button ); break;
1373 case neither: break;
1377 case 0x61: // cursor_down
1379 case press: ls = mbh.cursor_down_press( button ); break;
1380 case release: ls = mbh.cursor_down_release( button ); break;
1381 case neither: break;
1385 case 0x62: // cursor_left
1387 case press: ls = mbh.cursor_left_press( button ); break;
1388 case release: ls = mbh.cursor_left_release( button ); break;
1389 case neither: break;
1393 case 0x63: // cursor_right
1395 case press: ls = mbh.cursor_right_press( button ); break;
1396 case release: ls = mbh.cursor_right_release( button ); break;
1397 case neither: break;
1403 case press: ls = mbh.zoom_press( button ); break;
1404 case release: ls = mbh.zoom_release( button ); break;
1405 case neither: break;
1411 case press: ls = mbh.scrub_press( button ); break;
1412 case release: ls = mbh.scrub_release( button ); break;
1413 case neither: break;
1417 case 0x66: // user_a
1419 case press: ls = mbh.user_a_press( button ); break;
1420 case release: ls = mbh.user_a_release( button ); break;
1421 case neither: break;
1425 case 0x67: // user_b
1427 case press: ls = mbh.user_b_press( button ); break;
1428 case release: ls = mbh.user_b_release( button ); break;
1429 case neither: break;
1433 case 0x33: // clicking
1435 case press: ls = mbh.clicking_press( button ); break;
1436 case release: ls = mbh.clicking_release( button ); break;
1437 case neither: break;
1442 mbh.update_led( button, ls );