View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006357 | ardour | features | public | 2015-05-31 13:46 | 2020-04-19 20:17 |
| Reporter | ovenwerks | Assigned To | ovenwerks | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 4.X git (version in description) | ||||
| Summary | 0006357: Control Surface MCP: Add a setting to the *.device file to set the position of the master device. | ||||
| Description | Right now when a master controller is used with one or more extenders, the master only works in the left most position. Please add a setting to set the master to right most position. | ||||
| Tags | No tags attached. | ||||
|
2015-06-01 05:17
|
patch.txt (2,740 bytes)
diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc
index 3ec1369..a50d256 100644
--- a/libs/surfaces/mackie/device_info.cc
+++ b/libs/surfaces/mackie/device_info.cc
@@ -46,6 +46,7 @@ std::map<std::string,DeviceInfo> DeviceInfo::device_info;
DeviceInfo::DeviceInfo()
: _strip_cnt (8)
, _extenders (0)
+ , _master_position (0)
, _has_two_character_display (true)
, _has_master_fader (true)
, _has_timecode_display (true)
@@ -241,6 +242,14 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
}
}
+ if ((child = node.child ("MasterPosition")) != 0) {
+ if ((prop = child->property ("value")) != 0) {
+ if ((_master_position = atoi (prop->value().c_str())) == 0) {
+ _master_position = 0;
+ }
+ }
+ }
+
if ((child = node.child ("TwoCharacterDisplay")) != 0) {
if ((prop = child->property ("value")) != 0) {
_has_two_character_display = string_is_affirmative (prop->value());
@@ -387,6 +396,12 @@ DeviceInfo::extenders() const
return _extenders;
}
+uint32_t
+DeviceInfo::master_position() const
+{
+ return _master_position;
+}
+
bool
DeviceInfo::has_master_fader() const
{
@@ -510,6 +525,7 @@ std::ostream& operator<< (std::ostream& os, const Mackie::DeviceInfo& di)
os << di.name() << ' '
<< di.strip_cnt() << ' '
<< di.extenders() << ' '
+ << di.master_position() << ' '
;
return os;
}
diff --git a/libs/surfaces/mackie/device_info.h b/libs/surfaces/mackie/device_info.h
index 9a70852..ac24b1c 100644
--- a/libs/surfaces/mackie/device_info.h
+++ b/libs/surfaces/mackie/device_info.h
@@ -62,6 +62,7 @@ class DeviceInfo
uint32_t strip_cnt () const;
uint32_t extenders() const;
+ uint32_t master_position() const;
bool has_two_character_display() const;
bool has_master_fader () const;
bool has_timecode_display() const;
@@ -88,6 +89,7 @@ class DeviceInfo
private:
uint32_t _strip_cnt;
uint32_t _extenders;
+ uint32_t _master_position;
bool _has_two_character_display;
bool _has_master_fader;
bool _has_timecode_display;
diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc
index dc79d5f..b918f67 100644
--- a/libs/surfaces/mackie/surface.cc
+++ b/libs/surfaces/mackie/surface.cc
@@ -94,8 +94,9 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
}
/* only the first Surface object has global controls */
-
- if (_number == 0) {
+ /* lets use master_position instead */
+ uint32_t mp = _mcp.device_info().master_position();
+ if (_number == mp) {
DEBUG_TRACE (DEBUG::MackieControl, "Surface is first. Might have global controls.\n");
if (_mcp.device_info().has_global_controls()) {
init_controls ();
|
|
|
This patch allows for a setting line to be added to a *.device file in the form of: <MasterPosition value="1"/> to determine the position of the master surface. The count starts at 0 for the left most and goes up. The value of 1 shown above would be the second device or righthand side in a two device setup. |
|
|
Patch applied June 4 2015 |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-05-31 13:46 | ovenwerks | New Issue | |
| 2015-06-01 05:17 | ovenwerks | File Added: patch.txt | |
| 2015-06-01 05:22 | ovenwerks | Note Added: 0016762 | |
| 2015-06-04 22:43 | ovenwerks | Note Added: 0016768 | |
| 2015-06-04 22:43 | ovenwerks | Status | new => resolved |
| 2015-06-04 22:43 | ovenwerks | Resolution | open => fixed |
| 2015-06-04 22:43 | ovenwerks | Assigned To | => ovenwerks |
| 2020-04-19 20:17 | system | Note Added: 0023472 | |
| 2020-04-19 20:17 | system | Status | resolved => closed |