Files
InstaShadow/Source/PluginEditor.h
hariel1985 d750716608 v1.1 — Improved metering, transformer, and optical cell tuning
- Needle VU meters with spring-mass-damper physics (analog inertia)
- Swappable meter modes: GR needles + input bars, or input needles + GR bars
- GR bar meters fill right-to-left (0dB=empty, -30dB=full)
- Input bar meters fill left-to-right with green color
- Optical cell: normalized parameters (eta=50) for proper audio-level response
- Transformer: removed 3-band crossover artifacts, simplified waveshaping with dry/wet mix
- Nickel/Iron/Steel with distinct but subtle harmonic character
- Layout: optical left, discrete right, meters center, transformer+output bottom center
2026-03-27 17:46:25 +01:00

60 sor
1.5 KiB
C++

#pragma once
#include <JuceHeader.h>
#include "PluginProcessor.h"
#include "LookAndFeel.h"
#include "OpticalPanel.h"
#include "DiscretePanel.h"
#include "TransformerPanel.h"
#include "OutputPanel.h"
#include "GRMeter.h"
#include "NeedleVuMeter.h"
static constexpr const char* kInstaShadowVersion = "v1.1";
class InstaShadowEditor : public juce::AudioProcessorEditor,
public juce::Timer
{
public:
explicit InstaShadowEditor (InstaShadowProcessor&);
~InstaShadowEditor() override;
void paint (juce::Graphics&) override;
void resized() override;
void timerCallback() override;
private:
InstaShadowProcessor& processor;
InstaShadowLookAndFeel lookAndFeel;
// Top bar
juce::Label titleLabel;
juce::Label versionLabel;
juce::ToggleButton linkToggle;
juce::Label linkLabel;
juce::ToggleButton bypassToggle;
juce::Label bypassLabel;
// Side panels
OpticalPanel opticalPanel;
DiscretePanel discretePanel;
// Center: needle meters + bar meters (swappable)
NeedleVuMeter needleMeterL;
NeedleVuMeter needleMeterR;
GRMeter barMeterL;
GRMeter barMeterR;
// Meter swap toggle
juce::TextButton meterSwapButton { "GR / INPUT" };
bool metersSwapped = false; // false: needle=GR, bar=input | true: needle=input, bar=GR
// Bottom panels
TransformerPanel transformerPanel;
OutputPanel outputPanel;
void syncKnobsToEngine();
void syncEngineFromKnobs();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InstaShadowEditor)
};