-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
FrameSettingsComponent.h
41 lines (34 loc) · 1.64 KB
/
FrameSettingsComponent.h
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
#pragma once
#include <JuceHeader.h>
#include "PluginProcessor.h"
#include "components/DoubleTextBox.h"
#include "components/EffectComponent.h"
#include "components/SwitchButton.h"
class OscirenderAudioProcessorEditor;
class FrameSettingsComponent : public juce::GroupComponent, public juce::AudioProcessorParameter::Listener, juce::AsyncUpdater {
public:
FrameSettingsComponent(OscirenderAudioProcessor&, OscirenderAudioProcessorEditor&);
~FrameSettingsComponent();
void resized() override;
void parameterValueChanged(int parameterIndex, float newValue) override;
void parameterGestureChanged(int parameterIndex, bool gestureIsStarting) override;
void handleAsyncUpdate() override;
void update();
void setAnimated(bool animated);
void setImage(bool image);
private:
OscirenderAudioProcessor& audioProcessor;
OscirenderAudioProcessorEditor& pluginEditor;
bool animated = true;
bool image = true;
jux::SwitchButton animate{audioProcessor.animateFrames};
jux::SwitchButton sync{audioProcessor.animationSyncBPM};
juce::Label rateLabel{ "Framerate","Framerate"};
juce::Label offsetLabel{ "Offset","Offset" };
DoubleTextBox rateBox{ audioProcessor.animationRate->min, audioProcessor.animationRate->max };
DoubleTextBox offsetBox{ audioProcessor.animationOffset->min, audioProcessor.animationRate->max };
jux::SwitchButton invertImage{audioProcessor.invertImage};
EffectComponent threshold{ audioProcessor, *audioProcessor.imageThreshold };
EffectComponent stride{ audioProcessor, *audioProcessor.imageStride };
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FrameSettingsComponent)
};