2023-08-29 19:47:13 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "PluginProcessor.h"
|
|
|
|
|
|
|
|
class OscirenderAudioProcessorEditor;
|
2023-12-18 13:41:56 +00:00
|
|
|
class MidiComponent : public juce::GroupComponent, 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"};
|
2023-12-21 14:14:33 +00:00
|
|
|
juce::Slider voicesSlider;
|
|
|
|
juce::Label voicesLabel;
|
2024-01-31 17:08:00 +00:00
|
|
|
juce::TextButton midiSettingsButton{"Audio/MIDI Settings..."};
|
2023-12-18 13:41:56 +00:00
|
|
|
juce::MidiKeyboardComponent keyboard{audioProcessor.keyboardState, juce::MidiKeyboardComponent::horizontalKeyboard};
|
2023-08-29 19:47:13 +00:00
|
|
|
|
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)
|
|
|
|
};
|