# pragma once #include "../JuceLibraryCode/JuceHeader.h" #include "FluidSynthModel.h" using namespace std; using SliderAttachment = AudioProcessorValueTreeState::SliderAttachment; class SlidersComponent : public Component { public: SlidersComponent( AudioProcessorValueTreeState& valueTreeState, FluidSynthModel& fluidSynthModel); ~SlidersComponent(); void resized() override; const int getDesiredWidth(); void acceptMidiControlEvent(int controller, int value); private: std::function makeSliderListener(Slider& slider, int controller); AudioProcessorValueTreeState& valueTreeState; FluidSynthModel& fluidSynthModel; GroupComponent envelopeGroup; Slider attackSlider; Label attackLabel; unique_ptr attackSliderAttachment; Slider decaySlider; Label decayLabel; unique_ptr decaySliderAttachment; Slider sustainSlider; Label sustainLabel; unique_ptr sustainSliderAttachment; Slider releaseSlider; Label releaseLabel; unique_ptr releaseSliderAttachment; GroupComponent filterGroup; Slider filterCutOffSlider; Label filterCutOffLabel; unique_ptr filterCutOffSliderAttachment; Slider filterResonanceSlider; Label filterResonanceLabel; unique_ptr filterResonanceSliderAttachment; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SlidersComponent) };