Weld hears the other bass layer through the sidechain and fits polarity
plus up to four RBJ allpass sections to the measured cross-spectrum, so
the layers sum instead of cancelling. No latency; the layer on its own
keeps its sound.
- Worker thread: Welch cross-spectrum and coherence, Nelder-Mead fit with
1/f weighting, a per-band loss penalty and model selection by share of
the achievable gain; GCC-PHAT lag detection flags a late layer.
- Audio thread: allocation-free chain with a 40 ms warm-up and 40 ms
crossfade per new fit; mono blocks go to the worker through a lock-free
queue.
- Follow / Learn / Hold; the fit is persisted and restored without a
crossfade.
- Editor: per-band loss and recovery against a perfect alignment, phase
before and after, recovered dB, time offset and status.
- Tests for flat magnitude, crossfade, fit targets, Follow hysteresis,
Learn, silence, realtime allocation and the persisted fit in the host.
Weld will phase-align a bass layer to another layer it hears through the
sidechain. This first build only checks that FL Studio delivers the
sidechain to a CLAP aux port: it passes the main layer through unchanged,
meters the sidechain and offers Layer/Sum/Sum dry listening. No latency.