summaryrefslogtreecommitdiff
path: root/plugin/drumgizmo_plugin.cc
diff options
context:
space:
mode:
authorTheMarlboroMan <marlborometal@gmail.com>2020-11-15 16:50:27 +0100
committerTheMarlboroMan <marlborometal@gmail.com>2020-11-15 17:04:21 +0100
commiteb0a72576c71557c8bb64cfd319620f5ea7ba24c (patch)
treedf15c068870705d7c7847b8d98a760e058756f03 /plugin/drumgizmo_plugin.cc
parentb0fa70c97c9b4886fb6e063664dc4d10daf12c1c (diff)
Implementation of the voice limiting feature.
Diffstat (limited to 'plugin/drumgizmo_plugin.cc')
-rw-r--r--plugin/drumgizmo_plugin.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc
index 98299ee..b955eb3 100644
--- a/plugin/drumgizmo_plugin.cc
+++ b/plugin/drumgizmo_plugin.cc
@@ -651,6 +651,12 @@ std::string DrumGizmoPlugin::ConfigStringIO::get()
float2str(settings.powermap_fixed2_y.load()) + "</value>\n"
" <value name=\"powermap_shelf\">" +
bool2str(settings.powermap_shelf.load()) + "</value>\n"
+ " <value name=\"enable_voice_limit\">" +
+ bool2str(settings.enable_voice_limit.load()) + "</value>\n"
+ " <value name=\"voice_limit_max\">" +
+ int2str(settings.voice_limit_max.load()) + "</value>\n"
+ " <value name=\"voice_limit_rampdown\">" +
+ float2str(settings.voice_limit_rampdown.load()) + "</value>\n"
"</config>";
}
@@ -811,6 +817,21 @@ bool DrumGizmoPlugin::ConfigStringIO::set(std::string config_string)
settings.powermap_shelf.store(p.value("powermap_shelf") == "true");
}
+ if(p.value("enable_voice_limit") != "")
+ {
+ settings.enable_voice_limit.store(p.value("enable_voice_limit") == "true");
+ }
+
+ if(p.value("voice_limit_max") != "")
+ {
+ settings.voice_limit_max.store(str2int(p.value("voice_limit_max")));
+ }
+
+ if(p.value("voice_limit_rampdown") != "")
+ {
+ settings.voice_limit_rampdown.store(str2float(p.value("voice_limit_rampdown")));
+ }
+
std::string newkit = p.value("drumkitfile");
if(newkit != "")
{