2023-01-15 17:01:27 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "PluginProcessor.h"
|
|
|
|
#include "parser/FileParser.h"
|
|
|
|
#include "parser/FrameProducer.h"
|
2023-07-08 17:59:05 +00:00
|
|
|
#include "components/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"
|
2024-01-25 22:12:25 +00:00
|
|
|
#include "components/AudioRecordingComponent.h"
|
2023-01-15 17:01:27 +00:00
|
|
|
|
2023-03-29 16:19:16 +00:00
|
|
|
class OscirenderAudioProcessorEditor;
|
2023-01-15 17:01:27 +00:00
|
|
|
class MainComponent : public juce::GroupComponent {
|
|
|
|
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-28 20:10:21 +00:00
|
|
|
void paint(juce::Graphics& g) override;
|
2023-07-02 12:09:24 +00:00
|
|
|
void updateFileLabel();
|
2023-01-15 17:01:27 +00:00
|
|
|
private:
|
|
|
|
OscirenderAudioProcessor& audioProcessor;
|
2023-03-29 16:19:16 +00:00
|
|
|
OscirenderAudioProcessorEditor& pluginEditor;
|
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-08-27 15:41:16 +00:00
|
|
|
juce::TextButton openOscilloscope{"Open Oscilloscope"};
|
2023-07-08 17:59:05 +00:00
|
|
|
|
2023-07-09 20:30:33 +00:00
|
|
|
juce::Label frequencyLabel;
|
2023-07-13 19:11:24 +00:00
|
|
|
int callbackIndex = -1;
|
2023-07-09 20:30:33 +00:00
|
|
|
|
2024-01-27 10:19:48 +00:00
|
|
|
AudioRecordingComponent recorder{audioProcessor};
|
2024-01-25 22:12:25 +00:00
|
|
|
|
2023-01-15 17:01:27 +00:00
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MainComponent)
|
|
|
|
};
|