From fe9f2b15b13ce1e8216305f4c3916582ab65f8df Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 13 Jul 2014 23:36:45 -0400 Subject: [PATCH] Support midnam files with a channel (not patch) NoteNameList. --- libs/midi++2/midnam_patch.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc index 252804e466..1ec6062205 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 note_names; boost::shared_ptr 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 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 chan_names = channel_name_set_by_channel(