#pragma once #include #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 cachedERDelayMs; std::array 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) };