diff options
author | Robin Gareus <robin@gareus.org> | 2019-05-04 00:07:26 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-05-04 00:07:26 +0200 |
commit | 0f24316c3c4a3280ed8a959329b866ecab6b4035 (patch) | |
tree | a60f63cb9cb1cb7aebed17ac3017eba7fc87c4ad /libs/midi++2 | |
parent | 757c29ae68728283eeb7326e3db3d4f5bae14d97 (diff) |
Ignore MIDNAM NRPN Controls for the time being
This fixes an issue with Novation_BassStationII.midnam
duplicate assignments CC + NRPN.
Diffstat (limited to 'libs/midi++2')
-rw-r--r-- | libs/midi++2/midnam_patch.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc index 71c82d78fd..e86f3dcfa0 100644 --- a/libs/midi++2/midnam_patch.cc +++ b/libs/midi++2/midnam_patch.cc @@ -250,6 +250,9 @@ Control::set_state (const XMLTree& tree, const XMLNode& node) } else { _type = "7bit"; } + if (_type == "NRPN") { + return -1; + } _number = string_to_int(tree, node.property("Number")->value()); _name = node.property("Name")->value(); @@ -292,7 +295,9 @@ ControlNameList::set_state (const XMLTree& tree, const XMLNode& node) i != node.children().end(); ++i) { if ((*i)->name() == "Control") { boost::shared_ptr<Control> control(new Control()); - control->set_state (tree, *(*i)); + if (control->set_state (tree, *(*i))) { + continue; + } if (_controls.find(control->number()) == _controls.end()) { _controls.insert(make_pair(control->number(), control)); } else { |