Files
NeuralSynth/Source/PluginEditor.h
2025-06-23 00:16:47 +01:00

49 lines
1.8 KiB
C++

/*
==============================================================================
This file contains the basic framework code for a JUCE plugin editor.
==============================================================================
*/
#pragma once
#include <JuceHeader.h>
#include "PluginProcessor.h"
#include "ScopeComponent.h"
//==============================================================================
/**
*/
class NeuralSynthAudioProcessorEditor : public juce::AudioProcessorEditor
{
public:
NeuralSynthAudioProcessorEditor (NeuralSynthAudioProcessor&);
~NeuralSynthAudioProcessorEditor() override;
//==============================================================================
void paint (juce::Graphics&) override;
void resized() override;
private:
// This reference is provided as a quick way for your editor to
// access the processor object that created it.
NeuralSynthAudioProcessor& audioProcessor;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NeuralSynthAudioProcessorEditor)
juce::ComboBox waveformSelector;
std::unique_ptr<juce::AudioProcessorValueTreeState::ComboBoxAttachment> waveformAttachment;
juce::Slider attackSlider, decaySlider, sustainSlider, releaseSlider;
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> attackAttachment;
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> decayAttachment;
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> sustainAttachment;
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> releaseAttachment;
juce::MidiKeyboardState midiKeyboardState;
juce::MidiKeyboardComponent midiKeyboardComponent{ midiKeyboardState, juce::MidiKeyboardComponent::horizontalKeyboard };
ScopeComponent<float> scopeComponent;
};