2023-01-15 17:01:27 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "PluginProcessor.h"
|
|
|
|
#include "parser/FileParser.h"
|
|
|
|
#include "parser/FrameProducer.h"
|
2024-11-09 19:19:36 +00:00
|
|
|
#include "visualiser/VisualiserComponent.h"
|
2023-07-09 20:30:33 +00:00
|
|
|
#include "audio/PitchDetector.h"
|
2023-10-19 13:55:00 +00:00
|
|
|
#include "UGen/ugen_JuceEnvelopeComponent.h"
|
2023-12-14 21:26:40 +00:00
|
|
|
#include "components/SvgButton.h"
|
2023-01-15 17:01:27 +00:00
|
|
|
|
2023-03-29 16:19:16 +00:00
|
|
|
class OscirenderAudioProcessorEditor;
|
2025-01-07 18:55:35 +00:00
|
|
|
class MainComponent : public juce::GroupComponent, public juce::AudioProcessorParameter::Listener {
|
2023-01-15 17:01:27 +00:00
|
|
|
public:
|
2023-03-29 16:19:16 +00:00
|
|
|
MainComponent(OscirenderAudioProcessor&, OscirenderAudioProcessorEditor&);
|
2023-01-15 17:01:27 +00:00
|
|
|
~MainComponent() override;
|
|
|
|
|
|
|
|
void resized() override;
|
2023-07-02 12:09:24 +00:00
|
|
|
void updateFileLabel();
|
2025-01-07 18:55:35 +00:00
|
|
|
void parameterValueChanged(int parameterIndex, float newValue) override;
|
|
|
|
void parameterGestureChanged(int parameterIndex, bool gestureIsStarting) override;
|
|
|
|
|
2023-01-15 17:01:27 +00:00
|
|
|
private:
|
|
|
|
OscirenderAudioProcessor& audioProcessor;
|
2023-03-29 16:19:16 +00:00
|
|
|
OscirenderAudioProcessorEditor& pluginEditor;
|
2024-06-02 14:01:39 +00:00
|
|
|
|
|
|
|
bool isBinaryFile(juce::String name);
|
2023-01-15 17:01:27 +00:00
|
|
|
|
|
|
|
std::unique_ptr<juce::FileChooser> chooser;
|
|
|
|
juce::TextButton fileButton;
|
2024-02-20 14:57:52 +00:00
|
|
|
SvgButton closeFileButton{"closeFile", juce::String(BinaryData::delete_svg), juce::Colours::red};
|
2024-01-27 13:57:18 +00:00
|
|
|
SvgButton inputEnabled{"inputEnabled", juce::String(BinaryData::microphone_svg), juce::Colours::white, juce::Colours::red, audioProcessor.inputEnabled};
|
2023-03-30 20:09:53 +00:00
|
|
|
juce::Label fileLabel;
|
2024-02-22 14:28:09 +00:00
|
|
|
SvgButton leftArrow{"leftArrow", juce::String(BinaryData::left_arrow_svg), juce::Colours::white};
|
|
|
|
SvgButton rightArrow{"rightArrow", juce::String(BinaryData::right_arrow_svg), juce::Colours::white};
|
|
|
|
bool showLeftArrow = false;
|
|
|
|
bool showRightArrow = false;
|
2023-03-30 20:09:53 +00:00
|
|
|
|
2023-07-05 21:45:51 +00:00
|
|
|
juce::TextEditor fileName;
|
|
|
|
juce::ComboBox fileType;
|
|
|
|
juce::TextButton createFile{"Create File"};
|
|
|
|
|
2023-01-15 17:01:27 +00:00
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MainComponent)
|
2024-06-02 14:01:39 +00:00
|
|
|
};
|