Proteus

Guitar amp and pedal capture plugin using neural networks
Log | Files | Refs | Submodules | README

commit b6b3930e14d8a77374a473db929b67d5195f6e19
parent aa694ca0c79a427eb876a437028864f19d696b4c
Author: Keith <smartguitarml@gmail.com>
Date:   Mon,  2 Jan 2023 13:27:27 -0600

Updated graphics

Diffstat:
MCMakeLists.txt | 2+-
Mresources/CMakeLists.txt | 2++
Mresources/background_on.jpg | 0
Mresources/background_on_blue.jpg | 0
Aresources/big_knob.png | 0
Mresources/cab_switch_off.png | 0
Mresources/cab_switch_on.png | 0
Aresources/small_knob.png | 0
Msrc/PluginEditor.cpp | 67++++++++++++++++++++++++++++++++++++-------------------------------
Msrc/PluginEditor.h | 8+++++---
10 files changed, 44 insertions(+), 35 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -9,7 +9,7 @@ include_directories(modules) juce_set_aax_sdk_path(C:/SDKs/AAX_SDK/) -set(JUCE_FORMATS AU VST3) +set(JUCE_FORMATS AU VST3 Standalone) # Build LV2 only on Linux if(UNIX AND NOT APPLE) diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt @@ -8,6 +8,8 @@ juce_add_binary_data(BinaryData SOURCES default_ir.wav cab_switch_off.png cab_switch_on.png + big_knob.png + small_knob.png ) diff --git a/resources/background_on.jpg b/resources/background_on.jpg Binary files differ. diff --git a/resources/background_on_blue.jpg b/resources/background_on_blue.jpg Binary files differ. diff --git a/resources/big_knob.png b/resources/big_knob.png Binary files differ. diff --git a/resources/cab_switch_off.png b/resources/cab_switch_off.png Binary files differ. diff --git a/resources/cab_switch_on.png b/resources/cab_switch_on.png Binary files differ. diff --git a/resources/small_knob.png b/resources/small_knob.png Binary files differ. diff --git a/src/PluginEditor.cpp b/src/PluginEditor.cpp @@ -38,10 +38,12 @@ ProteusAudioProcessorEditor::ProteusAudioProcessorEditor (ProteusAudioProcessor& font.setHeight(height); // Set Widget Graphics - blackHexKnobLAF.setLookAndFeel(ImageCache::getFromMemory(BinaryData::knob_hex_png, BinaryData::knob_hex_pngSize)); + bigKnobLAF.setLookAndFeel(ImageCache::getFromMemory(BinaryData::big_knob_png, BinaryData::big_knob_pngSize)); + smallKnobLAF.setLookAndFeel(ImageCache::getFromMemory(BinaryData::small_knob_png, BinaryData::small_knob_pngSize)); // Pre Amp Pedal Widgets + /* // Overdrive odFootSw.setImages(true, true, true, ImageCache::getFromMemory(BinaryData::footswitch_up_png, BinaryData::footswitch_up_pngSize), 1.0, Colours::transparentWhite, @@ -50,6 +52,7 @@ ProteusAudioProcessorEditor::ProteusAudioProcessorEditor (ProteusAudioProcessor& 0.0); addAndMakeVisible(odFootSw); odFootSw.addListener(this); + */ cabOnButton.setImages(true, true, true, ImageCache::getFromMemory(BinaryData::cab_switch_on_png, BinaryData::cab_switch_on_pngSize), 1.0, Colours::transparentWhite, @@ -61,7 +64,7 @@ ProteusAudioProcessorEditor::ProteusAudioProcessorEditor (ProteusAudioProcessor& driveSliderAttach = std::make_unique<AudioProcessorValueTreeState::SliderAttachment>(processor.treeState, GAIN_ID, odDriveKnob); addAndMakeVisible(odDriveKnob); - odDriveKnob.setLookAndFeel(&blackHexKnobLAF); + odDriveKnob.setLookAndFeel(&bigKnobLAF); odDriveKnob.addListener(this); odDriveKnob.setSliderStyle(juce::Slider::SliderStyle::RotaryVerticalDrag); odDriveKnob.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, false, 50, 20); @@ -69,7 +72,7 @@ ProteusAudioProcessorEditor::ProteusAudioProcessorEditor (ProteusAudioProcessor& masterSliderAttach = std::make_unique<AudioProcessorValueTreeState::SliderAttachment>(processor.treeState, MASTER_ID, odLevelKnob); addAndMakeVisible(odLevelKnob); - odLevelKnob.setLookAndFeel(&blackHexKnobLAF); + odLevelKnob.setLookAndFeel(&smallKnobLAF); odLevelKnob.addListener(this); odLevelKnob.setSliderStyle(juce::Slider::SliderStyle::RotaryVerticalDrag); odLevelKnob.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, false, 50, 20); @@ -77,7 +80,7 @@ ProteusAudioProcessorEditor::ProteusAudioProcessorEditor (ProteusAudioProcessor& bassSliderAttach = std::make_unique<AudioProcessorValueTreeState::SliderAttachment>(processor.treeState, BASS_ID, ampBassKnob); addAndMakeVisible(ampBassKnob); - ampBassKnob.setLookAndFeel(&blackHexKnobLAF); + ampBassKnob.setLookAndFeel(&smallKnobLAF); ampBassKnob.addListener(this); ampBassKnob.setSliderStyle(juce::Slider::SliderStyle::RotaryVerticalDrag); ampBassKnob.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, false, 50, 20); @@ -85,7 +88,7 @@ ProteusAudioProcessorEditor::ProteusAudioProcessorEditor (ProteusAudioProcessor& midSliderAttach = std::make_unique<AudioProcessorValueTreeState::SliderAttachment>(processor.treeState, MID_ID, ampMidKnob); addAndMakeVisible(ampMidKnob); - ampMidKnob.setLookAndFeel(&blackHexKnobLAF); + ampMidKnob.setLookAndFeel(&smallKnobLAF); ampMidKnob.addListener(this); ampMidKnob.setSliderStyle(juce::Slider::SliderStyle::RotaryVerticalDrag); ampMidKnob.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, false, 50, 20); @@ -93,7 +96,7 @@ ProteusAudioProcessorEditor::ProteusAudioProcessorEditor (ProteusAudioProcessor& trebleSliderAttach = std::make_unique<AudioProcessorValueTreeState::SliderAttachment>(processor.treeState, TREBLE_ID, ampTrebleKnob); addAndMakeVisible(ampTrebleKnob); - ampTrebleKnob.setLookAndFeel(&blackHexKnobLAF); + ampTrebleKnob.setLookAndFeel(&smallKnobLAF); ampTrebleKnob.addListener(this); ampTrebleKnob.setSliderStyle(juce::Slider::SliderStyle::RotaryVerticalDrag); ampTrebleKnob.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, false, 50, 20); @@ -127,23 +130,23 @@ void ProteusAudioProcessorEditor::paint (Graphics& g) { // Workaround for graphics on Windows builds (clipping code doesn't work correctly on Windows) #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) - if (processor.fw_state == 0) { - g.drawImageAt(background_off, 0, 0); // Debug Line: Redraw entire background image - } else if (processor.fw_state == 1 && processor.conditioned == true) { - g.drawImageAt(background_on_blue, 0, 0); // Debug Line: Redraw entire background image - } else if (processor.fw_state == 1 && processor.conditioned == false) { + //if (processor.fw_state == 0) { + // g.drawImageAt(background_off, 0, 0); // Debug Line: Redraw entire background image + if (processor.fw_state == 1 && processor.conditioned == true) { g.drawImageAt(background_on, 0, 0); // Debug Line: Redraw entire background image + } else if (processor.fw_state == 1 && processor.conditioned == false) { + g.drawImageAt(background_on_blue, 0, 0); // Debug Line: Redraw entire background image } #else // Redraw only the clipped part of the background image juce::Rectangle<int> ClipRect = g.getClipBounds(); - if (processor.fw_state == 0) { - g.drawImage(background_off, ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight(), ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight()); - } else if (processor.fw_state == 1 && processor.conditioned == true) { - g.drawImage(background_on_blue, ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight(), ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight()); - } else if (processor.fw_state == 1 && processor.conditioned == false) + //if (processor.fw_state == 0) { + // g.drawImage(background_off, ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight(), ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight()); + if (processor.fw_state == 1 && processor.conditioned == true) { g.drawImage(background_on, ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight(), ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight()); + } else if (processor.fw_state == 1 && processor.conditioned == false) + g.drawImage(background_on_blue, ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight(), ClipRect.getX(), ClipRect.getY(), ClipRect.getWidth(), ClipRect.getHeight()); #endif } @@ -157,16 +160,16 @@ void ProteusAudioProcessorEditor::resized() modelSelect.setBounds(52, 11, 400, 28); //modelLabel.setBounds(197, 2, 90, 25); versionLabel.setBounds(462, 632, 60, 10); - cabOnButton.setBounds(370, 565, 26, 11); + cabOnButton.setBounds(115, 233, 53, 39); // Overdrive Widgets - odDriveKnob.setBounds(103, 97, 176, 176); - odLevelKnob.setBounds(268, 97, 176, 176); - odFootSw.setBounds(185, 416, 175, 160); + odDriveKnob.setBounds(168, 242, 190, 190); + odLevelKnob.setBounds(340, 225, 62, 62); + //odFootSw.setBounds(185, 416, 175, 160); - ampBassKnob.setBounds(350, 480, 75, 75); - ampMidKnob.setBounds(350, 400, 75, 75); - ampTrebleKnob.setBounds(350, 320, 75, 75); + ampBassKnob.setBounds(113, 131, 62, 62); + ampMidKnob.setBounds(227, 131, 62, 62); + ampTrebleKnob.setBounds(340, 131, 62, 62); } bool ProteusAudioProcessorEditor::isValidFormat(File configFile) @@ -299,9 +302,9 @@ void ProteusAudioProcessorEditor::loadFromFolder() void ProteusAudioProcessorEditor::buttonClicked(juce::Button* button) { - if (button == &odFootSw) { - odFootSwClicked(); - } else if (button == &loadButton) { + //if (button == &odFootSw) { + // odFootSwClicked(); + if (button == &loadButton) { loadButtonClicked(); } else if (button == &cabOnButton) { cabOnButtonClicked(); @@ -309,11 +312,11 @@ void ProteusAudioProcessorEditor::buttonClicked(juce::Button* button) } void ProteusAudioProcessorEditor::odFootSwClicked() { - if (processor.fw_state == 0) - processor.fw_state = 1; - else - processor.fw_state = 0; - resetImages(); + //if (processor.fw_state == 0) + // processor.fw_state = 1; + //else + // processor.fw_state = 0; + //resetImages(); } void ProteusAudioProcessorEditor::cabOnButtonClicked() { @@ -352,6 +355,7 @@ void ProteusAudioProcessorEditor::modelSelectChanged() void ProteusAudioProcessorEditor::resetImages() { repaint(); + /* if (processor.fw_state == 0) { odFootSw.setImages(true, true, true, ImageCache::getFromMemory(BinaryData::footswitch_up_png, BinaryData::footswitch_up_pngSize), 1.0, Colours::transparentWhite, @@ -366,6 +370,7 @@ void ProteusAudioProcessorEditor::resetImages() ImageCache::getFromMemory(BinaryData::footswitch_down_png, BinaryData::footswitch_down_pngSize), 1.0, Colours::transparentWhite, 0.0); } + */ // Set On/Off cab graphic if (processor.cab_state == 0) { cabOnButton.setImages(true, true, true, diff --git a/src/PluginEditor.h b/src/PluginEditor.h @@ -49,7 +49,7 @@ private: // LookandFeels and Graphics Image background_on = ImageCache::getFromMemory(BinaryData::background_on_jpg, BinaryData::background_on_jpgSize); Image background_on_blue = ImageCache::getFromMemory(BinaryData::background_on_blue_jpg, BinaryData::background_on_blue_jpgSize); - Image background_off = ImageCache::getFromMemory(BinaryData::background_off_jpg, BinaryData::background_off_jpgSize); + //Image background_off = ImageCache::getFromMemory(BinaryData::background_off_jpg, BinaryData::background_off_jpgSize); // Global Widgets Label modelLabel; @@ -63,13 +63,15 @@ private: Slider ampTrebleKnob; Slider odDriveKnob; Slider odLevelKnob; - ImageButton odFootSw; + //ImageButton odFootSw; //ImageButton odLED; ImageButton cabOnButton; // LookandFeels - myLookAndFeel blackHexKnobLAF; + //myLookAndFeel blackHexKnobLAF; + myLookAndFeel bigKnobLAF; + myLookAndFeel smallKnobLAF; virtual void sliderValueChanged(Slider* slider) override;