diff options
| author | André Nusser <andre.nusser@googlemail.com> | 2019-05-11 21:02:27 +0200 | 
|---|---|---|
| committer | André Nusser <andre.nusser@googlemail.com> | 2019-05-11 21:02:27 +0200 | 
| commit | 18650bf589c459e60c2435d9a547218a744cdb32 (patch) | |
| tree | ab32e46ab7ac2e52e1cd16070647510952560867 /plugingui | |
| parent | eb362a5e4976d69509f35eb9e0c5771500041817 (diff) | |
Some cleaning up of the sample selection.
Diffstat (limited to 'plugingui')
| -rw-r--r-- | plugingui/maintab.cc | 2 | ||||
| -rw-r--r-- | plugingui/sampleselectionframecontent.cc | 62 | ||||
| -rw-r--r-- | plugingui/sampleselectionframecontent.h | 22 | 
3 files changed, 43 insertions, 43 deletions
| diff --git a/plugingui/maintab.cc b/plugingui/maintab.cc index 18fed6c..cdc0b05 100644 --- a/plugingui/maintab.cc +++ b/plugingui/maintab.cc @@ -51,7 +51,7 @@ MainTab::MainTab(Widget* parent,  	add("Drumkit", drumkit_frame, drumkitframe_content, 15, 0);  	add("Status", status_frame, statusframe_content, 24, 0); -	add("Resampling", resampling_frame, resamplingframe_content, 10, 0); +	add("Resampling", resampling_frame, resamplingframe_content, 20, 0);  	add("Velocity Humanizer", humanizer_frame, humanizerframe_content, 10, 1);  	humanizer_frame.setHelpText("Hello World\nThis is a nice World\n... I think"); diff --git a/plugingui/sampleselectionframecontent.cc b/plugingui/sampleselectionframecontent.cc index 534a0b9..d52ef93 100644 --- a/plugingui/sampleselectionframecontent.cc +++ b/plugingui/sampleselectionframecontent.cc @@ -42,19 +42,19 @@ SampleselectionframeContent::SampleselectionframeContent(Widget* parent,  {  	layout.setResizeChildren(false); -	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_close.resize(80, 80); +	f_close_knob.resize(30, 30); +	f_close_knob.showValue(false); +	f_close_knob.setDefaultValue(Settings::sample_selection_f_close_default/f_close_factor); +	f_close.setControl(&f_close_knob); +	layout.addItem(&f_close); + +	f_diverse.resize(80, 80); +	f_diverse_knob.resize(30, 30); +	f_diverse_knob.showValue(false); +	f_diverse_knob.setDefaultValue(Settings::sample_selection_f_diverse_default/f_diverse_factor); +	f_diverse.setControl(&f_diverse_knob); +	layout.addItem(&f_diverse);  	f_random.resize(80, 80);  	f_random_knob.resize(30, 30); @@ -63,33 +63,33 @@ SampleselectionframeContent::SampleselectionframeContent(Widget* parent,  	f_random.setControl(&f_random_knob);  	layout.addItem(&f_random); -	layout.setPosition(&f_distance, GridLayout::GridRange{0, 1, 0, 1}); -	layout.setPosition(&f_recent, GridLayout::GridRange{1, 2, 0, 1}); +	layout.setPosition(&f_close, GridLayout::GridRange{0, 1, 0, 1}); +	layout.setPosition(&f_diverse, GridLayout::GridRange{1, 2, 0, 1});  	layout.setPosition(&f_random, GridLayout::GridRange{2, 3, 0, 1}); -	CONNECT(this, settings_notifier.sample_selection_f_distance, -	        this, &SampleselectionframeContent::fDistanceSettingsValueChanged); -	CONNECT(this, settings_notifier.sample_selection_f_recent, -	        this, &SampleselectionframeContent::fRecentSettingsValueChanged); +	CONNECT(this, settings_notifier.sample_selection_f_close, +	        this, &SampleselectionframeContent::fCloseSettingsValueChanged); +	CONNECT(this, settings_notifier.sample_selection_f_diverse, +	        this, &SampleselectionframeContent::fDiverseSettingsValueChanged);  	CONNECT(this, settings_notifier.sample_selection_f_random,  	        this, &SampleselectionframeContent::fRandomSettingsValueChanged); -	CONNECT(&f_distance_knob, valueChangedNotifier, -	        this, &SampleselectionframeContent::fDistanceKnobValueChanged); -	CONNECT(&f_recent_knob, valueChangedNotifier, -	        this, &SampleselectionframeContent::fRecentKnobValueChanged); +	CONNECT(&f_close_knob, valueChangedNotifier, +	        this, &SampleselectionframeContent::fCloseKnobValueChanged); +	CONNECT(&f_diverse_knob, valueChangedNotifier, +	        this, &SampleselectionframeContent::fDiverseKnobValueChanged);  	CONNECT(&f_random_knob, valueChangedNotifier,  	        this, &SampleselectionframeContent::fRandomKnobValueChanged);  } -void SampleselectionframeContent::fDistanceKnobValueChanged(float value) +void SampleselectionframeContent::fCloseKnobValueChanged(float value)  { -	settings.sample_selection_f_distance.store(value*f_distance_factor); +	settings.sample_selection_f_close.store(value*f_close_factor);  } -void SampleselectionframeContent::fRecentKnobValueChanged(float value) +void SampleselectionframeContent::fDiverseKnobValueChanged(float value)  { -	settings.sample_selection_f_recent.store(value*f_recent_factor); +	settings.sample_selection_f_diverse.store(value*f_diverse_factor);  }  void SampleselectionframeContent::fRandomKnobValueChanged(float value) @@ -97,14 +97,14 @@ void SampleselectionframeContent::fRandomKnobValueChanged(float value)  	settings.sample_selection_f_random.store(value*f_random_factor);  } -void SampleselectionframeContent::fDistanceSettingsValueChanged(float value) +void SampleselectionframeContent::fCloseSettingsValueChanged(float value)  { -	f_distance_knob.setValue(value/f_distance_factor); +	f_close_knob.setValue(value/f_close_factor);  } -void SampleselectionframeContent::fRecentSettingsValueChanged(float value) +void SampleselectionframeContent::fDiverseSettingsValueChanged(float value)  { -	f_recent_knob.setValue(value/f_recent_factor); +	f_diverse_knob.setValue(value/f_diverse_factor);  }  void SampleselectionframeContent::fRandomSettingsValueChanged(float value) diff --git a/plugingui/sampleselectionframecontent.h b/plugingui/sampleselectionframecontent.h index 097bc20..272d620 100644 --- a/plugingui/sampleselectionframecontent.h +++ b/plugingui/sampleselectionframecontent.h @@ -46,26 +46,26 @@ public:  	                            SettingsNotifier& settings_notifier);  private: -	static float constexpr f_distance_factor = 4.f; -	static float constexpr f_recent_factor = 1.f; +	static float constexpr f_close_factor = 4.f; +	static float constexpr f_diverse_factor = 1.f;  	static float constexpr f_random_factor = .5f; -	void fDistanceKnobValueChanged(float value); -	void fRecentKnobValueChanged(float value); +	void fCloseKnobValueChanged(float value); +	void fDiverseKnobValueChanged(float value);  	void fRandomKnobValueChanged(float value); -	void fDistanceSettingsValueChanged(float value); -	void fRecentSettingsValueChanged(float value); +	void fCloseSettingsValueChanged(float value); +	void fDiverseSettingsValueChanged(float value);  	void fRandomSettingsValueChanged(float value);  	GridLayout layout{this, 3, 1}; -	LabeledControl f_distance{this, "fDistance"}; -	LabeledControl f_recent{this, "fRecent"}; -	LabeledControl f_random{this, "fRandom"}; +	LabeledControl f_close{this, "Close"}; +	LabeledControl f_diverse{this, "Diverse"}; +	LabeledControl f_random{this, "Random"}; -	Knob f_distance_knob{&f_distance}; -	Knob f_recent_knob{&f_recent}; +	Knob f_close_knob{&f_close}; +	Knob f_diverse_knob{&f_diverse};  	Knob f_random_knob{&f_random};  	Settings& settings; | 
