kopia lustrzana https://github.com/jameshball/osci-render
31 wiersze
1.1 KiB
C++
31 wiersze
1.1 KiB
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#include "PluginProcessor.h"
|
|
|
|
class OscirenderAudioProcessorEditor;
|
|
class MidiComponent : public juce::GroupComponent, public juce::AudioProcessorParameter::Listener, public juce::AsyncUpdater {
|
|
public:
|
|
MidiComponent(OscirenderAudioProcessor&, OscirenderAudioProcessorEditor&);
|
|
~MidiComponent() override;
|
|
|
|
void parameterValueChanged(int parameterIndex, float newValue) override;
|
|
void parameterGestureChanged(int parameterIndex, bool gestureIsStarting) override;
|
|
void handleAsyncUpdate() override;
|
|
|
|
void resized() override;
|
|
void paint(juce::Graphics& g) override;
|
|
private:
|
|
OscirenderAudioProcessor& audioProcessor;
|
|
OscirenderAudioProcessorEditor& pluginEditor;
|
|
|
|
juce::ToggleButton midiToggle{"Enable MIDI"};
|
|
juce::Slider voicesSlider;
|
|
juce::Label voicesLabel;
|
|
juce::TextButton midiSettingsButton{"Audio/MIDI Settings..."};
|
|
juce::MidiKeyboardComponent keyboard{audioProcessor.keyboardState, juce::MidiKeyboardComponent::horizontalKeyboard};
|
|
|
|
EnvelopeContainerComponent envelope;
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MidiComponent)
|
|
}; |