2024-04-15 19:54:25 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "PluginProcessor.h"
|
2024-04-21 18:07:15 +00:00
|
|
|
#include "components/DoubleTextBox.h"
|
2024-05-11 22:10:54 +00:00
|
|
|
#include "components/EffectComponent.h"
|
2024-08-13 13:55:30 +00:00
|
|
|
#include "components/SwitchButton.h"
|
2024-04-15 19:54:25 +00:00
|
|
|
|
|
|
|
class OscirenderAudioProcessorEditor;
|
2024-05-11 22:10:54 +00:00
|
|
|
class FrameSettingsComponent : public juce::GroupComponent, public juce::AudioProcessorParameter::Listener, juce::AsyncUpdater {
|
2024-04-15 19:54:25 +00:00
|
|
|
public:
|
2024-05-11 22:10:54 +00:00
|
|
|
FrameSettingsComponent(OscirenderAudioProcessor&, OscirenderAudioProcessorEditor&);
|
|
|
|
~FrameSettingsComponent();
|
2024-04-15 19:54:25 +00:00
|
|
|
|
|
|
|
void resized() override;
|
2024-04-26 19:34:50 +00:00
|
|
|
void parameterValueChanged(int parameterIndex, float newValue) override;
|
|
|
|
void parameterGestureChanged(int parameterIndex, bool gestureIsStarting) override;
|
|
|
|
void handleAsyncUpdate() override;
|
2024-04-15 19:54:25 +00:00
|
|
|
void update();
|
2024-06-01 20:50:56 +00:00
|
|
|
void setAnimated(bool animated);
|
|
|
|
void setImage(bool image);
|
2024-04-15 19:54:25 +00:00
|
|
|
private:
|
|
|
|
OscirenderAudioProcessor& audioProcessor;
|
|
|
|
OscirenderAudioProcessorEditor& pluginEditor;
|
2024-06-01 20:50:56 +00:00
|
|
|
|
|
|
|
bool animated = true;
|
|
|
|
bool image = true;
|
2024-04-15 19:54:25 +00:00
|
|
|
|
2024-08-13 13:55:30 +00:00
|
|
|
jux::SwitchButton animate{audioProcessor.animateFrames};
|
|
|
|
jux::SwitchButton sync{audioProcessor.animationSyncBPM};
|
2024-04-17 15:00:59 +00:00
|
|
|
juce::Label rateLabel{ "Framerate","Framerate"};
|
|
|
|
juce::Label offsetLabel{ "Offset","Offset" };
|
2024-04-26 20:21:59 +00:00
|
|
|
DoubleTextBox rateBox{ audioProcessor.animationRate->min, audioProcessor.animationRate->max };
|
|
|
|
DoubleTextBox offsetBox{ audioProcessor.animationOffset->min, audioProcessor.animationRate->max };
|
2024-04-15 19:54:25 +00:00
|
|
|
|
2024-08-13 13:55:30 +00:00
|
|
|
jux::SwitchButton invertImage{audioProcessor.invertImage};
|
2024-09-12 22:09:54 +00:00
|
|
|
EffectComponent threshold{*audioProcessor.imageThreshold};
|
|
|
|
EffectComponent stride{*audioProcessor.imageStride};
|
2024-05-11 22:10:54 +00:00
|
|
|
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FrameSettingsComponent)
|
2024-06-01 20:50:56 +00:00
|
|
|
};
|