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.)