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

@@ -50,4 +50,4 @@ void prepare (double sampleRate, int) override
}
```
This file overrides /AGENT.md where they conflict.
This file overrides /AGENTS.md where they conflict.
+5 -5
View File
@@ -28,7 +28,7 @@ public:
void setLowpass (double freq, double q)
{
const double w0 = 2.0 * juce::MathConstants<double>::pi * freq / sampleRate;
const double w0 = juce::MathConstants<double>::twoPi * freq / sampleRate;
const double cw = std::cos (w0);
const double sw = std::sin (w0);
const double alpha = sw / (2.0 * q);
@@ -42,7 +42,7 @@ public:
void setHighpass (double freq, double q)
{
const double w0 = 2.0 * juce::MathConstants<double>::pi * freq / sampleRate;
const double w0 = juce::MathConstants<double>::twoPi * freq / sampleRate;
const double cw = std::cos (w0);
const double sw = std::sin (w0);
const double alpha = sw / (2.0 * q);
@@ -57,7 +57,7 @@ public:
void setLowShelf (double freq, double gainDb)
{
const double a = std::pow (10.0, gainDb / 40.0);
const double w0 = 2.0 * juce::MathConstants<double>::pi * freq / sampleRate;
const double w0 = juce::MathConstants<double>::twoPi * freq / sampleRate;
const double cw = std::cos (w0);
const double sw = std::sin (w0);
const double alpha = sw / 2.0 * std::sqrt (2.0);
@@ -72,7 +72,7 @@ public:
void setHighShelf (double freq, double gainDb)
{
const double a = std::pow (10.0, gainDb / 40.0);
const double w0 = 2.0 * juce::MathConstants<double>::pi * freq / sampleRate;
const double w0 = juce::MathConstants<double>::twoPi * freq / sampleRate;
const double cw = std::cos (w0);
const double sw = std::sin (w0);
const double alpha = sw / 2.0 * std::sqrt (2.0);
@@ -87,7 +87,7 @@ public:
void setPeak (double freq, double gainDb, double q)
{
const double a = std::pow (10.0, gainDb / 40.0);
const double w0 = 2.0 * juce::MathConstants<double>::pi * freq / sampleRate;
const double w0 = juce::MathConstants<double>::twoPi * freq / sampleRate;
const double cw = std::cos (w0);
const double sw = std::sin (w0);
const double alpha = sw / (2.0 * q);
+3 -3
View File
@@ -37,13 +37,13 @@ void ChorusUnit::process (float* l, float* r, int numSamples, const float p[4])
delayL[(size_t) writePos] = inL;
delayR[(size_t) writePos] = inR;
lfoPhase += 6.28318530717958647692 * rate / sr;
if (lfoPhase > 6.28318530717958647692) lfoPhase -= 6.28318530717958647692;
lfoPhase += juce::MathConstants<double>::twoPi * rate / sr;
if (lfoPhase > juce::MathConstants<double>::twoPi) lfoPhase -= juce::MathConstants<double>::twoPi;
float sumL = 0.0f, sumR = 0.0f;
for (int v = 0; v < 2; ++v)
{
const double mod = std::sin (lfoPhase + v * 3.14159265358979323846) * depth;
const double mod = std::sin (lfoPhase + v * juce::MathConstants<double>::pi) * depth;
const double d = base + mod + (v == 1 ? width * depth * 0.5 : 0.0);
double readPos = writePos - d;
if (readPos < 0.0) readPos += len;
+6 -2
View File
@@ -35,12 +35,16 @@ void FlangerUnit::process (float* l, float* r, int numSamples, const float p[4])
{
const float inL = l[i], inR = r[i];
lfoPhase += 6.28318530717958647692 * rate / sr;
if (lfoPhase > 6.28318530717958647692) lfoPhase -= 6.28318530717958647692;
lfoPhase += juce::MathConstants<double>::twoPi * rate / sr;
if (lfoPhase > juce::MathConstants<double>::twoPi) lfoPhase -= juce::MathConstants<double>::twoPi;
const double mod = std::sin (lfoPhase) * depth;
// base + mod is not guaranteed positive: at high depth the LFO offset
// can exceed the centre delay, so the read position runs ahead of the
// write position and needs the wrap in both directions to stay in range.
double readPos = writePos - (base + mod);
if (readPos < 0.0) readPos += len;
if (readPos >= (double) len) readPos -= len;
const int i0 = (int) readPos;
const int i1 = (i0 + 1) % len;
const float frac = (float) (readPos - std::floor (readPos));
+7 -3
View File
@@ -27,11 +27,15 @@ void PhaserUnit::process (float* l, float* r, int numSamples, const float p[4])
for (int i = 0; i < numSamples; ++i)
{
lfoPhase += 6.28318530717958647692 * rate / sr;
if (lfoPhase > 6.28318530717958647692) lfoPhase -= 6.28318530717958647692;
lfoPhase += juce::MathConstants<double>::twoPi * rate / sr;
if (lfoPhase > juce::MathConstants<double>::twoPi) lfoPhase -= juce::MathConstants<double>::twoPi;
const float sweep = (float) (0.5 + 0.5 * std::sin (lfoPhase));
const float a = 0.3f + depth * sweep; // allpass coefficient
// The allpass cascade is stable only while the coefficient stays inside
// (-1, 1). depth can push 0.3 + depth * sweep above 1, which makes every
// stage self-excite, so the filter state runs away to inf/NaN and keeps
// producing it. Clamp at the point where the coefficient is computed.
const float a = juce::jlimit (0.0f, 0.99f, 0.3f + depth * sweep);
float outL = l[i] + yL[5] * feedback;
float outR = r[i] + yR[5] * feedback;