-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainComponent.h
More file actions
62 lines (39 loc) · 1.14 KB
/
Copy pathMainComponent.h
File metadata and controls
62 lines (39 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "../JuceLibraryCode/JuceHeader.h"
enum ParameterSize {
CONTROL_HEIGHT = 40,
LABEL_WIDTH = 80,
SLIDER_WIDTH = 300
};
class MainComponent : public AudioAppComponent
{
public:
MainComponent();
~MainComponent();
typedef AudioProcessorValueTreeState::SliderAttachment SliderAttachment;
void prepareToPlay(int samplesPerBlockExpected, double sampleRate) override;
void getNextAudioBlock(const AudioSourceChannelInfo& bufferToFill) override;
void releaseResources() override;
void paint(Graphics& graphics) override;
void resized() override;
private:
#pragma region UIObjects
Slider Drive;
Slider Volume;
Slider Gain;
Slider Range;
#pragma endregion
#pragma region Labels
Label DriveLabel;
Label VolLabel;
Label GainLabel;
Label RangeLabel;
#pragma endregion
#pragma region Attachments
std::unique_ptr<SliderAttachment> driveAttachment;
std::unique_ptr<SliderAttachment> volumeAttachment;
std::unique_ptr<SliderAttachment> gainAttachment;
std::unique_ptr<SliderAttachment> rangeAttachment;
#pragma endregion
AudioProcessorValueTreeState valueTreeState;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MainComponent)
};