mirror of
https://codeberg.org/armin/ambivalence.git
synced 2026-09-01 04:10:48 +02:00
init
This commit is contained in:
parent
29c860587e
commit
42cf8432bf
57 changed files with 5782 additions and 0 deletions
42
Source/GUI/DecayCurveViz.h
Normal file
42
Source/GUI/DecayCurveViz.h
Normal 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)
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue