diff --git a/Source/EffectsComponent.cpp b/Source/EffectsComponent.cpp index d39a452..9bc1f4b 100644 --- a/Source/EffectsComponent.cpp +++ b/Source/EffectsComponent.cpp @@ -5,7 +5,9 @@ EffectsComponent::EffectsComponent(OscirenderAudioProcessor& p, OscirenderAudioProcessorEditor& editor) : audioProcessor(p), itemData(p, editor), listBoxModel(listBox, itemData) { setText("Audio Effects"); +#if !defined(MIDI_ALWAYS_ENABLED) || (MIDI_ALWAYS_ENABLED == 0) addAndMakeVisible(frequency); +#endif frequency.slider.setSkewFactorFromMidPoint(500.0); frequency.slider.setTextValueSuffix("Hz"); diff --git a/Source/MainComponent.cpp b/Source/MainComponent.cpp index 2e52e6e..df47597 100644 --- a/Source/MainComponent.cpp +++ b/Source/MainComponent.cpp @@ -2,6 +2,7 @@ #include "parser/FileParser.h" #include "parser/FrameProducer.h" #include "PluginEditor.h" +#include "MidiAlwaysEnabled.h" MainComponent::MainComponent(OscirenderAudioProcessor& p, OscirenderAudioProcessorEditor& editor) : audioProcessor(p), pluginEditor(editor) { setText("Main Settings"); @@ -48,11 +49,12 @@ MainComponent::MainComponent(OscirenderAudioProcessor& p, OscirenderAudioProcess closeFileButton.setTooltip("Close the currently open file."); +#if !defined(MIDI_ALWAYS_ENABLED) || (MIDI_ALWAYS_ENABLED == 0) addAndMakeVisible(inputEnabled); inputEnabled.onClick = [this] { audioProcessor.inputEnabled->setBoolValueNotifyingHost(!audioProcessor.inputEnabled->getBoolValue()); }; - +#endif addAndMakeVisible(fileLabel); fileLabel.setJustificationType(juce::Justification::centred); updateFileLabel(); diff --git a/Source/MidiComponent.cpp b/Source/MidiComponent.cpp index 7117dbd..081f229 100644 --- a/Source/MidiComponent.cpp +++ b/Source/MidiComponent.cpp @@ -1,10 +1,13 @@ #include "MidiComponent.h" #include "PluginEditor.h" +#include "MidiAlwaysEnabled.h" MidiComponent::MidiComponent(OscirenderAudioProcessor& p, OscirenderAudioProcessorEditor& editor) : audioProcessor(p), pluginEditor(editor) { setText("MIDI Settings"); - addAndMakeVisible(midiToggle); + if (!isMidiAlwaysEnabled()) { + addAndMakeVisible(midiToggle); + } addAndMakeVisible(voicesSlider); addAndMakeVisible(voicesLabel); addAndMakeVisible(keyboard);