diff options
author | David Robillard <d@drobilla.net> | 2014-07-13 23:36:45 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-07-13 23:36:45 -0400 |
commit | 46624ea3560584446ef923b993e93e966355a327 (patch) | |
tree | 498d22c94096a2da836e6606bca3c46669bf4ba9 | |
parent | b660bc8ae92d19aedf0165815432b77a0c6170c4 (diff) |
Support midnam files with a channel (not patch) NoteNameList.
-rw-r--r-- | libs/midi++2/midnam_patch.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc index 0b8f1ffcb2..7c116f15d6 100644 --- a/libs/midi++2/midnam_patch.cc +++ b/libs/midi++2/midnam_patch.cc @@ -724,14 +724,13 @@ MasterDeviceNames::note_name(const std::string& mode_name, return ""; } + boost::shared_ptr<const NoteNameList> note_names; boost::shared_ptr<const Patch> patch( find_patch(mode_name, channel, PatchPrimaryKey(program, bank))); - if (!patch) { - return ""; + if (patch) { + note_names = note_name_list(patch->note_list_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_channel( |