2019-06-30 17:59:07 +08:00
|
|
|
# pragma once
|
|
|
|
|
|
|
|
#include "../JuceLibraryCode/JuceHeader.h"
|
2019-07-01 04:40:24 +08:00
|
|
|
#include "FluidSynthModel.h"
|
2019-07-02 06:55:14 +08:00
|
|
|
#include "SharesParams.h"
|
|
|
|
#include "SlidersFragment.h"
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
using namespace std;
|
2019-07-03 06:27:56 +08:00
|
|
|
using SliderAttachment = AudioProcessorValueTreeState::SliderAttachment;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
2019-07-02 06:55:14 +08:00
|
|
|
class SlidersComponent : public Component,
|
|
|
|
public SlidersFragment
|
2019-06-30 17:59:07 +08:00
|
|
|
{
|
|
|
|
public:
|
2019-07-02 06:55:14 +08:00
|
|
|
SlidersComponent(
|
2019-07-08 00:35:31 +08:00
|
|
|
// SharesParams& sharedParams,
|
2019-07-04 06:38:56 +08:00
|
|
|
AudioProcessorValueTreeState& valueTreeState,
|
2019-07-07 07:22:47 +08:00
|
|
|
FluidSynthModel& fluidSynthModel);
|
2019-06-30 17:59:07 +08:00
|
|
|
~SlidersComponent();
|
|
|
|
|
|
|
|
void resized() override;
|
|
|
|
|
2019-06-30 18:39:39 +08:00
|
|
|
const int getDesiredWidth();
|
|
|
|
|
2019-07-02 06:55:14 +08:00
|
|
|
virtual void acceptMidiControlEvent(int controller, int value) override;
|
|
|
|
|
|
|
|
// virtual void updateAttackSlider(int value) override;
|
|
|
|
// virtual void updateDecaySlider(int value) override;
|
|
|
|
// virtual void updateSustainSlider(int value) override;
|
|
|
|
// virtual void updateReleaseSlider(int value) override;
|
|
|
|
|
|
|
|
// virtual void updateFilterCutOffSlider(int value) override;
|
|
|
|
// virtual void updateFilterResonanceSlider(int value) override;
|
|
|
|
|
2019-06-30 17:59:07 +08:00
|
|
|
private:
|
2019-07-01 04:40:24 +08:00
|
|
|
std::function<void()> makeSliderListener(Slider& slider, int controller);
|
|
|
|
|
2019-07-08 00:35:31 +08:00
|
|
|
// SharesParams& sharedParams;
|
2019-07-04 06:38:56 +08:00
|
|
|
AudioProcessorValueTreeState& valueTreeState;
|
2019-07-07 07:22:47 +08:00
|
|
|
FluidSynthModel& fluidSynthModel;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
GroupComponent envelopeGroup;
|
|
|
|
|
|
|
|
Slider attackSlider;
|
|
|
|
Label attackLabel;
|
2019-07-03 06:27:56 +08:00
|
|
|
unique_ptr<SliderAttachment> attackSliderAttachment;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
Slider decaySlider;
|
|
|
|
Label decayLabel;
|
2019-07-03 06:27:56 +08:00
|
|
|
unique_ptr<SliderAttachment> decaySliderAttachment;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
Slider sustainSlider;
|
|
|
|
Label sustainLabel;
|
2019-07-03 06:27:56 +08:00
|
|
|
unique_ptr<SliderAttachment> sustainSliderAttachment;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
Slider releaseSlider;
|
|
|
|
Label releaseLabel;
|
2019-07-03 06:27:56 +08:00
|
|
|
unique_ptr<SliderAttachment> releaseSliderAttachment;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
GroupComponent filterGroup;
|
|
|
|
|
|
|
|
Slider filterCutOffSlider;
|
|
|
|
Label filterCutOffLabel;
|
2019-07-03 06:27:56 +08:00
|
|
|
unique_ptr<SliderAttachment> filterCutOffSliderAttachment;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
Slider filterResonanceSlider;
|
|
|
|
Label filterResonanceLabel;
|
2019-07-03 06:27:56 +08:00
|
|
|
unique_ptr<SliderAttachment> filterResonanceSliderAttachment;
|
2019-06-30 17:59:07 +08:00
|
|
|
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SlidersComponent)
|
|
|
|
};
|