From 0cb6057fd3a55b23b419ebfe9648cb63d4e13b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 11 May 2019 16:33:28 +0200 Subject: Move sample selection GUI parameters to own frame. --- plugingui/humanizerframecontent.cc | 66 -------------------------------------- 1 file changed, 66 deletions(-) (limited to 'plugingui/humanizerframecontent.cc') diff --git a/plugingui/humanizerframecontent.cc b/plugingui/humanizerframecontent.cc index db3fd97..475f16d 100644 --- a/plugingui/humanizerframecontent.cc +++ b/plugingui/humanizerframecontent.cc @@ -63,33 +63,9 @@ HumanizerframeContent::HumanizerframeContent(Widget* parent, stddev.setControl(&stddev_knob); layout.addItem(&stddev); - f_distance.resize(80, 80); - f_distance_knob.resize(30, 30); - f_distance_knob.showValue(false); - f_distance_knob.setDefaultValue(Settings::sample_selection_f_distance_default/f_distance_factor); - f_distance.setControl(&f_distance_knob); - layout.addItem(&f_distance); - - f_recent.resize(80, 80); - f_recent_knob.resize(30, 30); - f_recent_knob.showValue(false); - f_recent_knob.setDefaultValue(Settings::sample_selection_f_recent_default/f_recent_factor); - f_recent.setControl(&f_recent_knob); - layout.addItem(&f_recent); - - f_random.resize(80, 80); - f_random_knob.resize(30, 30); - f_random_knob.showValue(false); - f_random_knob.setDefaultValue(Settings::sample_selection_f_random_default/f_random_factor); - f_random.setControl(&f_random_knob); - layout.addItem(&f_random); - layout.setPosition(&attack, GridLayout::GridRange{0, 1, 0, 1}); layout.setPosition(&falloff, GridLayout::GridRange{1, 2, 0, 1}); layout.setPosition(&stddev, GridLayout::GridRange{2, 3, 0, 1}); - layout.setPosition(&f_distance, GridLayout::GridRange{0, 1, 1, 2}); - layout.setPosition(&f_recent, GridLayout::GridRange{1, 2, 1, 2}); - layout.setPosition(&f_random, GridLayout::GridRange{2, 3, 1, 2}); CONNECT(this, settings_notifier.velocity_modifier_weight, &attack_knob, &Knob::setValue); @@ -97,12 +73,6 @@ HumanizerframeContent::HumanizerframeContent(Widget* parent, &falloff_knob, &Knob::setValue); CONNECT(this, settings_notifier.velocity_stddev, this, &HumanizerframeContent::stddevSettingsValueChanged); - CONNECT(this, settings_notifier.sample_selection_f_distance, - this, &HumanizerframeContent::fDistanceSettingsValueChanged); - CONNECT(this, settings_notifier.sample_selection_f_recent, - this, &HumanizerframeContent::fRecentSettingsValueChanged); - CONNECT(this, settings_notifier.sample_selection_f_random, - this, &HumanizerframeContent::fRandomSettingsValueChanged); CONNECT(&attack_knob, valueChangedNotifier, this, &HumanizerframeContent::attackValueChanged); @@ -110,12 +80,6 @@ HumanizerframeContent::HumanizerframeContent(Widget* parent, this, &HumanizerframeContent::falloffValueChanged); CONNECT(&stddev_knob, valueChangedNotifier, this, &HumanizerframeContent::stddevKnobValueChanged); - CONNECT(&f_distance_knob, valueChangedNotifier, - this, &HumanizerframeContent::fDistanceKnobValueChanged); - CONNECT(&f_recent_knob, valueChangedNotifier, - this, &HumanizerframeContent::fRecentKnobValueChanged); - CONNECT(&f_random_knob, valueChangedNotifier, - this, &HumanizerframeContent::fRandomKnobValueChanged); } void HumanizerframeContent::attackValueChanged(float value) @@ -133,39 +97,9 @@ void HumanizerframeContent::stddevKnobValueChanged(float value) settings.velocity_stddev.store(value*stddev_factor); } -void HumanizerframeContent::fDistanceKnobValueChanged(float value) -{ - settings.sample_selection_f_distance.store(value*f_distance_factor); -} - -void HumanizerframeContent::fRecentKnobValueChanged(float value) -{ - settings.sample_selection_f_recent.store(value*f_recent_factor); -} - -void HumanizerframeContent::fRandomKnobValueChanged(float value) -{ - settings.sample_selection_f_random.store(value*f_random_factor); -} - void HumanizerframeContent::stddevSettingsValueChanged(float value) { stddev_knob.setValue(value/stddev_factor); } -void HumanizerframeContent::fDistanceSettingsValueChanged(float value) -{ - f_distance_knob.setValue(value/f_distance_factor); -} - -void HumanizerframeContent::fRecentSettingsValueChanged(float value) -{ - f_recent_knob.setValue(value/f_recent_factor); -} - -void HumanizerframeContent::fRandomSettingsValueChanged(float value) -{ - f_random_knob.setValue(value/f_random_factor); -} - } // GUI:: -- cgit v1.2.3