|
@@ -17,6 +17,40 @@ CMLSProjectAudioProcessorEditor::CMLSProjectAudioProcessorEditor (CMLSProjectAud
|
|
|
// editor's size to whatever you need it to be.
|
|
// editor's size to whatever you need it to be.
|
|
|
setSize (400, 300);
|
|
setSize (400, 300);
|
|
|
|
|
|
|
|
|
|
+ // Add aliders to the editor (Equalizer)
|
|
|
|
|
+ this->equalizerLowGainSlider.setRange(0.0, 1.0);
|
|
|
|
|
+ this->equalizerLowGainSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
|
|
+ this->equalizerLowGainSlider.addListener(this);
|
|
|
|
|
+ this->equalizerLowGainLabel.setText("Equalizer Low Gain", juce::dontSendNotification);
|
|
|
|
|
+
|
|
|
|
|
+ addAndMakeVisible(this->equalizerLowGainSlider);
|
|
|
|
|
+ addAndMakeVisible(this->equalizerLowGainLabel);
|
|
|
|
|
+
|
|
|
|
|
+ this->equalizerHighGainSlider.setRange(0.0, 1.0);
|
|
|
|
|
+ this->equalizerHighGainSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
|
|
+ this->equalizerHighGainSlider.addListener(this);
|
|
|
|
|
+ this->equalizerHighGainLabel.setText("Equalizer High Gain", juce::dontSendNotification);
|
|
|
|
|
+
|
|
|
|
|
+ addAndMakeVisible(this->equalizerHighGainSlider);
|
|
|
|
|
+ addAndMakeVisible(this->equalizerHighGainLabel);
|
|
|
|
|
+
|
|
|
|
|
+ // Add aliders to the editor (Distortion)
|
|
|
|
|
+ this->distortionDriveSlider.setRange(0.0, 1.0);
|
|
|
|
|
+ this->distortionDriveSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
|
|
+ this->distortionDriveSlider.addListener(this);
|
|
|
|
|
+ this->distortionDriveLabel.setText("Distortion Drive", juce::dontSendNotification);
|
|
|
|
|
+
|
|
|
|
|
+ addAndMakeVisible(this->distortionDriveSlider);
|
|
|
|
|
+ addAndMakeVisible(this->distortionDriveLabel);
|
|
|
|
|
+
|
|
|
|
|
+ this->distortionMixSlider.setRange(0.0, 1.0);
|
|
|
|
|
+ this->distortionMixSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
|
|
+ this->distortionMixSlider.addListener(this);
|
|
|
|
|
+ this->distortionMixLabel.setText("Distortion Mix", juce::dontSendNotification);
|
|
|
|
|
+
|
|
|
|
|
+ addAndMakeVisible(this->distortionMixSlider);
|
|
|
|
|
+ addAndMakeVisible(this->distortionMixLabel);
|
|
|
|
|
+
|
|
|
// Add aliders to the editor (Chorus)
|
|
// Add aliders to the editor (Chorus)
|
|
|
this->chorusDryWetSlider.setRange(0.0, 1.0);
|
|
this->chorusDryWetSlider.setRange(0.0, 1.0);
|
|
|
this->chorusDryWetSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
this->chorusDryWetSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
@@ -83,20 +117,30 @@ void CMLSProjectAudioProcessorEditor::paint (juce::Graphics& g)
|
|
|
void CMLSProjectAudioProcessorEditor::resized()
|
|
void CMLSProjectAudioProcessorEditor::resized()
|
|
|
{
|
|
{
|
|
|
//titleLabel.setBounds(10, 10, getWidth() - 20, 20);
|
|
//titleLabel.setBounds(10, 10, getWidth() - 20, 20);
|
|
|
- chorusDryWetSlider.setBounds(130, 10, getWidth() - 130, 20);
|
|
|
|
|
- chorusDryWetLabel.setBounds(10, 10, 100, 20);
|
|
|
|
|
- chorusAmountSlider.setBounds(130, 30, getWidth() - 130, 20);
|
|
|
|
|
- chorusAmountLabel.setBounds(10, 30, 100, 20);
|
|
|
|
|
-
|
|
|
|
|
- reverbDryWetSlider.setBounds(130, 70, getWidth() - 130, 20);
|
|
|
|
|
- reverbDryWetLabel.setBounds(10, 70, 100, 20);
|
|
|
|
|
- reverbRoomSizeSlider.setBounds(130, 90, getWidth() - 130, 20);
|
|
|
|
|
- reverbRoomSizeLabel.setBounds(10, 90, 100, 20);
|
|
|
|
|
-
|
|
|
|
|
- delayDryWetSlider.setBounds(130, 130, getWidth() - 130, 20);
|
|
|
|
|
- delayDryWetLabel.setBounds(10, 130, 100, 20);
|
|
|
|
|
- delayAmountSlider.setBounds(130, 150, getWidth() - 130, 20);
|
|
|
|
|
- delayAmountLabel.setBounds(10, 150, 100, 20);
|
|
|
|
|
|
|
+ equalizerLowGainSlider.setBounds(130, 10, getWidth() - 130, 20);
|
|
|
|
|
+ equalizerLowGainLabel.setBounds(10, 10, 100, 20);
|
|
|
|
|
+ equalizerHighGainSlider.setBounds(130, 30, getWidth() - 130, 20);
|
|
|
|
|
+ equalizerHighGainLabel.setBounds(10, 30, 100, 20);
|
|
|
|
|
+
|
|
|
|
|
+ distortionDriveSlider.setBounds(130, 70, getWidth() - 130, 20);
|
|
|
|
|
+ distortionDriveLabel.setBounds(10, 70, 100, 20);
|
|
|
|
|
+ distortionMixSlider.setBounds(130, 90, getWidth() - 130, 20);
|
|
|
|
|
+ distortionMixLabel.setBounds(10, 90, 100, 20);
|
|
|
|
|
+
|
|
|
|
|
+ chorusDryWetSlider.setBounds(130, 130, getWidth() - 130, 20);
|
|
|
|
|
+ chorusDryWetLabel.setBounds(10, 130, 100, 20);
|
|
|
|
|
+ chorusAmountSlider.setBounds(130, 150, getWidth() - 130, 20);
|
|
|
|
|
+ chorusAmountLabel.setBounds(10, 150, 100, 20);
|
|
|
|
|
+
|
|
|
|
|
+ reverbDryWetSlider.setBounds(130, 190, getWidth() - 130, 20);
|
|
|
|
|
+ reverbDryWetLabel.setBounds(10, 190, 100, 20);
|
|
|
|
|
+ reverbRoomSizeSlider.setBounds(130, 210, getWidth() - 130, 20);
|
|
|
|
|
+ reverbRoomSizeLabel.setBounds(10, 210, 100, 20);
|
|
|
|
|
+
|
|
|
|
|
+ delayDryWetSlider.setBounds(130, 250, getWidth() - 130, 20);
|
|
|
|
|
+ delayDryWetLabel.setBounds(10, 250, 100, 20);
|
|
|
|
|
+ delayAmountSlider.setBounds(130, 270, getWidth() - 130, 20);
|
|
|
|
|
+ delayAmountLabel.setBounds(10, 270, 100, 20);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void CMLSProjectAudioProcessorEditor::sliderValueChanged(juce::Slider* slider){
|
|
void CMLSProjectAudioProcessorEditor::sliderValueChanged(juce::Slider* slider){
|
|
@@ -124,4 +168,20 @@ void CMLSProjectAudioProcessorEditor::sliderValueChanged(juce::Slider* slider){
|
|
|
{
|
|
{
|
|
|
this->audioProcessor.setDelayAmount(slider->getValue());
|
|
this->audioProcessor.setDelayAmount(slider->getValue());
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (slider == &this->equalizerLowGainSlider)
|
|
|
|
|
+ {
|
|
|
|
|
+ this->audioProcessor.setEqLowGain(slider->getValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (slider == &this->equalizerHighGainSlider)
|
|
|
|
|
+ {
|
|
|
|
|
+ this->audioProcessor.setEqHighGain(slider->getValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (slider == &this->distortionDriveSlider)
|
|
|
|
|
+ {
|
|
|
|
|
+ this->audioProcessor.setDistortionDrive(slider->getValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (slider == &this->distortionMixSlider)
|
|
|
|
|
+ {
|
|
|
|
|
+ this->audioProcessor.setDistortionMix(slider->getValue());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|