diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | plugingui/sampleselectionframecontent.cc | 22 | ||||
-rw-r--r-- | plugingui/sampleselectionframecontent.h | 6 | ||||
-rw-r--r-- | src/settings.h | 2 |
4 files changed, 31 insertions, 2 deletions
@@ -1,3 +1,6 @@ +build/* +tools/performance_test/* +vst-tmp/* Makefile Makefile.in Makefile.mingw32 diff --git a/plugingui/sampleselectionframecontent.cc b/plugingui/sampleselectionframecontent.cc index 61b816f..448eca5 100644 --- a/plugingui/sampleselectionframecontent.cc +++ b/plugingui/sampleselectionframecontent.cc @@ -63,9 +63,17 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent, f_random.setControl(&f_random_knob); layout.addItem(&f_random); + f_position.resize(80, 80); + f_position_knob.resize(30, 30); + f_position_knob.showValue(false); + f_position_knob.setDefaultValue(Settings::sample_selection_f_position_default); + f_position.setControl(&f_position_knob); + layout.addItem(&f_position); + layout.setPosition(&f_close, dggui::GridLayout::GridRange{0, 1, 0, 1}); layout.setPosition(&f_diverse, dggui::GridLayout::GridRange{1, 2, 0, 1}); layout.setPosition(&f_random, dggui::GridLayout::GridRange{2, 3, 0, 1}); + layout.setPosition(&f_position, dggui::GridLayout::GridRange{3, 4, 0, 1}); CONNECT(this, settings_notifier.sample_selection_f_close, this, &SampleselectionframeContent::fCloseSettingsValueChanged); @@ -73,6 +81,8 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent, this, &SampleselectionframeContent::fDiverseSettingsValueChanged); CONNECT(this, settings_notifier.sample_selection_f_random, this, &SampleselectionframeContent::fRandomSettingsValueChanged); + CONNECT(this, settings_notifier.sample_selection_f_position, + this, &SampleselectionframeContent::fPositionSettingsValueChanged); CONNECT(&f_close_knob, valueChangedNotifier, this, &SampleselectionframeContent::fCloseKnobValueChanged); @@ -80,6 +90,8 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent, this, &SampleselectionframeContent::fDiverseKnobValueChanged); CONNECT(&f_random_knob, valueChangedNotifier, this, &SampleselectionframeContent::fRandomKnobValueChanged); + CONNECT(&f_position_knob, valueChangedNotifier, + this, &SampleselectionframeContent::fPositionKnobValueChanged); } void SampleselectionframeContent::fCloseKnobValueChanged(float value) @@ -97,6 +109,11 @@ void SampleselectionframeContent::fRandomKnobValueChanged(float value) settings.sample_selection_f_random.store(value); } +void SampleselectionframeContent::fPositionKnobValueChanged(float value) +{ + settings.sample_selection_f_position.store(value); +} + void SampleselectionframeContent::fCloseSettingsValueChanged(float value) { f_close_knob.setValue(value); @@ -112,4 +129,9 @@ void SampleselectionframeContent::fRandomSettingsValueChanged(float value) f_random_knob.setValue(value); } +void SampleselectionframeContent::fPositionSettingsValueChanged(float value) +{ + f_position_knob.setValue(value); +} + } // GUI:: diff --git a/plugingui/sampleselectionframecontent.h b/plugingui/sampleselectionframecontent.h index ab1be04..d3834f6 100644 --- a/plugingui/sampleselectionframecontent.h +++ b/plugingui/sampleselectionframecontent.h @@ -52,20 +52,24 @@ private: void fCloseKnobValueChanged(float value); void fDiverseKnobValueChanged(float value); void fRandomKnobValueChanged(float value); + void fPositionKnobValueChanged(float value); void fCloseSettingsValueChanged(float value); void fDiverseSettingsValueChanged(float value); void fRandomSettingsValueChanged(float value); + void fPositionSettingsValueChanged(float value); - dggui::GridLayout layout{this, 3, 1}; + dggui::GridLayout layout{this, 4, 1}; LabeledControl f_close{this, _("pClose")}; LabeledControl f_diverse{this, _("pDiverse")}; LabeledControl f_random{this, _("pRandom")}; + LabeledControl f_position{this, _("pPosition")}; dggui::Knob f_close_knob{&f_close}; dggui::Knob f_diverse_knob{&f_diverse}; dggui::Knob f_random_knob{&f_random}; + dggui::Knob f_position_knob{&f_position}; Settings& settings; SettingsNotifier& settings_notifier; diff --git a/src/settings.h b/src/settings.h index 074c7bc..58b17f3 100644 --- a/src/settings.h +++ b/src/settings.h @@ -78,7 +78,7 @@ struct Settings static float constexpr velocity_stddev_default = .45f; static float constexpr position_stddev_default = .45f; static float constexpr sample_selection_f_close_default = .85f; - static float constexpr sample_selection_f_position_default = .85f; + static float constexpr sample_selection_f_position_default = .016f; static float constexpr sample_selection_f_diverse_default = .16f; static float constexpr sample_selection_f_random_default = .07f; Atomic<float> velocity_modifier_falloff{velocity_modifier_falloff_default}; |