Files
biggy 4b0db50271 refactor(source): move every implementation into its module directory
- 36 files move into the module whose AGENTS.md already claimed them:
  Engine/, Synth/, Modulation/, Params/, Plugin/, GUI/, EffectUnits/, Resources/
- Source/engine, modulation, params, plugin and synth become Engine,
  Modulation, Params, Plugin and Synth, matching the directories that already
  hold code
- ExactCompare.h stays at the Source/ root as the one shared header
- SERUMALT_INCLUDE_DIRS adds one include directory per module, so the 31
  parent-relative includes become plain names with no path prefix
- the module AGENTS.md files list owned files instead of describing a move
  that had not happened, and README.md and AGENTS.md describe the real tree

Verified: the harness passes CTest, the Linux VST3 and Standalone link, the
Windows cross-build passes its module checks, each configure exposes only its
own targets, no first-party warning line appears, and the generated Windows
manifest is unchanged.
2026-10-06 09:17:49 +02:00

1.5 KiB

effects module

Owned files

  • FXProcessor.h, FXProcessor.cpp
  • Biquad.h
  • Hyper.h, Hyper.cpp
  • Chorus.h, Chorus.cpp
  • Flanger.h, Flanger.cpp
  • Phaser.h, Phaser.cpp
  • Distortion.h, Distortion.cpp
  • EQ.h, EQ.cpp
  • Compressor.h, Compressor.cpp
  • Delay.h, Delay.cpp
  • Reverb.h, Reverb.cpp

Rules

  • Implement the FXUnit interface with prepare, reset and process (float* l, float* r, int numSamples, const float p[4]).
  • Process full-wet in place; FXProcessor handles the dry/wet mix.
  • Document what p[0] through p[3] mean for each unit in the header comment.
  • Use std::vector<float> for delay lines and size them in prepare().
  • Use juce::MathConstants<T>::pi and twoPi in delay LFOs, not raw literals.
  • Never allocate or resize a delay line inside process.
  • Guard empty delay lines with an early if (len < 4) return;.

IF-THEN

  • IF a unit needs a delay line THEN allocate it in prepare() at the full required length and only read and write it in process.
  • Include the rack interface via FXProcessor.h.

Examples

// BAD: reallocates a delay line on the audio thread
void process (float* l, float* r, int n, const float p[4]) override
{
    std::vector<float> delay ((size_t) (sr * 0.05), 0.0f);
    ...
}
// GOOD: sized once at prepare time, reused per block
void prepare (double sampleRate, int) override
{
    sr = sampleRate;
    delayL.assign ((size_t) (sr * 0.05), 0.0f);
    delayR.assign ((size_t) (sr * 0.05), 0.0f);
}

This file overrides /AGENTS.md where they conflict.