chore: land janitor round 1 and graft integration

Round 1 findings and fixes, all previously uncommitted:
- FXProcessor per-slot DSP history repair (HEAD does not compile without it)
- SynthVoice::getModulationValue, editor control-lock guard
- ExactCompare.h naming the deliberate exact float comparisons
- KnobLookAndFeel replacing the never-installed SerumLookAndFeel
- 55 first-party compiler warnings to 0
- AGENT.md renamed to AGENTS.md across Source/
- graft repository context graph and its hooks
- JANITOR_TASKS.md and UI_UX_AUDIT.md records
This commit is contained in:
biggy committed 2026-10-06 08:50:45 +02:00
1 parent 5c942cad0c
commit e4cea300db
63 files changed
+2360 -805

No files matched your search

+6 -12
View File
@@ -18,7 +18,6 @@ void Wavetable::buildHarmonic (const juce::String& n, HarmonicAmpFn ampFn, int n
frames.assign (kFrames, std::vector<float> (kTableSize, 0.0f));
const float invN = 1.0f / (float) kTableSize;
constexpr double twoPi = 6.28318530717958647692;
for (int f = 0; f < kFrames; ++f)
{
@@ -36,8 +35,8 @@ void Wavetable::buildHarmonic (const juce::String& n, HarmonicAmpFn ampFn, int n
const float a = ampFn (f, h);
const double m = std::abs ((double) a);
mag[(size_t) h] = m;
phase[(size_t) h] = (a < 0.0f) ? twoPi * 0.5 : 0.0; // sign -> 0 or pi/... using sine base
const double ang = twoPi * (double) h * (double) invN;
phase[(size_t) h] = (a < 0.0f) ? juce::MathConstants<double>::twoPi * 0.5 : 0.0; // sign -> 0 or pi/... using sine base
const double ang = juce::MathConstants<double>::twoPi * (double) h * (double) invN;
cosStep[(size_t) h] = std::cos (ang);
sinStep[(size_t) h] = std::sin (ang);
maxAmp = std::max (maxAmp, m);
@@ -153,7 +152,6 @@ void WavetableLibrary::buildTable (int index) const
namespace
{
inline float normT (int frame) { return (float) frame / 255.0f; }
constexpr float kPi = 3.14159265358979323846f;
}
// sine -> saw morph
@@ -178,8 +176,8 @@ Wavetable WavetableLibrary::makeSawPwm()
{
const float t = normT (f);
const float duty = 0.08f + 0.42f * t; // 8% -> 50%
const float a = std::sin (kPi * (float) h * duty);
return (2.0f / ((float) h * kPi)) * a;
const float a = std::sin (juce::MathConstants<float>::pi * (float) h * duty);
return (2.0f / ((float) h * juce::MathConstants<float>::pi)) * a;
}, 48);
return wt;
}
@@ -192,7 +190,7 @@ Wavetable WavetableLibrary::makeSquareSync()
{
const float t = normT (f);
const float ratio = 1.0f + 3.0f * t;
const float comb = 0.5f + 0.5f * std::cos (2.0f * kPi * (float) h * ratio);
const float comb = 0.5f + 0.5f * std::cos (2.0f * juce::MathConstants<float>::pi * (float) h * ratio);
return (1.0f / std::pow ((float) h, 0.8f)) * comb;
}, 48);
return wt;
@@ -211,7 +209,7 @@ Wavetable WavetableLibrary::makeTriangleFold()
{
const int k = (h - 1) / 2;
const float sign = ((k & 1) == 0) ? 1.0f : -1.0f;
tri = sign * 8.0f / (kPi * kPi * (float) (h * h));
tri = sign * 8.0f / (juce::MathConstants<float>::pi * juce::MathConstants<float>::pi * (float) (h * h));
}
const float saw = 1.0f / (float) h;
return tri + (saw - tri) * t;
@@ -235,15 +233,11 @@ Wavetable WavetableLibrary::makeVowel()
float from[3], to[3];
if (t < 0.5f)
{
const float u = t * 2.0f;
for (int k = 0; k < 3; ++k) { from[k] = aa[k]; to[k] = ee[k]; }
(void) u;
}
else
{
const float u = (t - 0.5f) * 2.0f;
for (int k = 0; k < 3; ++k) { from[k] = ee[k]; to[k] = ii[k]; }
(void) u;
}
float tt = (t < 0.5f) ? t * 2.0f : (t - 0.5f) * 2.0f;