Proteus

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

PluginEditor.h (3128B)


      1 /*
      2   ==============================================================================
      3 
      4     This file was auto-generated!
      5 
      6     It contains the basic framework code for a JUCE plugin editor.
      7 
      8   ==============================================================================
      9 */
     10 
     11 #pragma once
     12 
     13 #include "../JuceLibraryCode/JuceHeader.h"
     14 #include "PluginProcessor.h"
     15 #include "myLookAndFeel.h"
     16 
     17 //==============================================================================
     18 /**
     19 */
     20 class ProteusAudioProcessorEditor  : public AudioProcessorEditor,
     21                                        private Button::Listener,
     22                                        private Slider::Listener                  
     23 {
     24 public:
     25     ProteusAudioProcessorEditor (ProteusAudioProcessor&);
     26     ~ProteusAudioProcessorEditor();
     27 
     28     //==============================================================================
     29     void paint (Graphics&) override;
     30     void resized() override;
     31     std::unique_ptr<FileChooser> myChooser;
     32 
     33     void loadFromFolder();
     34     void resetImages();
     35 
     36 private:
     37     // This reference is provided as a quick way for your editor to
     38     // access the processor object that created it.
     39     ProteusAudioProcessor& processor;
     40 
     41 
     42     TextButton loadButton;
     43     virtual void buttonClicked(Button* button) override;
     44 
     45     bool isValidFormat(File configFile);
     46     void loadButtonClicked();
     47 
     48     //Image background = ImageCache::getFromMemory(BinaryData::smart_pedal_jpg, BinaryData::smart_pedal_jpgSize);
     49     // LookandFeels and Graphics
     50     Image background_on = ImageCache::getFromMemory(BinaryData::background_on_jpg, BinaryData::background_on_jpgSize);
     51     Image background_on_blue = ImageCache::getFromMemory(BinaryData::background_on_blue_jpg, BinaryData::background_on_blue_jpgSize);
     52     //Image background_off = ImageCache::getFromMemory(BinaryData::background_off_jpg, BinaryData::background_off_jpgSize);
     53 
     54     // Global Widgets
     55     Label modelLabel;
     56     Label versionLabel;
     57 
     58     ComboBox modelSelect;
     59 
     60     // Overdrive Widgets
     61     Slider ampBassKnob;
     62     Slider ampMidKnob;
     63     Slider ampTrebleKnob;
     64     Slider odDriveKnob;
     65     Slider odLevelKnob;
     66     //ImageButton odFootSw;
     67     //ImageButton odLED;
     68     ImageButton cabOnButton;
     69 
     70     
     71     // LookandFeels 
     72     //myLookAndFeel blackHexKnobLAF;
     73     myLookAndFeel bigKnobLAF;
     74     myLookAndFeel smallKnobLAF;
     75 
     76     virtual void sliderValueChanged(Slider* slider) override;
     77 
     78     AudioProcessorParameter* getParameter(const String& paramId);
     79  
     80     void odFootSwClicked();
     81     void modelSelectChanged();
     82     void cabOnButtonClicked();
     83 
     84     bool model_loaded = false;
     85 
     86 public:
     87     std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> bassSliderAttach;
     88     std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> midSliderAttach;
     89     std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> trebleSliderAttach;
     90     std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> driveSliderAttach;
     91     std::unique_ptr <AudioProcessorValueTreeState::SliderAttachment> masterSliderAttach;
     92  
     93     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProteusAudioProcessorEditor)
     94 };