mirror of
https://codeberg.org/armin/ambivalence.git
synced 2026-09-01 04:10:48 +02:00
97 lines
No EOL
2.9 KiB
C++
97 lines
No EOL
2.9 KiB
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#include "PluginProcessor.h"
|
|
#include "PresetManager.h"
|
|
#include "GUI/AmbivalenceUI.h"
|
|
#include "GUI/DecayCurveViz.h"
|
|
|
|
class FDNReverbEditor : public juce::AudioProcessorEditor,
|
|
private juce::Timer
|
|
{
|
|
public:
|
|
explicit FDNReverbEditor(FDNReverbAudioProcessor&);
|
|
~FDNReverbEditor() override;
|
|
|
|
void paint(juce::Graphics&) override;
|
|
void resized() override;
|
|
|
|
private:
|
|
void timerCallback() override;
|
|
void updatePanelVisibility();
|
|
|
|
// --- Preset UI helpers ---
|
|
void refreshPresetCombo();
|
|
void savePresetWithDialog();
|
|
void deleteCurrentPreset();
|
|
|
|
FDNReverbAudioProcessor& audioProcessor;
|
|
AmbivalenceLookAndFeel laf;
|
|
|
|
// --- common ---
|
|
AlgorithmSelector algoSelector;
|
|
RT60Visualizer rt60Viz;
|
|
DecayCurveViz decayCurveViz;
|
|
VUMeter vuIn, vuOut;
|
|
juce::Label titleLabel;
|
|
|
|
juce::Label labelMetricsTitle;
|
|
juce::Label labelD50Caption, labelD50Value;
|
|
juce::Label labelC50Caption, labelC50Value;
|
|
juce::Label labelC80Caption, labelC80Value;
|
|
juce::Label labelEDTCaption, labelEDTValue;
|
|
|
|
juce::Label statusLabel;
|
|
|
|
juce::TextButton proModeButton;
|
|
juce::TextButton erSoloButton;
|
|
std::unique_ptr<juce::AudioProcessorValueTreeState::ButtonAttachment> proModeAttachment;
|
|
std::unique_ptr<juce::AudioProcessorValueTreeState::ButtonAttachment> erSoloAttachment;
|
|
|
|
bool isProMode{ false };
|
|
|
|
// --- Normal Mode ---
|
|
ArcKnob kPreDelay, kRoomSize, kDecay;
|
|
ArcKnob kHFDamp, kLFAbsorb;
|
|
ArcKnob kDiffusion, kModAmt, kModRate;
|
|
ArcKnob kStereoW;
|
|
ArcKnob kERLevel, kSaturation;
|
|
ArcKnob kWet, kDry;
|
|
ArcKnob kDuckAmt, kDuckThr, kDuckAtt, kDuckRel;
|
|
ArcKnob kLoCutNorm, kHiCutNorm;
|
|
|
|
// --- ProMode panel ---
|
|
std::array<ArcKnob, 10> kRTBands;
|
|
juce::Label satTypeLabel;
|
|
juce::ComboBox satTypeCombo;
|
|
std::unique_ptr<juce::AudioProcessorValueTreeState::ComboBoxAttachment> satTypeAttachment;
|
|
ArcKnob kTiltLow, kTiltMid, kTiltHigh;
|
|
ArcKnob kLoCutPro, kHiCutPro;
|
|
|
|
// --- preset UI ---
|
|
std::unique_ptr<PresetManager> presetManager;
|
|
juce::TextButton presetPrevButton;
|
|
juce::ComboBox presetCombo;
|
|
juce::TextButton presetNextButton;
|
|
// existing presetSaveButton / presetDeleteButton next to added
|
|
juce::TextButton presetSaveButton;
|
|
juce::TextButton presetLoadButton; // * added
|
|
juce::TextButton presetDeleteButton;
|
|
|
|
// --- layout constants ---
|
|
static constexpr int W = 900;
|
|
static constexpr int H = 540;
|
|
static constexpr int PAD = 8;
|
|
static constexpr int KNOB_W = 64;
|
|
static constexpr int KNOB_H = 72;
|
|
static constexpr int KNOB_LBL_H = 14;
|
|
static constexpr int UNIT_H = 88;
|
|
static constexpr int ROW1_GAP = 18;
|
|
static constexpr int STATUS_H = 16;
|
|
|
|
// Fixed X of the preset panel
|
|
// DUCKING end (616) + gap(16) = 632
|
|
static constexpr int PRESET_PANEL_X = 632;
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FDNReverbEditor)
|
|
}; |