This commit is contained in:
Armin 2026-08-15 15:36:28 +02:00
commit 42cf8432bf
57 changed files with 5782 additions and 0 deletions

View file

@ -0,0 +1,42 @@
#pragma once
#include <JuceHeader.h>
#include "../PluginProcessor.h"
#include "AmbivalenceUI.h"
class DecayCurveViz : public juce::Component, private juce::Timer {
public:
DecayCurveViz();
~DecayCurveViz() override;
void setProcessor(FDNReverbAudioProcessor* p) noexcept { processor = p; }
void paint(juce::Graphics& g) override;
void resized() override;
private:
void timerCallback() override;
// --- time axis -----------------------------------------------
// time axis :
// 0~splitSec : plotW x splitRatio width expanded
// splitSec~max: width
// ER(0~200ms) 2
float timeToX(float timeSec, float plotX, float plotW,
float maxTimeSec) const noexcept;
FDNReverbAudioProcessor* processor{ nullptr };
float cachedRT60Mid{ 1.0f };
int cachedERTapCount{ 0 };
bool cachedERBypassed{ false };
static constexpr int MAX_DISPLAY_TAPS = 12;
std::array<float, MAX_DISPLAY_TAPS> cachedERDelayMs;
std::array<float, MAX_DISPLAY_TAPS> cachedERGains;
// --- time axis setting ---
// splitSec below time splitRatio width expanded
static constexpr float splitSec = 0.20f; // 0~200ms expanded
static constexpr float splitRatio = 0.30f; // full width 30% ER zone
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DecayCurveViz)
};