From 9c5efc23764522597a53a8745860cec54ea55d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 22 Mar 2019 01:09:15 +0100 Subject: Add settings and GUI for new sampling algorithm. --- plugin/drumgizmo_plugin.cc | 21 +++++++++++++++++++++ plugin/drumgizmo_plugin.h | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'plugin') 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()) + "\n" " " + float2str(settings.velocity_stddev.load()) + "\n" + " " + + float2str(settings.sample_selection_f_distance.load()) + "\n" + " " + + float2str(settings.sample_selection_f_recent.load()) + "\n" + " " + + float2str(settings.sample_selection_f_random.load()) + "\n" " " + bool2str(settings.enable_velocity_randomiser.load()) + "\n" " " + @@ -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}; }; -- cgit v1.2.3