summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-01 14:39:17 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-01 14:39:59 -0600
commitae3d9deefb4e88c85111f818eb909763561e0d60 (patch)
tree42eb489986cf0c66e8ca2071bebbbe48a3c15864 /libs/surfaces/mackie
parent79cb57e31a87af095d668d9d66fad64343784221 (diff)
Support for the iCON Qcon mcp device - sysex strings. Submitted by Michal Barhon.
Diffstat (limited to 'libs/surfaces/mackie')
-rwxr-xr-x[-rw-r--r--]libs/surfaces/mackie/device_info.cc13
-rwxr-xr-x[-rw-r--r--]libs/surfaces/mackie/device_info.h2
-rwxr-xr-x[-rw-r--r--]libs/surfaces/mackie/mackie_control_protocol.cc0
-rwxr-xr-x[-rw-r--r--]libs/surfaces/mackie/mackie_control_protocol.h2
-rwxr-xr-x[-rw-r--r--]libs/surfaces/mackie/surface.cc36
5 files changed, 48 insertions, 5 deletions
diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc
index 979be6b76b..e5a54fdab5 100644..100755
--- a/libs/surfaces/mackie/device_info.cc
+++ b/libs/surfaces/mackie/device_info.cc
@@ -56,6 +56,7 @@ DeviceInfo::DeviceInfo()
, _uses_logic_control_buttons (false)
, _uses_ipmidi (false)
, _no_handshake (false)
+ , _is_qcon(false)
, _has_meters (true)
, _has_separate_meters (false)
, _device_type (MCU)
@@ -320,6 +321,12 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
_has_meters = true;
}
+ if ((child = node.child ("IsQCon")) != 0) {
+ child->get_property ("value", _is_qcon);
+ } else {
+ _is_qcon = false;
+ }
+
if ((child = node.child ("HasSeparateMeters")) != 0) {
child->get_property ("value", _has_separate_meters);
} else {
@@ -457,6 +464,12 @@ DeviceInfo::no_handshake () const
}
bool
+DeviceInfo::is_qcon () const
+{
+ return _is_qcon;
+}
+
+bool
DeviceInfo::has_touch_sense_faders () const
{
return _has_touch_sense_faders;
diff --git a/libs/surfaces/mackie/device_info.h b/libs/surfaces/mackie/device_info.h
index 2aaa710ec6..c709bc9725 100644..100755
--- a/libs/surfaces/mackie/device_info.h
+++ b/libs/surfaces/mackie/device_info.h
@@ -80,6 +80,7 @@ class DeviceInfo
bool has_touch_sense_faders() const;
bool uses_ipmidi() const;
bool no_handshake() const;
+ bool is_qcon() const;
bool has_meters() const;
bool has_separate_meters() const;
const std::string& name() const;
@@ -109,6 +110,7 @@ class DeviceInfo
bool _uses_logic_control_buttons;
bool _uses_ipmidi;
bool _no_handshake;
+ bool _is_qcon;
bool _has_meters;
bool _has_separate_meters;
DeviceType _device_type;
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 5b2109de34..5b2109de34 100644..100755
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h
index 68e918d0e9..20786d75a0 100644..100755
--- a/libs/surfaces/mackie/mackie_control_protocol.h
+++ b/libs/surfaces/mackie/mackie_control_protocol.h
@@ -364,7 +364,7 @@ class MackieControlProtocol
void initialize ();
int set_device_info (const std::string& device_name);
void update_configuration_state ();
-
+
/* MIDI port connection management */
PBD::ScopedConnection port_connection;
diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc
index 079d057d43..7ed0c5c26a 100644..100755
--- a/libs/surfaces/mackie/surface.cc
+++ b/libs/surfaces/mackie/surface.cc
@@ -84,6 +84,15 @@ static MidiByteArray mackie_sysex_hdr (5, MIDI::sysex, 0x0, 0x0, 0x66, 0x14);
// the device type
static MidiByteArray mackie_sysex_hdr_xt (5, MIDI::sysex, 0x0, 0x0, 0x66, 0x15);
+//QCON
+// The MCU sysex header for QCon Control surface
+static MidiByteArray mackie_sysex_hdr_qcon (5, MIDI::sysex, 0x0, 0x0, 0x66, 0x14);
+
+// The MCU sysex header for QCon Control - extender
+// The extender differs from Mackie by 4th bit - it's same like for main control surface (for display)
+static MidiByteArray mackie_sysex_hdr_xt_qcon (5, MIDI::sysex, 0x0, 0x0, 0x66, 0x14);
+
+
static MidiByteArray empty_midi_byte_array;
Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, uint32_t number, surface_type_t stype)
@@ -287,8 +296,18 @@ const MidiByteArray&
Surface::sysex_hdr() const
{
switch (_stype) {
- case mcu: return mackie_sysex_hdr;
- case ext: return mackie_sysex_hdr_xt;
+ case mcu:
+ if (_mcp.device_info().is_qcon()) {
+ return mackie_sysex_hdr_qcon;
+ } else {
+ return mackie_sysex_hdr;
+ }
+ case ext:
+ if(_mcp.device_info().is_qcon()) {
+ return mackie_sysex_hdr_xt_qcon;
+ } else {
+ return mackie_sysex_hdr_xt;
+ }
}
cout << "SurfacePort::sysex_hdr _port_type not known" << endl;
return mackie_sysex_hdr;
@@ -682,9 +701,18 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
*/
if (_stype == mcu) {
- mackie_sysex_hdr[4] = bytes[4];
+ if (_mcp.device_info().is_qcon()) {
+ mackie_sysex_hdr_qcon[4] = bytes[4];
+ } else {
+ mackie_sysex_hdr[4] = bytes[4];
+ }
+
} else {
- mackie_sysex_hdr_xt[4] = bytes[4];
+ if (_mcp.device_info().is_qcon()) {
+ mackie_sysex_hdr_xt_qcon[4] = bytes[4];
+ } else {
+ mackie_sysex_hdr_xt[4] = bytes[4];
+ }
}
switch (bytes[5]) {