2026-08-15 15:36:28 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
|
|
|
|
|
|
class FDNReverbAudioProcessor;
|
|
|
|
|
|
|
|
|
|
// --- Ambivalence Design System ------------------------------------------
|
|
|
|
|
namespace AmbivalenceColors {
|
2026-08-15 18:31:51 +02:00
|
|
|
const juce::Colour Background{ 0xFF181819 }; // palette 0
|
|
|
|
|
const juce::Colour Surface{ 0xFF2C2E34 }; // theme background
|
|
|
|
|
const juce::Colour Panel{ 0xFF2C2E34 }; // theme background
|
|
|
|
|
const juce::Colour Border{ 0xFF3B3E48 }; // selection background
|
|
|
|
|
const juce::Colour Accent{ 0xFFF39660 }; // palette 6/14
|
|
|
|
|
const juce::Colour AccentBlue{ 0xFF76CCE0 }; // palette 4/12
|
|
|
|
|
const juce::Colour TextPrimary{ 0xFFE2E2E3 }; // foreground
|
|
|
|
|
const juce::Colour TextSecondary{ 0xFF7F8490 }; // palette 8
|
|
|
|
|
const juce::Colour ArcTrack{ 0xFF3B3E48 }; // selection background
|
|
|
|
|
const juce::Colour ArcFill{ 0xFF76CCE0 }; // plain blue arc
|
|
|
|
|
const juce::Colour Separator{ 0xFF2C2E34 }; // theme background
|
2026-08-15 15:36:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --- Ambivalence LookAndFeel --------------------------------------------
|
|
|
|
|
class AmbivalenceLookAndFeel : public juce::LookAndFeel_V4
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
AmbivalenceLookAndFeel();
|
|
|
|
|
void drawRotarySlider(juce::Graphics&, int x, int y, int w, int h,
|
|
|
|
|
float sliderPos, float startAngle, float endAngle,
|
|
|
|
|
juce::Slider&) override;
|
|
|
|
|
void drawLinearSlider(juce::Graphics&, int x, int y, int w, int h,
|
|
|
|
|
float sliderPos, float, float,
|
|
|
|
|
juce::Slider::SliderStyle, juce::Slider&) override;
|
|
|
|
|
void drawComboBox(juce::Graphics&, int w, int h, bool isDown,
|
|
|
|
|
int, int, int, int, juce::ComboBox&) override;
|
|
|
|
|
void positionComboBoxText(juce::ComboBox&, juce::Label&) override;
|
|
|
|
|
juce::Font getLabelFont(juce::Label&) override;
|
|
|
|
|
juce::Font getComboBoxFont(juce::ComboBox&) override;
|
|
|
|
|
void drawGroupComponentOutline(juce::Graphics&, int w, int h,
|
|
|
|
|
const juce::String&, const juce::Justification&,
|
|
|
|
|
juce::GroupComponent&) override;
|
2026-08-15 18:31:51 +02:00
|
|
|
|
|
|
|
|
float zoomScale{ 1.0f }; // pushed by the editor so fonts scale with zoom
|
2026-08-15 15:36:28 +02:00
|
|
|
private:
|
|
|
|
|
juce::Font mainFont;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// --- VU Meter --------------------------------------------------------
|
|
|
|
|
class VUMeter : public juce::Component
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum class Side { Input, Output };
|
|
|
|
|
VUMeter(const juce::String& label, Side side);
|
|
|
|
|
void paint(juce::Graphics&) override;
|
|
|
|
|
void setLevels(float l, float r) noexcept { levelL = l; levelR = r; }
|
2026-08-15 18:31:51 +02:00
|
|
|
void setZoomScale(float s) noexcept { zoomScale = s; repaint(); }
|
2026-08-15 15:36:28 +02:00
|
|
|
private:
|
|
|
|
|
juce::String label;
|
|
|
|
|
Side side;
|
|
|
|
|
float levelL{ 0.f }, levelR{ 0.f };
|
2026-08-15 18:31:51 +02:00
|
|
|
float zoomScale{ 1.0f };
|
2026-08-15 15:36:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// --- Labelled Arc Knob -----------------------------------------------
|
|
|
|
|
struct ArcKnob {
|
|
|
|
|
juce::Slider slider;
|
|
|
|
|
juce::Label label;
|
|
|
|
|
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> attachment;
|
|
|
|
|
|
|
|
|
|
void build(juce::AudioProcessorValueTreeState& apvts,
|
|
|
|
|
const juce::String& paramID,
|
|
|
|
|
const juce::String& labelText,
|
|
|
|
|
juce::Component* parent,
|
|
|
|
|
AmbivalenceLookAndFeel& laf);
|
|
|
|
|
};
|