summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/drumgizmo_plugin.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc
index 82c0ee9..7960763 100644
--- a/plugin/drumgizmo_plugin.cc
+++ b/plugin/drumgizmo_plugin.cc
@@ -410,7 +410,18 @@ bool DrumGizmoPlugin::Input::loadMidiMap(const std::string& file,
bool result = AudioInputEngineMidi::loadMidiMap(file, i);
std::vector<std::pair<int, std::string>> midnam;
- const auto& map = mmap.getMap();
+ const auto& midimap = mmap.getMap();
+ std::map<int, std::string> map;
+ for(const auto& entry : midimap)
+ {
+ // in case of multiple instruments mapped to one note, use '/' as separator
+ if(!map[entry.note_id].empty())
+ {
+ map[entry.note_id] += "/";
+ }
+ map[entry.note_id] += entry.instrument_name;
+ }
+
midnam.reserve(map.size());
for(const auto& m : map)
{