From 87dbf88e6d7e36da90f6ea89211f824d2d3dcdf4 Mon Sep 17 00:00:00 2001 From: Matiq Date: Thu, 20 Aug 2026 15:30:30 +0300 Subject: [PATCH] P4: add dual warp step (mask *= band768; *= warp) - comb 500/3000 fixed --- dsp/framed_model.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dsp/framed_model.cpp b/dsp/framed_model.cpp index 0fa8ebf..d5d8f9f 100644 --- a/dsp/framed_model.cpp +++ b/dsp/framed_model.cpp @@ -142,7 +142,15 @@ void FramedDetector::processFrame(const std::complex* spectrum, float* m // mask carries on to warp/dry-wet below. } - // 6. warp: mask *= 0x540768[band] (per-band); mask *= warp (0x5406a8). + // 6. warp tilt (0x8700 dst*=src, applied twice): + // mask *= 0x540768[band] (per-band mult table) + // mask *= 0x5406a8 (warp / freqpath tilt) + for (size_t k = 0; k <= half; k++) { + int wi = std::min(static_cast(k), size_t(2048)); + scratch[k] *= static_cast(kBand768[wi]); + scratch[k] *= static_cast(kWarp[wi]); + } + // 7. IIR3 leaky (A3/B3) twice. // 8. dry/wet: mask = mask*(fVar30*0x540888) + (1-fVar30). // (fVar30 = 0x540874 - rnd; 0x540888=1.0, 0x540874=1.0.)