diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-30 17:42:19 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-30 17:42:19 +0100 |
commit | 793495a6be9e9fffa8f7ec0e1d3ee4b055c93371 (patch) | |
tree | 837a68c7d839443cdf55673eca84168794e90725 /plugin/drumgizmo_plugin.cc | |
parent | 5780c16004944fd29f8a37bf40a877cb15e51488 (diff) |
Added dynamic midnam support.
Diffstat (limited to 'plugin/drumgizmo_plugin.cc')
-rw-r--r-- | plugin/drumgizmo_plugin.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 6e4fe3c..d8130f3 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -394,6 +394,25 @@ bool DrumGizmoPlugin::Input::isFreewheeling() const return plugin.getFreeWheel(); } +bool DrumGizmoPlugin::Input::loadMidiMap(const std::string& file, + const Instruments& i) +{ + bool result = AudioInputEngineMidi::loadMidiMap(file, i); + std::vector<std::pair<int, std::string>> midnam; + + const auto& map = mmap.getMap(); + midnam.reserve(map.size()); + for(const auto& m : map) + { + midnam.push_back(std::make_pair(m.first, m.second)); + } + + if(midnam.size() > 0) + { + plugin.setMidnamData(midnam); + } + return result; +} // // Output Engine |