2023-08-29 19:47:13 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "PluginProcessor.h"
|
|
|
|
|
|
|
|
class OscirenderAudioProcessorEditor;
|
2023-11-25 15:37:33 +00:00
|
|
|
class MidiComponent : public juce::Component, public juce::AudioProcessorParameter::Listener, public juce::AsyncUpdater {
|
2023-08-29 19:47:13 +00:00
|
|
|
public:
|
|
|
|
MidiComponent(OscirenderAudioProcessor&, OscirenderAudioProcessorEditor&);
|
2023-11-25 15:37:33 +00:00
|
|
|
~MidiComponent() override;
|
|
|
|
|
|
|
|
void parameterValueChanged(int parameterIndex, float newValue) override;
|
|
|
|
void parameterGestureChanged(int parameterIndex, bool gestureIsStarting) override;
|
|
|
|
void handleAsyncUpdate() override;
|
2023-08-29 19:47:13 +00:00
|
|
|
|
|
|
|
void resized() override;
|
|
|
|
void paint(juce::Graphics& g) override;
|
|
|
|
private:
|
|
|
|
OscirenderAudioProcessor& audioProcessor;
|
|
|
|
OscirenderAudioProcessorEditor& pluginEditor;
|
|
|
|
|
|
|
|
juce::ToggleButton midiToggle{"Enable MIDI"};
|
|
|
|
juce::MidiKeyboardState keyboardState;
|
|
|
|
juce::MidiKeyboardComponent keyboard{keyboardState, juce::MidiKeyboardComponent::horizontalKeyboard};
|
|
|
|
|
2023-11-25 15:37:33 +00:00
|
|
|
EnvelopeContainerComponent envelope;
|
|
|
|
|
2023-08-29 19:47:13 +00:00
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MidiComponent)
|
|
|
|
};
|