summaryrefslogtreecommitdiff
path: root/libs/midi++2/midnam_patch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/midi++2/midnam_patch.cc')
-rw-r--r--libs/midi++2/midnam_patch.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc
index 83f701777b..624e1605b5 100644
--- a/libs/midi++2/midnam_patch.cc
+++ b/libs/midi++2/midnam_patch.cc
@@ -435,6 +435,10 @@ ChannelNameSet::set_state (const XMLTree& tree, const XMLNode& node)
_patch_list.push_back((*patch)->patch_primary_key());
}
}
+
+ if (node->name() == "UsesNoteNameList") {
+ _note_list_name = node->property ("Name")->value();
+ }
}
return 0;
@@ -537,6 +541,14 @@ MasterDeviceNames::note_name(const std::string& mode_name,
boost::shared_ptr<const NoteNameList> note_names(
note_name_list(patch->note_list_name()));
if (!note_names) {
+ /* No note names specific to this patch, check the ChannelNameSet */
+ boost::shared_ptr<ChannelNameSet> chan_names = channel_name_set_by_device_mode_and_channel(
+ mode_name, channel);
+ if (chan_names) {
+ note_names = note_name_list(chan_names->note_list_name());
+ }
+ }
+ if (!note_names) {
return "";
}