feat: add tempo-synced stereo delay and coupled room reverb

This commit is contained in:
Johannes Findeisen 2026-11-05 23:53:03 +01:00
commit 7a01e2d2f3
12 changed files with 241 additions and 63 deletions

View file

@ -121,3 +121,34 @@ license/provenance in SAMPLE_LICENSE.md. Both are installed with the examples.
Tests cover source-rate conversion, one-shot endpoint, looping, release,
partitioning, preset references, missing assets, GUI relinking/undo/reload and
preparation-allocation/callback guards.
## Phase 43 stereo effects
**File → Add stereo delay/reverb** and **Edit → Insert stereo delay/reverb on
wire** add new devices (indices 5/6). Original Delay/Reverb (indices 2/3) retain
their original algorithms, values and saved identities. Existing control and
automation editors, undo and persistence support both generations.
Stereo Delay adds integer **Sync**: 0 milliseconds, 1 quarter, 2 eighth,
3 dotted eighth, 4 eighth triplet. Nonzero sync follows project tempo; changing
tempo uses ordinary stopped project preparation. Time changes crossfade two
fractional read heads for 5 ms. A crossfade finishes before adopting the latest
automated target, bounding transition work and avoiding read-head jumps.
Feedback cross-couples channels (80% same, 20% opposite), with a 0.95 bound.
Delay storage covers four seconds, sufficient for all divisions at 20..300 BPM.
Stereo Reverb adds **Room** (0..1, scales comb spacing) and **Diffusion** (0..1,
cross-couples damped feedback). The right comb timings differ from the left.
Decay/damping retain 0..0.95 bounds. This is a simple algorithmic reverb, without
physical room simulation or a measured RT60. Room automation can alter coloration.
The graph evaluates both channels' inputs before calling a coupled internal
processor. Each stereo device has one prepared state, with no callback allocation.
Mono processing excites both sides and folds the wet output to mono. External
plugins and the original effects retain independent mono instances.
Tests compare whole/split blocks, tempo-synced impulse placement, left-to-right
energy, bounded extreme feedback/diffusion and graph/direct stereo output
(including the engine's subnormal-to-zero policy). GUI tests save/reopen both
identities; callback guards and ASan/UBSan cover processing. `make builtin-preview`
also writes files 5/6 for repeatable listening; human listening remains pending.

View file

@ -1217,15 +1217,19 @@ See BUILTIN_DEVICES.md for memory/format and transposition limits.
Address the documented sound-design and transition limits of the basic effects.
### Tasks and acceptance criteria
- [ ] Smooth or crossfade delay-time changes and define automation behavior without abrupt read-head jumps.
- [ ] Add tempo-synced delay divisions with deterministic tempo/seek behavior.
- [ ] Add true stereo processing and reverb diffusion/room controls rather than independent mono instances alone.
- [ ] Preserve old projects' effect identities, parameters and sound, or provide an explicit compatibility mode.
- [ ] Test stability at parameter extremes, stereo response, automation partitions and transition artifacts; document listening results.
- [x] Smooth or crossfade delay-time changes and define automation behavior without abrupt read-head jumps.
- [x] Add tempo-synced delay divisions with deterministic tempo/seek behavior.
- [x] Add true stereo processing and reverb diffusion/room controls rather than independent mono instances alone.
- [x] Preserve old projects' effect identities, parameters and sound, or provide an explicit compatibility mode.
- [x] Test stability at parameter extremes, stereo response, automation partitions and transition artifacts; document listening results.
### Implementation status
Planned. Delay time can click; reverb uses four damped mono combs without a room
model or stereo diffusion. Current decay is a feedback coefficient, not seconds.
Implemented as new Stereo Delay/Reverb identities, preserving original devices.
Delay uses fractional read-head crossfades and tempo divisions; reverb adds room
spacing and coupled stereo diffusion. Graph evaluation now processes coupled
channels together. Core, graph/direct DSP, partition, tempo, GUI persistence,
callback-guard and sanitizer tests pass. Listening previews/procedure are
documented; human listening is unverified. See BUILTIN_DEVICES.md.
---