summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-10-30 17:42:19 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2018-10-30 17:42:19 +0100
commit793495a6be9e9fffa8f7ec0e1d3ee4b055c93371 (patch)
tree837a68c7d839443cdf55673eca84168794e90725 /plugin
parent5780c16004944fd29f8a37bf40a877cb15e51488 (diff)
Added dynamic midnam support.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/drumgizmo_plugin.cc19
-rw-r--r--plugin/drumgizmo_plugin.h2
m---------plugin/plugingizmo0
3 files changed, 21 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
diff --git a/plugin/drumgizmo_plugin.h b/plugin/drumgizmo_plugin.h
index d864def..106614f 100644
--- a/plugin/drumgizmo_plugin.h
+++ b/plugin/drumgizmo_plugin.h
@@ -128,6 +128,8 @@ private:
bool isFreewheeling() const override;
+ bool loadMidiMap(const std::string& file, const Instruments& i) override;
+
protected:
DrumGizmoPlugin& plugin;
const Instruments* instruments{nullptr};
diff --git a/plugin/plugingizmo b/plugin/plugingizmo
-Subproject 7f84f53bad767dfe2d1a2900b58c4dc32e9a805
+Subproject 75b19928e264ed5a58077498fd61f71e99dc400