diff options
author | André Nusser <andre.nusser@googlemail.com> | 2019-03-22 01:09:15 +0100 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2019-05-11 14:58:45 +0200 |
commit | 9c5efc23764522597a53a8745860cec54ea55d69 (patch) | |
tree | d672afdf2e11553d36370cc1abbef5033557f85e /plugin | |
parent | 50b011c4740a5ec5338903b1d8b5fbb4b42f3df3 (diff) |
Add settings and GUI for new sampling algorithm.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/drumgizmo_plugin.cc | 21 | ||||
-rw-r--r-- | plugin/drumgizmo_plugin.h | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 94302a1..acbb5a9 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -593,6 +593,12 @@ std::string DrumGizmoPlugin::ConfigStringIO::get() float2str(settings.velocity_modifier_weight.load()) + "</value>\n" " <value name=\"velocity_stddev\">" + float2str(settings.velocity_stddev.load()) + "</value>\n" + " <value name=\"sample_selection_f_distance\">" + + float2str(settings.sample_selection_f_distance.load()) + "</value>\n" + " <value name=\"sample_selection_f_recent\">" + + float2str(settings.sample_selection_f_recent.load()) + "</value>\n" + " <value name=\"sample_selection_f_random\">" + + float2str(settings.sample_selection_f_random.load()) + "</value>\n" " <value name=\"enable_velocity_randomiser\">" + bool2str(settings.enable_velocity_randomiser.load()) + "</value>\n" " <value name=\"velocity_randomiser_weight\">" + @@ -654,6 +660,21 @@ bool DrumGizmoPlugin::ConfigStringIO::set(std::string config_string) settings.velocity_stddev.store(str2float(p.value("velocity_stddev"))); } + if(p.value("sample_selection_f_distance") != "") + { + settings.sample_selection_f_distance.store(str2float(p.value("sample_selection_f_distance"))); + } + + if(p.value("sample_selection_f_recent") != "") + { + settings.sample_selection_f_recent.store(str2float(p.value("sample_selection_f_recent"))); + } + + if(p.value("sample_selection_f_random") != "") + { + settings.sample_selection_f_random.store(str2float(p.value("sample_selection_f_random"))); + } + if(p.value("enable_velocity_randomiser") != "") { settings.enable_velocity_randomiser.store(p.value("enable_velocity_randomiser") == "true"); diff --git a/plugin/drumgizmo_plugin.h b/plugin/drumgizmo_plugin.h index b422430..2f271c6 100644 --- a/plugin/drumgizmo_plugin.h +++ b/plugin/drumgizmo_plugin.h @@ -213,5 +213,5 @@ private: bool inline_image_first_draw{true}; static constexpr std::size_t width{750}; - static constexpr std::size_t height{613}; + static constexpr std::size_t height{733}; }; |