summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/midi++2/midi++/midnam_patch.h2
-rw-r--r--libs/midi++2/midnam_patch.cc18
2 files changed, 17 insertions, 3 deletions
diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h
index bae5241f98..a759e503dd 100644
--- a/libs/midi++2/midi++/midnam_patch.h
+++ b/libs/midi++2/midi++/midnam_patch.h
@@ -387,6 +387,8 @@ public:
const std::string& author() const { return _author; }
void set_author(const std::string an_author) { _author = an_author; }
+ boost::shared_ptr<MasterDeviceNames> master_device_names(const std::string& model);
+
const MasterDeviceNamesList& master_device_names_by_model() const { return _master_device_names_list; }
const MasterDeviceNames::Models& all_models() const { return _all_models; }
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc
index 1608b418b0..3509d1e021 100644
--- a/libs/midi++2/midnam_patch.cc
+++ b/libs/midi++2/midnam_patch.cc
@@ -216,9 +216,11 @@ ControlNameList::set_state (const XMLTree& tree, const XMLNode& node)
for (XMLNodeList::const_iterator i = node.children().begin();
i != node.children().end(); ++i) {
- boost::shared_ptr<Control> control(new Control());
- control->set_state (tree, *(*i));
- _controls.push_back(control);
+ if ((*i)->name() != "comment") {
+ boost::shared_ptr<Control> control(new Control());
+ control->set_state (tree, *(*i));
+ _controls.push_back(control);
+ }
}
return 0;
@@ -646,6 +648,16 @@ MIDINameDocument::get_state(void)
return nothing;
}
+boost::shared_ptr<MasterDeviceNames>
+MIDINameDocument::master_device_names(const std::string& model)
+{
+ MasterDeviceNamesList::const_iterator m = _master_device_names_list.find(model);
+ if (m != _master_device_names_list.end()) {
+ return boost::shared_ptr<MasterDeviceNames>(m->second);
+ }
+ return boost::shared_ptr<MasterDeviceNames>();
+}
+
const char* general_midi_program_names[128] = {
"Acoustic Grand Piano",
"Bright Acoustic Piano",