|
|
@@ -14,96 +14,10 @@ CMLSProjectAudioProcessorEditor::CMLSProjectAudioProcessorEditor (CMLSProjectAud
|
|
|
: AudioProcessorEditor (&p), audioProcessor (p)
|
|
|
{
|
|
|
// OSC receiver
|
|
|
- this->oscReceiver = new OSCReceiverWrapper(57120, &p);
|
|
|
+ this->oscReceiver = new OSCReceiverWrapper(57121, p.getApvts());
|
|
|
|
|
|
// Make sure that before the constructor has finished, you've set the
|
|
|
// editor's size to whatever you need it to be.
|
|
|
- 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)
|
|
|
- this->chorusDryWetSlider.setRange(0.0, 1.0);
|
|
|
- this->chorusDryWetSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
- this->chorusDryWetSlider.addListener(this);
|
|
|
- this->chorusDryWetLabel.setText("Chorus Dry/Wet", juce::dontSendNotification);
|
|
|
-
|
|
|
- addAndMakeVisible(this->chorusDryWetSlider);
|
|
|
- addAndMakeVisible(this->chorusDryWetLabel);
|
|
|
-
|
|
|
- this->chorusAmountSlider.setRange(0.0, 1.0);
|
|
|
- this->chorusAmountSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
- this->chorusAmountSlider.addListener(this);
|
|
|
- this->chorusAmountLabel.setText("Chorus Amount", juce::dontSendNotification);
|
|
|
-
|
|
|
- addAndMakeVisible(this->chorusAmountSlider);
|
|
|
- addAndMakeVisible(this->chorusAmountLabel);
|
|
|
-
|
|
|
- // Add sliders to the editor (Reverb)
|
|
|
- this->reverbDryWetSlider.setRange(0.0, 1.0);
|
|
|
- this->reverbDryWetSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
- this->reverbDryWetSlider.addListener(this);
|
|
|
- this->reverbDryWetLabel.setText("Reverb Dry/Wet", juce::dontSendNotification);
|
|
|
-
|
|
|
- addAndMakeVisible(this->reverbDryWetSlider);
|
|
|
- addAndMakeVisible(this->reverbDryWetLabel);
|
|
|
-
|
|
|
- this->reverbRoomSizeSlider.setRange(0.0, 1.0);
|
|
|
- this->reverbRoomSizeSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
- this->reverbRoomSizeSlider.addListener(this);
|
|
|
- this->reverbRoomSizeLabel.setText("Reverb Room Size", juce::dontSendNotification);
|
|
|
-
|
|
|
- addAndMakeVisible(this->reverbRoomSizeSlider);
|
|
|
- addAndMakeVisible(this->reverbRoomSizeLabel);
|
|
|
-
|
|
|
- // Add sliders to the editor (Delay)
|
|
|
- this->delayDryWetSlider.setRange(0.0, 1.0);
|
|
|
- this->delayDryWetSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
- this->delayDryWetSlider.addListener(this);
|
|
|
- this->delayDryWetLabel.setText("Delay Dry/Wet", juce::dontSendNotification);
|
|
|
-
|
|
|
- addAndMakeVisible(this->delayDryWetSlider);
|
|
|
- addAndMakeVisible(this->delayDryWetLabel);
|
|
|
-
|
|
|
- this->delayAmountSlider.setRange(0.0, 1.0);
|
|
|
- this->delayAmountSlider.setTextBoxStyle(juce::Slider::TextBoxRight, false, 100, 20);
|
|
|
- this->delayAmountSlider.addListener(this);
|
|
|
- this->delayAmountLabel.setText("Delay Amount", juce::dontSendNotification);
|
|
|
-
|
|
|
- addAndMakeVisible(this->delayAmountSlider);
|
|
|
- addAndMakeVisible(this->delayAmountLabel);
|
|
|
}
|
|
|
|
|
|
CMLSProjectAudioProcessorEditor::~CMLSProjectAudioProcessorEditor()
|
|
|
@@ -118,73 +32,4 @@ void CMLSProjectAudioProcessorEditor::paint (juce::Graphics& g)
|
|
|
}
|
|
|
|
|
|
void CMLSProjectAudioProcessorEditor::resized()
|
|
|
-{
|
|
|
- //titleLabel.setBounds(10, 10, getWidth() - 20, 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){
|
|
|
- if (slider == &this->chorusDryWetSlider)
|
|
|
- {
|
|
|
- this->audioProcessor.setChorusDryWet(slider->getValue());
|
|
|
- }
|
|
|
- else if (slider == &this->chorusAmountSlider)
|
|
|
- {
|
|
|
- this->audioProcessor.setChorusAmount(slider->getValue());
|
|
|
- }
|
|
|
- else if (slider == &this->reverbDryWetSlider)
|
|
|
- {
|
|
|
- this->audioProcessor.setReverbDryWet(slider->getValue());
|
|
|
- }
|
|
|
- else if (slider == &this->reverbRoomSizeSlider)
|
|
|
- {
|
|
|
- this->audioProcessor.setReverbRoomSize(slider->getValue());
|
|
|
- }
|
|
|
- else if (slider == &this->delayDryWetSlider)
|
|
|
- {
|
|
|
- this->audioProcessor.setDelayDryWet(slider->getValue());
|
|
|
- }
|
|
|
- else if (slider == &this->delayAmountSlider)
|
|
|
- {
|
|
|
- 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());
|
|
|
- }
|
|
|
-}
|
|
|
+{}
|