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

+18 -6
View File
@@ -17,7 +17,7 @@ void SynthVoice::prepare (double sampleRate, int maxBlockSize)
oscB.prepare (sampleRate);
sub.prepare (sampleRate);
noise.prepare (sampleRate);
filters.prepare (sampleRate, maxBlockSize);
filters.prepare (sampleRate);
for (auto& e : env)
e.prepare (sampleRate);
scratch.setSize (2, maxBlockSize, false, false, true);
@@ -55,7 +55,7 @@ void SynthVoice::noteOn (int noteNumber, float velocity01, double freqHz, juce::
juce::Random rng (noteSeed);
noteRandom = rng.nextFloat();
sub.noteOn (freqHz, -1);
sub.noteOn();
noise.noteOn (noteSeed);
for (auto& e : env)
@@ -71,8 +71,20 @@ void SynthVoice::noteOff()
e.noteOff();
}
float SynthVoice::getModulationValue (ModSource source) const noexcept
{
if (source >= ModSource::Env1 && source <= ModSource::Env4)
return env[(size_t) ((int) source - (int) ModSource::Env1)].getValue();
if (source == ModSource::Velocity) return velocity;
if (source == ModSource::Note) return clampF ((float) note / 127.0f, 0.0f, 1.0f);
if (source == ModSource::Random) return noteRandom;
return 0.0f;
}
void SynthVoice::render (float* outL, float* outR, int numSamples, const RenderContext& ctx) noexcept
{
jassert (numSamples <= scratch.getNumSamples());
if (! active || numSamples <= 0)
return;
@@ -118,14 +130,14 @@ void SynthVoice::render (float* outL, float* outR, int numSamples, const RenderC
float v = src[(int) c.source];
if (c.bipolar && ! isBipolarSource (c.source))
v = v * 2.0f - 1.0f;
mod[(int) c.target] += v * c.depth;
mod[(size_t) c.target] += v * c.depth;
}
}
if (ctx.macros != nullptr)
{
for (int m = 0; m < kNumMacros; ++m)
for (const auto& a : ctx.macros->assignments[(size_t) m])
mod[(int) a.target] += ctx.macroValues[m] * a.depth;
mod[(size_t) a.target] += ctx.macroValues[m] * a.depth;
}
// 5. Modulated oscillator parameters.
@@ -157,8 +169,8 @@ void SynthVoice::render (float* outL, float* outR, int numSamples, const RenderC
// without resetting existing phases when modulated at control rate.
if (oscillatorsNeedNoteOn)
{
oscA.noteOn (freqA, a, seed);
oscB.noteOn (freqB, b, seed + 1);
oscA.noteOn (a, seed);
oscB.noteOn (b, seed + 1);
oscillatorsNeedNoteOn = false;
}
else