2 * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef _ardour_surfaces_m2controls_h_
20 #define _ardour_surfaces_m2controls_h_
24 #include "m2_button.h"
25 #include "m2_encoder.h"
28 namespace ArdourSurface {
30 /** Abstraction for various variants:
33 * - NI Maschine Studio
40 virtual ~M2Contols () {}
62 BtnNavigate, // aka. "view" on Mikro
70 BtnArrange, // Studio only
71 BtnMix, // Studio only
74 BtnControl, // Studio: "Channel"
75 BtnStep, // Studio: "Plug-In"
91 BtnWheel, // Encoder Push
93 /* Selectors above display */
94 BtnTop0, BtnTop1, BtnTop2, BtnTop3, // Mikro F1, F2, F3
95 BtnTop4, BtnTop5, BtnTop6, BtnTop7,
97 /* Maschine & Studio "Groups" */
98 BtnGroupA, BtnGroupB, BtnGroupC, BtnGroupD,
99 BtnGroupE, BtnGroupF, BtnGroupG, BtnGroupH,
101 #if 1 // Studio only -- Edit
111 BtnIn1, BtnIn2, BtnIn3, BtnIn4,
112 BtnMst, BtnGrp, BtnSnd, BtnCue,
131 EncoderWheel, // multi-purpose
138 typedef std::map <PhysicalButtonId, M2ButtonInterface*> PhysicalMap;
139 typedef std::map <SemanticButtonId, M2ButtonInterface*> SematicMap;
141 virtual M2ButtonInterface* button (PhysicalButtonId id, Modifier m) {
142 if (id == BtnShift) {
145 return &_dummy_button;
148 virtual M2ButtonInterface* button (SemanticButtonId id) {
149 return &_dummy_button;
152 virtual M2EncoderInterface* encoder (unsigned int id) {
153 return &_dummy_encoder;
156 virtual M2PadInterface* pad (unsigned int id) {
161 M2ButtonInterface _dummy_button;
162 M2EncoderInterface _dummy_encoder;
163 M2PadInterface _dummy_pad;
165 M2ToggleHoldButton _shift;
169 #endif /* _ardour_surfaces_m2controls_h_*/