Просмотр исходного кода

Plugin parity: the Waves reverbs translated onto Reeverb 2, Hush's Single Vocal "stands out" revision, Facet's auto threshold refitted

Waves RVerb / H-Reverb / TrueVerb (refcap182 programme): their states are now translated onto the stand-in Reeverb 2
(decay, pre-delay, the wet level by the decay, each reverb's measured tone fitted on a model of the parity score,
H-Reverb's ducking, TrueVerb's direct path and levels; slot at 100 %). RVerb 2.04 -> 3.48, H-Reverb 1.72 -> 3.16,
TrueVerb 3.24 -> 3.96, no file down. Reeverb 2's engine is unchanged.

Hush De-esser, Single Vocal (Pro-DS's default mode): revision 1 behind a hidden parameter (vocalRevision; new Hush and
translated Pro-DS = 1, projects saved before = 0, bit for bit). The stand-out test compares the signal above a split
under the band with the body below it, with the measured level law and timing (refcap030 ess probes). Pro-DS refcap030
5.79 -> 7.21 (48 up, 2 down: 44.1 / 96 kHz stim), tp172b 6.70 -> 7.20, refcap182 8.60 -> 8.68.

Facet EQ's automatic threshold (Pro-Q 4 Auto, unreleased): the knee scales with the range (1.53 x), the Pro-Q 4
translator's 50 % is 9.2 / 268 ms. grid2 6.60 -> 6.90, no file down; manual dynamic bands unchanged.

Old projects: 171 renders byte-identical to the base (Hush with the revision off, Facet manual bands, Reeverb 2).
Tests: Parity190jsTests (+ gold fingerprints); earlier rounds' expectations updated for the new hidden parameter and law.
Ka1-S 2 недель назад
Родитель
Сommit
d9bfc68ce

+ 100 - 0
docs/PARITY.md

@@ -3882,3 +3882,103 @@ Fruity Delay 3's 0.60 … 0.69 %; Limiter 0.11 % either way. No latency change.
 - **Hush ← Pro-DS Single Vocal**: round 190iq's finding stands (the reference takes the whole range once a 5 … 9 kHz burst stands
   ~8 dB over the body, ~10 ms late, independent of the threshold); not modelled in this round.
 - PuigTec, the Waves reverbs (above), SuperTap's feedback delay and modulation, Q10 / Renaissance EQ (never captured).
+
+## Round 190js: the Waves reverbs on Reeverb 2, Hush's Single Vocal "stands out" revision, Facet's auto threshold refitted
+
+Plugin parity 5 of 0.1.30. Black-box, on captures already on disk (lab and evidence: `/mnt/e/lynx-work/parity190js/`,
+HANDOFF.md). Same score as rounds 190iq … 190jh (`scripts/fxparity.py`, 0–10, higher is better): the references' own renders
+against LYNX loading the plug-in's saved state through its substitute / translator.
+
+**The Waves reverbs (RVerb, H-Reverb, TrueVerb → Reeverb 2).** Why round 190jh's lab translation failed: it took the
+references' own tone values (RVerb's 5.7 kHz roll-off, Reeverb's high-damping default) and a wet level per decay only, but
+the score at this level is set by the long-term third-octave spectrum and the level of each file (a reverb's tail does
+not null: 4 = spectrum within 2.5 dB and level within 1.5 dB). Each reference's band gain (out / in per third octave) was
+measured from the programme renders (pooled over the five signals; the IR deconvolved for decay, pre-delay and the direct
+path) and is not what the states say: RVerb is flat to 1 kHz and −8 / −15 / −19 dB at 2.8 / 5.7 / 11 kHz; H-Reverb has a
++5 … 6 dB hump at 700 Hz and −20 … −27 dB at 11 … 18 kHz; TrueVerb is a filtered direct path (−4.8 … −6.2 dB, falling
+with Distance) under a bright tail. All three keep about the same wet energy whatever the decay (RVerb: −3 … −4 dB in the
+mids at 0.8 … 4 s), so a longer decay needs a lower wet control. Reeverb 2 (the stand-in since round 129; its engine is
+unchanged) can reach every setting's tone (per-setting fits 0.8 … 2.5 dB mean |band error|), so the role stays on it and
+its controls are fitted, all five settings at once, on a model of the score (the input's third-octave spectrum times the
+impulse response's band gain against the reference render: spectrum and level per file). The translator `waves-reverb`
+reads the decay, the pre-delay, TrueVerb's reverb / early-reflection levels, Distance and Direct, H-Reverb's ducking
+(on: 0.25 × its range off the wet level [model], fitted on X4) and sets each reverb's fitted tone (raw Reeverb 2 values in
+`wavesVerbFits`), the wet level by the decay (−8.25 / −7.5 / −5.25 dB per decade) and the slot at 100 %. Atrium,
+LuxeVerb and Epoch were tried for RVerb's role first (Foil Plate not: a plate's role): their best band errors on RVerb's
+default were 2.0 / 2.4 / 8.4 dB (Epoch's top band stops at its high cut), against Reeverb 2's 0.8.
+
+| refcap182 programme (25 files each) | before → after | up / same / down |
+|---|---|---|
+| RVerb → Reeverb 2 | 2.04 → **3.48** (D 2.0 → 4.0, X1 2.0 → 2.6, X2 2.2 → 3.6, X3 2.0 → 3.6, X4 2.0 → 3.6) | 22 / 3 / 0 |
+| H-Reverb → Reeverb 2 | 1.72 → **3.16** (D 1.8 → 3.4, X1 1.8 → 3.6, X2 1.0 → 2.2, X3 2.0 → 3.4, X4 ducking 2.0 → 3.2) | 22 / 3 / 0 |
+| TrueVerb → Reeverb 2 | 3.24 → **3.96** (D 3.4 → 4.0, X1 3.6 → 4.0, X2 4.0 = 4.0, X3 3.0 → 4.0, X4 direct off 2.2 → 3.8) | 15 / 10 / 0 |
+
+**Facet EQ's automatic threshold, refitted (Pro-Q 4's Auto).** Round 190jh fitted it on 10 ms windows, which smeared the
+time-constant probe's bursts. Refitted by Nelder-Mead on the C++ renders themselves (5 ms windows of grid2's `tc` and
+`stairs` at ranges −30 / −15 / +15, lab build with the law's constants from the environment, `facet/fitc.py`): the knee is
+**1.53 × the range** (not a fixed 30.5 dB) — after a −6 dBFS burst the reference keeps ~5 dB of cut at −40 dBFS with a
+−30 dB range and none with −15 dB, which one fixed knee cannot do; this is the "settles ~9 dB lower" of round 190jh — and the
+gain timing at Pro-Q's 50 % is **9.2 / 268 ms** (the translator's attack / release; was 18.1 / 305). A slower rise of the
+top and an offset under the level were also free in the fit and came out at 0; the fit's top fall (1.58 dB/s) cost the
+−15 dB stairs a step on the score, so the fall stays 1.70 dB/s. Trajectory error 1.067 → 0.67 dB rms (tc −30: 1.77 → 1.10,
+mean +1.00 → +0.12 dB). The
+automatic threshold has not been released (round 190jh's branch), so its law changes without a revision; manual bands
+render bit for bit as before.
+
+| refcap030 Pro-Q 4 block | files | before → after | up / same / down |
+|---|---|---|---|
+| grid2 (Dynamic Range × Threshold; stairs, time constants; the threshold is ignored under Auto) | 50 | 6.60 → **6.90** | 10 / 40 / 0 (tc −30: 2 → 3, ESR −3.4 → −10.2 dB; tc +15: 6 → 8) |
+| grid, mode, pairs, 44.1 / 48 / 96 kHz | 150 | each unchanged | 0 / 150 / 0 |
+| all (row) | 200 | 8.53 → **8.60** | 10 / 190 / 0 |
+
+refcap182's programme and tp172b have no dynamic band in their states (unchanged by construction).
+
+**Hush De-esser ← Pro-DS Single Vocal: the "stands out" revision.** Pro-DS's default mode. On refcap030's `ess`
+probe (a 500 Hz body at −14 dBFS under 5 … 9 kHz bursts of rising level, a sweep of band tones, a long burst alone) the
+reference leaves a burst alone until it stands out from the body (+5 dB: −0.2 dB; +11 dB: the whole range at every
+threshold), ignores band tones at the body's level, starts ~20 ms after the burst minus the look-ahead and holds a
+steady reduction; a burst alone follows a level law (92 / 87 / 66 % of the range at thresholds −48 / −30 / −12 dB).
+Round 148's gate compared the band (high-pass … low-pass) with everything under the high-pass, so a 5 … 9 kHz burst's own
+lower half counted as the body: it opened on every burst and its level law moved with the noise (−5 … −10 dB under a
+burst the reference cuts by 12). **Revision 1** (hidden `hush::vocalRevision`, Allround unchanged) compares the signal above
+a split (0.567 × the high-pass, 4th-order) with the body below it from 200 Hz up (a kick drum's low end hid the cymbals of
+tp172b's drums), opens at +8.2 dB and closes at +7.6 dB over 4.9 ms averages, decides 1.6 ms behind the look-ahead, and has
+its own level law (offset 9 dB, span × 1.11) and gain timing (6.2 / 20 ms). Fitted by Nelder-Mead on the 27 Single Vocal ess
+renders (lab build, `hush/fitsv.py`: 3.05 → 0.50 dB rms over 5 ms windows, full band and above 4 kHz), the body's
+high-pass and the law offset then chosen on the parity score of the drums / vocal / mix / stim renders (`hush/svscore.py`).
+A new Hush and a translated Pro-DS state run it; a project or preset saved before keeps round 148's Single Vocal.
+
+| Pro-DS bank (Single Vocal and Allround settings) | files | before → after | up / same / down |
+|---|---|---|---|
+| refcap030 grid / mode / pairs | 10 / 33 / 18 | 4.80 / 5.55 / 5.72 → **6.80 / 7.21 / 7.94** | 32 / 29 / 0 |
+| refcap030 44.1 / 48 / 96 kHz | 15 each | 6.13 / 6.13 / 6.40 → **6.67 / 7.20 / 7.13** | 16 / 27 / 2 (44.1 kHz S4 stim, 96 kHz S1 stim: 6 → 5) |
+| refcap030, all blocks (row) | 106 | 5.79 → **7.21** | 48 / 56 / 2 |
+| refcap182 programme | 25 | 8.60 → 8.68 | 2 / 23 / 0 |
+| tp172b (vocal, music, sweep, drums) | 20 | 6.70 → **7.20** | 8 / 12 / 0 |
+
+The two files a step down are the `stim` signal at 44.1 kHz (S4, look-ahead off) and 96 kHz (S1): the reference cuts
+the band ~1.4 / 0.5 dB on average there, the revision +1.1 dB less / 1.5 dB more (spectrum 0.74 / 0.79 dB against the
+6-point limit of 0.6); at 48 kHz the same two settings went 5 → 7 and 6 → 6. Twelve variants (body high-pass 150 … 500 Hz,
+split 0.52 … 0.62, open threshold, ratio and gain timing) kept them at 5; shipped as an owner decision (HANDOFF).
+
+**Old projects.** Reeverb 2's engine is unchanged (the translator only changes what a project with the missing Waves
+plug-in loads); Facet's manual dynamic bands, Hush's Allround and Hush's Single Vocal with the revision off (every project
+or preset saved before: `upgradeLoadedEffectParams`) render byte for byte as the base commit (`lab/gold.sh`: the base
+binary against the round's, 171 renders at 44.1 / 48 / 96 kHz, 0 differ; fingerprints in `tests/Parity190jsGold.inc`;
+round 190jh's Facet fingerprints pass unchanged).
+
+**CPU** (thread time, 20 s at 48 kHz in blocks of 512, best of 5, three runs pinned to one core; `cpu/bench.log`): Hush
+Single Vocal 0.41 … 0.44 % of a core (revision 0) → 0.46 … 0.54 % (revision 1: four more biquads and the body's high-pass in
+the stand-out test); Facet with one automatic band 0.24 … 0.27 % (manual 0.17 … 0.21 %); Reeverb 2 at the old stand-in
+setting 0.29 … 0.38 % against the translated RVerb / H-Reverb / TrueVerb defaults 0.25 … 0.35 % (the same engine). No
+latency change.
+
+**Still off:**
+- RVerb X1 (Reverb Type 3, diffusion 80) stays at 2 … 3 (its guitar −4.8 dB): one tone for every type; H-Reverb X2 (short,
+  ER-heavy, 0.4 s) 2.2; H-Reverb's ducking is a fixed share of its range, not an envelope; TrueVerb's direct path is flat
+  (the reference's has a short low-pass FIR) — a 4 is the top here, a 5 needs the tail to null.
+- Hush: the two `stim` files above; split band (Band Processing = split) keeps round 148's split [model] (its ess error
+  2.3 dB rms, the rest 0.2 … 0.7).
+- Facet: the −30 dB time-constant probe is at 3 (from 2): the reference's cut after the short bursts (7.5 / 8.7 s) is
+  still deeper than the model's.
+- PuigTec, SuperTap's feedback delay and modulation, EchoBoy's shelving cuts (round 190jh's list) not touched.

+ 2 - 2
docs/PLUGIN_FALLBACK.md

@@ -124,7 +124,7 @@ matches by name).
 | ValhallaShimmer | Halo (round 100) | name | every parameter (bare `parameterN` attributes; mode lists partly not confirmed) |
 | ValhallaFutureVerb | Horizon (round 100) | name | every parameter |
 | Soundtoys Little Plate | Foil Plate (round 129; 2 s, 100 % wet, slot dry/wet 25 %; was Reeverb 2) | name | — |
-| Waves RVerb / H-Reverb / TrueVerb | Reeverb 2 (100 % wet, slot dry/wet 25 %) | Waves name | — |
+| Waves RVerb / H-Reverb / TrueVerb | Reeverb 2 (100 % wet, slot dry/wet 25 %) | Waves name | round 190js: decay, pre-delay, the wet level by the decay, each reverb's measured tone, H-Reverb's ducking, TrueVerb's direct path / reverb / early levels (slot at 100 %) |
 | FabFilter Pro-R | LuxeVerb (default) | name | — |
 | Waves H-Delay | Echoform (round 119; was Fruity Delay 3) | VST3 class ID [DATA], Waves name | sync (host / BPM / ms), note, time, feedback, ping-pong (pairs) / stereo, mix, output, filters; laws measured on the official trial [EXEC] (round 119 §2) |
 | Waves NS1 | Quell Denoiser (round 119) | Waves name | the one knob (RealWorld 229), Quell fitted to the official trial [EXEC] (round 119 §3) |
@@ -146,7 +146,7 @@ matches by name).
 | Waves CLA-2A | Glow Leveler (peak reduction 30 %, gain +2 dB; round 113) | VST3 class ID [DATA], Waves name | gain, peak reduction, comp / limit, laws measured on the official trial [EXEC] (round 113 §3c) |
 | Waves SSL E-Channel, SSL Native Channel Strip / 4K E / 4K B / Vocalstrip | Ridge Strip (neutral; round 96) | VST3 class ID [DATA], Waves name, names | SSL E-Channel: filters, 4-band EQ, compressor, output, band laws measured on the official trial [EXEC] (round 113 §3c) |
 | Waves Q10, REQ, SSLEQ | Parametric EQ (flat) | Waves names | — |
-| FabFilter Pro-Q | Facet EQ (flat, round 99) | names | Pro-Q 4: bands, shapes, slopes, phase mode (round 124 / 144); round 190jh: dynamic bands (range, Auto → Facet's automatic threshold, manual threshold, attack / release) |
+| FabFilter Pro-Q | Facet EQ (flat, round 99) | names | Pro-Q 4: bands, shapes, slopes, phase mode (round 124 / 144); round 190jh: dynamic bands (range, Auto → Facet's automatic threshold, manual threshold, attack / release; round 190js: the automatic threshold refitted, 50 % = 9.2 / 268 ms) |
 | Waves DeEsser | Hush De-esser (5.5 kHz, −20 dBFS, 4 dB; round 113) | Waves name | frequency, threshold, split / wideband, side-chain filter, monitor, laws measured on the official trial [EXEC] (round 113 §3c) |
 | FabFilter Pro-DS, Harrison De-Esser | Hush De-esser (default; round 96) | names | — |
 | Slate Digital Fresh Air | Aether (neutral without a state; round 96) | name | Mid / High Air → Aether's air shelf gain and frequency, laws measured on the official trial (within 0.5 dB RMS for her settings) [EXEC] (round 113) |

+ 5 - 0
src/core/Effects.cpp

@@ -4351,6 +4351,8 @@ EffectSlot makeEffectSlot (EffectKind kind)
         slot.params[(std::size_t) echosuite::spiral::revision] = 1.0f;
     if (kind == EffectKind::hushDeEsser) // round 190iq: a new Hush runs the measured Allround timing (hidden)
         slot.params[(std::size_t) mixsuite::hush::timing] = 1.0f;
+    if (kind == EffectKind::hushDeEsser) // round 190js: … and Single Vocal's "stands out" revision (hidden)
+        slot.params[(std::size_t) mixsuite::hush::vocalRevision] = 1.0f;
     if (kind == EffectKind::echoform) // round 190is: a new Echoform runs the echo voicings' revision 1 (hidden parameter)
         slot.params[(std::size_t) echosuite::echoform::revision] = 1.0f;
     // round 190it: a new Epoch Verb / Atrium / Foil Plate / Halo runs the 0.1.30 revision of the Measured law (hidden)
@@ -4534,6 +4536,9 @@ void upgradeLoadedEffectParams (EffectSlot& slot, std::size_t savedCount) noexce
     // round 190iq: a Hush saved before the measured Allround timing keeps tp172b's (bit for bit)
     if (slot.kind == EffectKind::hushDeEsser && savedCount <= (std::size_t) mixsuite::hush::timing)
         slot.params[(std::size_t) mixsuite::hush::timing] = 0.0f;
+    // round 190js: … and one saved before Single Vocal's revision keeps round 148's Single Vocal (bit for bit)
+    if (slot.kind == EffectKind::hushDeEsser && savedCount <= (std::size_t) mixsuite::hush::vocalRevision)
+        slot.params[(std::size_t) mixsuite::hush::vocalRevision] = 0.0f;
     // round 190is: an Echoform saved before the voicings' revision keeps rounds 147 / 150's voicings
     if (slot.kind == EffectKind::echoform && savedCount <= (std::size_t) echosuite::echoform::revision)
         slot.params[(std::size_t) echosuite::echoform::revision] = 0.0f;

+ 5 - 4
src/core/FabFilterStates.cpp

@@ -582,8 +582,8 @@ int fromSaturn2 (const State& s, EffectSlot& slot)
 // dynamics — 10 dynamics on, 9 range dB (−30 … +30, relative to the static gain), 11 automatic threshold (1 = Auto, the
 // default of a new dynamic band), 12 the manual threshold (the parameter's own 0 … 1: −90 / −66 / −45 dB at 0 / 0.125 /
 // 0.25, then linear to 0 dB at 1), 13 / 14 attack / release % — become Facet's range, threshold or automatic threshold
-// (facet::autoThreshold, measured on the same captures) and its attack / release: 50 % = 18 / 305 ms, the reference's
-// gain timing fitted on the captures (Facet's timing is one per EQ: the first dynamic band's) [model: other percentages
+// (facet::autoThreshold, measured on the same captures) and its attack / release: 50 % = 9.2 / 268 ms (round 190js; round
+// 190jh's 10 ms windows had 18 / 305), the reference's gain timing fitted on the captures (Facet's timing is one per EQ: the first dynamic band's) [model: other percentages
 // one decade per 50 %, not measured].
 int fromProQ4 (const State& s, EffectSlot& slot)
 {
@@ -632,8 +632,8 @@ int fromProQ4 (const State& s, EffectSlot& slot)
             {
                 const auto pct = [&] (std::size_t i) { return std::pow (10.0, (std::clamp ((double) s.at (base + i), 0.0, 100.0) - 50.0) / 50.0); };
                 const auto msValue = [] (double ms, double lo) { return (float) (std::log (ms / lo) / std::log (200.0)); };
-                set (facet::attackParam, msValue (std::clamp (18.1 * pct (13), 0.25, 50.0), 0.25));
-                set (facet::releaseParam, msValue (std::clamp (305.0 * pct (14), 20.0, 4000.0), 20.0));
+                set (facet::attackParam, msValue (std::clamp (9.22 * pct (13), 0.25, 50.0), 0.25));   // round 190js: 9.2 / 268 ms
+                set (facet::releaseParam, msValue (std::clamp (268.0 * pct (14), 20.0, 4000.0), 20.0)); // (was 18.1 / 305)
                 dynamicTiming = true;
             }
         }
@@ -700,6 +700,7 @@ int fromProDS (const State& s, EffectSlot& slot)
     p[outputPan] = linValue (std::clamp ((double) s.at (18), -1.0, 1.0), -1.0, 1.0);
     p[oversampling] = (float) std::clamp (roundIndex (s.at (14)), 0, 2) / 3.0f;
     p[timing] = 1.0f; // round 190iq: the Allround law's measured timing (refcap030's ess probes)
+    p[vocalRevision] = 1.0f; // round 190js: Single Vocal's "stands out" revision (refcap030's ess probes)
     if (s.at (19) >= 0.5f)
         slot.enabled = false;
     return 20;

+ 48 - 9
src/core/FacetEq.cpp

@@ -5,6 +5,7 @@
 #include <cmath>
 #include <complex>
 #include <cstdio>
+#include <cstdlib>
 #include <vector>
 
 namespace lynx::facet
@@ -746,7 +747,7 @@ public:
         for (auto& band : state)
             for (auto& st : band)
                 st = {};
-        for (auto& d : det) { d.filter.clear(); d.ms = 0.0; d.gain = 0.0; d.top = autoFloorDb; }
+        for (auto& d : det) { d.filter.clear(); d.ms = 0.0; d.gain = 0.0; d.top = autoLaw().floorDb; }
         solo.clear();
         conv.reset();
         firLoaded = false;
@@ -905,7 +906,7 @@ private:
         // round 190jh: the automatic threshold (autoThreshold): its top level, the fall per sample, the gain limits that
         // keep the band's total within +-30 dB
         bool autoT = false;
-        double top = autoFloorDb, topFall = 0.0, lo = -60.0, hi = 60.0;
+        double top = autoFloorDb, topFall = 0.0, topRise = 1.0, lo = -60.0, hi = 60.0;
     };
 
     void configureMode (Phase p) noexcept
@@ -950,8 +951,10 @@ private:
             {
                 const bool wasAuto = d.autoT;
                 d.autoT = autoThreshold (params, b);
-                if (d.autoT && ! wasAuto) d.top = autoFloorDb;
-                d.topFall = autoDecayDbPerSecond / sampleRate;
+                const auto& A = autoLaw();
+                if (d.autoT && ! wasAuto) d.top = A.floorDb;
+                d.topFall = A.decayDbPerSecond / sampleRate;
+                d.topRise = A.topRiseMs > 0.0 ? 1.0 - std::exp (-1.0 / (A.topRiseMs * 0.001 * sampleRate)) : 1.0;
                 const double g0 = gainDb (params[(std::size_t) param (b, 2)]);
                 d.lo = -30.0 - g0;
                 d.hi = 30.0 - g0;
@@ -986,6 +989,13 @@ private:
         }
         attackCoef = 1.0 - std::exp (-1.0 / (attackMs (params[(std::size_t) attackParam]) * 0.001 * sampleRate));
         releaseCoef = 1.0 - std::exp (-1.0 / (releaseMs (params[(std::size_t) releaseParam]) * 0.001 * sampleRate));
+        {
+            const auto& A = autoLaw();
+            autoAttackCoef = A.attackMs > 0.0 ? 1.0 - std::exp (-1.0 / (A.attackMs * 0.001 * sampleRate)) : attackCoef;
+            autoReleaseCoef = A.releaseMs > 0.0 ? 1.0 - std::exp (-1.0 / (A.releaseMs * 0.001 * sampleRate)) : releaseCoef;
+            autoTopOffset = A.topOffsetDb;
+            autoFloor = A.floorDb;
+        }
         outGain = (float) std::pow (10.0, outputDb (params[(std::size_t) outputParam]) / 20.0);
         anyPlaced = anyMidSide = false;
         for (int b = 0; b < bands; ++b)
@@ -1039,13 +1049,15 @@ private:
                 d.ms += d.msCoef * (y * y - d.ms);
                 const double level = 10.0 * std::log10 (2.0 * d.ms + 1e-20);
                 double target;
-                if (d.autoT) // round 190jh: the automatic threshold
+                if (d.autoT) // round 190jh: the automatic threshold (round 190js: its rise and own timing)
                 {
-                    d.top = std::max ({ d.top - d.topFall, level, autoFloorDb });
+                    const double t = level + autoTopOffset;
+                    d.top = std::max ({ d.top - d.topFall, d.topRise >= 1.0 ? t : d.top + d.topRise * (t - d.top), autoFloor });
                     target = std::clamp (autoDynamicGainDb (level, d.top, d.range), d.lo, d.hi);
+                    d.gain += (std::abs (target) > std::abs (d.gain) ? autoAttackCoef : autoReleaseCoef) * (target - d.gain);
+                    continue;
                 }
-                else
-                    target = dynamicGainDb (level, d.threshold, d.range);
+                target = dynamicGainDb (level, d.threshold, d.range);
                 d.gain += (std::abs (target) > std::abs (d.gain) ? attackCoef : releaseCoef) * (target - d.gain);
             }
             if (std::abs (d.ms) < 1e-30) d.ms = 0.0;
@@ -1248,6 +1260,7 @@ private:
     std::array<double, bands> dynUsed {};
     std::array<std::atomic<float>, bands> meters {};
     double attackCoef = 0.1, releaseCoef = 0.001;
+    double autoAttackCoef = 0.1, autoReleaseCoef = 0.001, autoTopOffset = 0.0, autoFloor = autoFloorDb; // round 190js
     float outGain = 1.0f, outL = 1.0f, outR = 1.0f;
     int characterNow = 0;
     std::array<Placement, bands> placed {};
@@ -1691,6 +1704,31 @@ int matchEq (const EffectParams& params, const double* f, const double* cur, con
     return (int) used.size();
 }
 
+namespace
+{
+#ifdef LYNX_LAB190JS
+AutoLaw autoLaw190js { autoFloorDb, autoDecayDbPerSecond, autoKneeDb, 0.0, 0.0, 0.0, 0.0, 0.0 };
+struct AutoLawLab
+{
+    AutoLawLab()
+    {
+        if (const char* e = std::getenv ("LYNX_LAB_FA"))
+            std::sscanf (e, "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &autoLaw190js.floorDb, &autoLaw190js.decayDbPerSecond, &autoLaw190js.kneeDb,
+                         &autoLaw190js.topOffsetDb, &autoLaw190js.topRiseMs, &autoLaw190js.attackMs, &autoLaw190js.releaseMs,
+                         &autoLaw190js.kneePerRange);
+    }
+} autoLawLab;
+#else
+// round 190js [EXEC] (Nelder-Mead on the C++ renders, 5 ms windows of refcap030 grid2's tc + stairs at ranges -30 / -15 /
+// +15: 1.067 → 0.67 dB rms): the knee is 1.53 x the range (the band starts moving 1.53 x |range| / 2 under the threshold),
+// the top rises at once (the fitted rise and offset came out at 0) and falls 1.70 dB/s as before (the fit's 1.58 cost the
+// -15 dB stairs a parity step); the gain timing at Pro-Q's 50 % is 9.2 / 268 ms (the translator's attack / release)
+constexpr AutoLaw autoLaw190js { autoFloorDb, autoDecayDbPerSecond, autoKneeDb, 0.0, 0.0, 0.0, 0.0, 1.53 };
+#endif
+} // namespace
+
+const AutoLaw& autoLaw() noexcept { return autoLaw190js; }
+
 bool autoThreshold (const EffectParams& p, int b) noexcept
 {
     return b >= 0 && b < bands && p[(std::size_t) (autoThresholdParam0 + b)] >= 0.5f;
@@ -1699,7 +1737,8 @@ bool autoThreshold (const EffectParams& p, int b) noexcept
 double autoDynamicGainDb (double level, double top, double range) noexcept
 {
     const double x = level - (top - std::abs (range));
-    constexpr double knee = autoKneeDb;
+    const auto& A = autoLaw();
+    const double knee = std::max (0.01, A.kneePerRange > 0.0 ? A.kneePerRange * std::abs (range) : A.kneeDb);
     const double over = x <= -0.5 * knee ? 0.0 : x < 0.5 * knee ? (x + 0.5 * knee) * (x + 0.5 * knee) / (2.0 * knee) : x;
     return range < 0.0 ? -std::min (-range, over) : std::min (range, over);
 }

+ 12 - 0
src/core/FacetEq.h

@@ -159,6 +159,18 @@ double autoGainDb (const EffectParams& params, double sampleRate) noexcept;
 // windows, Nelder-Mead): 1.06 dB rms over 6 trajectories (a fixed threshold at the floor: 4.9 dB) [model: the reference's
 // own detector is not known; its top settles ~9 dB under short loud bursts, which this follower does not do].
 constexpr double autoFloorDb = -39.7, autoDecayDbPerSecond = 1.70, autoKneeDb = 30.5;
+// Round 190js: refitted at 5 ms on the C++ renders themselves (the 10 ms windows above smeared the bursts): the knee
+// scales with the range (kneePerRange x |range|: the band starts moving |range| x kneePerRange / 2 under the threshold),
+// so after a loud burst a -30 dB band keeps ~5 dB of cut 30 dB below it as the reference does while a -15 dB band
+// lets go (autoLaw(); the floor and the fall are round 190jh's constants above). The law also has a slower
+// rise toward the level + an offset and its own gain timing (autoTopRiseMs / autoTopOffsetDb / attackMs / releaseMs:
+// all 0 = off, which the fit chose). See docs/PARITY.md "Round 190js".
+struct AutoLaw
+{
+    double floorDb, decayDbPerSecond, kneeDb, topOffsetDb, topRiseMs, attackMs, releaseMs;
+    double kneePerRange; // > 0: the knee is this many times the range's size (kneeDb unused)
+};
+const AutoLaw& autoLaw() noexcept;
 bool autoThreshold (const EffectParams& params, int band) noexcept;
 // the auto mode's gain law: dynamicGainDb with the auto knee
 double autoDynamicGainDb (double levelDb, double topDb, double rangeDb) noexcept;

+ 6 - 0
src/core/MixSuite.cpp

@@ -5,6 +5,7 @@
 #include <cmath>
 #include <cstdint>
 #include <cstdio>
+#include <cstdlib>
 
 #include "core/Biquad.h"
 #include "core/Simd.h"
@@ -1813,6 +1814,11 @@ private:
             v.wideband = on (p[mode]);
             v.listen = on (p[listen]);
             v.timing = on (p[timing]) ? 1 : 0; // round 190iq
+            v.vocalRevision = on (p[vocalRevision]) ? 1 : 0; // round 190js
+#ifdef LYNX_LAB190JS
+            if (const char* e = std::getenv ("LYNX_LAB_SVON"))
+                v.vocalRevision = std::atoi (e);
+#endif
             vocalEngine.process (l, r, n, v);
             const auto out = (float) dbToGain (levelDb (p[output], extLaw));
             for (int i = 0; i < n; ++i) { l[i] *= out; r[i] *= out; }

+ 5 - 1
src/core/MixSuite.h

@@ -293,7 +293,11 @@ enum Param { frequency, threshold, range, mode, detector, listen, lookahead, rel
              // round 190iq, hidden (not in the info: no control, no text; saved while non-zero): the measured timing of the
              // reference's Allround law (vmatch::vocalds Settings::timing = 1; Single Vocal is unchanged); a new Hush and a
              // translated Pro-DS state get 1, a project or preset saved before keeps 0 (tp172b's timing, bit for bit)
-             timing = count };
+             timing = count,
+             // round 190js, hidden (saved while non-zero): Single Vocal's "stands out" revision (vmatch::vocalds
+             // Settings::vocalRevision = 1; Allround is unchanged); a new Hush and a translated Pro-DS state get 1, a project
+             // or preset saved before keeps 0 (round 148's Single Vocal, bit for bit)
+             vocalRevision };
 double airDb (float v) noexcept;        // round 190dm: 0 … +12 dB
 constexpr double airHz = 8151.0, airSlope = 0.5;
 bool extended (const EffectParams& p) noexcept;         // round 165x: the extended law (and not the classic voicing)

+ 76 - 0
src/core/PluginSubstitutes.cpp

@@ -22,6 +22,7 @@
 #include "core/VoiceShift.h"
 #include "core/VoxStrip.h"
 #include "core/EchoSuite.h"
+#include "core/Reeverb2.h"
 #include "core/DynamicsSuite.h"
 
 namespace lynx
@@ -209,6 +210,10 @@ product = Waves reverb (RVerb / H-Reverb / TrueVerb)
 vendor = Waves
 lynx = Reeverb 2
 waves = RVerb; H-Reverb; TrueVerb
+# round 190js: their states are translated (decay, pre-delay, the wet level by the decay, each reverb's measured tone,
+# H-Reverb's ducking, TrueVerb's direct path and levels; docs/PARITY.md "Round 190js"), the slot at 100 %. Without a
+# readable state: Reeverb 2 wet at the slot's dry / wet 25 % as before
+translate = waves-reverb
 preset = Dry=0; Wet=0.8
 mix = 0.25
 
@@ -1631,6 +1636,75 @@ int translateWavesSuperTap (const std::vector<std::uint8_t>& state, EffectSlot&
     return (int) taps.size() * 4 + 2;
 }
 
+// round 190js: the Waves reverbs on Reeverb 2 (the stand-in since round 129, now with their states translated). Black-box on
+// refcap182's programme (D, X1 … X4 x drums, bass, guitar, vocal, mix; the RealWorld lists read against the settings set
+// through the trials' own parameters): each reverb's decay, pre-delay and wet level are read from its state; its tone (the
+// band gain of the reverb, out / in per third octave) was measured by deconvolving the programme renders and matched by
+// Reeverb 2's own controls, fitted on a model of the parity score (the input's spectrum times Reeverb's impulse
+// response against the reference render, every setting at once). The wet level follows the decay (energy kept about
+// level as the decay grows: tc dB per decade of the decay), as the references do. Raw values are Reeverb 2's (FL's units).
+// RVerb: 2 decay s, 17 pre-delay ms. H-Reverb: 5 reverb time (the tail's, x 1.45 = the measured RT), 16 pre-delay ms,
+// 59 dynamics range dB, 249 dynamics on (ducking: [model] a fixed share of the range off the wet level, fitted on X4).
+// TrueVerb: 0 decay s, 5 distance, 24 pre-delay ms, 29 direct off, 42 reverb level dB, 43 early reflections level dB;
+// the direct path is −0.7 − 0.135 x distance dB (measured: −4.8 … −6.2 dB at distance 2.6 … 13 through deconvolution).
+struct WavesVerbFit
+{
+    const char* name;
+    int lowCut, highCut, size, diffusion, highDamping, bassMult, crossover, early; // Reeverb 2's raw controls
+    double wet0, tcDb, decayScale;
+};
+constexpr WavesVerbFit wavesVerbFits[] {
+    { "RVerb", 19, 96, 13, 100, 29, 233, 2000, 160, 0.54, -8.25, 1.0 },
+    { "H-Reverb", 19, 44, 1, 44, 61, 42, 104, 160, 0.60, -7.5, 1.45 },
+    { "TrueVerb", 19, 221, 9, 100, 126, 266, 2000, 160, 0.54, -5.25, 1.0 },
+};
+constexpr double hReverbDuckShare = 0.25, trueVerbEarly = 0.36, trueVerbDirectDb = -0.7, trueVerbDirectPerDistance = -0.135;
+int translateWavesReverb (const std::vector<std::uint8_t>& state, EffectSlot& slot)
+{
+    if (slot.kind != EffectKind::reeverb2)
+        return 0;
+    const auto name = wavesPluginName (state);
+    const WavesVerbFit* fit = nullptr;
+    for (const auto& f : wavesVerbFits)
+        if (name == f.name)
+            fit = &f;
+    const auto rw = wavesRealWorldParams (state);
+    const bool rverb = fit != nullptr && name == "RVerb", hReverb = fit != nullptr && name == "H-Reverb";
+    const std::size_t decayAt = rverb ? 2 : hReverb ? 5 : 0, predelayAt = rverb ? 17 : hReverb ? 16 : 24;
+    const auto decay = wavesValue (rw, decayAt);
+    if (fit == nullptr || ! decay || *decay <= 0.0)
+        return 0;
+    auto s = reeverb2::fromParams (slot.params);
+    s.p[0] = fit->lowCut;
+    s.p[1] = fit->highCut;
+    s.p[3] = fit->size;
+    s.p[4] = fit->diffusion;
+    s.p[6] = fit->highDamping;
+    s.p[7] = fit->bassMult;
+    s.p[8] = fit->crossover;
+    s.p[5] = std::clamp ((int) std::lround (*decay * fit->decayScale * 10.0), 1, 200);
+    s.p[2] = std::clamp ((int) std::lround (wavesValue (rw, predelayAt).value_or (0.0) * 0.384), 0, 384);
+    double levelDb = 0.0, early = 1.0, dry = 0.0;
+    if (hReverb && wavesValue (rw, 249).value_or (0.0) >= 0.5)
+        levelDb += hReverbDuckShare * wavesValue (rw, 59).value_or (0.0);
+    if (! rverb && ! hReverb) // TrueVerb
+    {
+        levelDb += wavesValue (rw, 42).value_or (0.0);
+        early = trueVerbEarly * std::pow (10.0, wavesValue (rw, 43).value_or (0.0) / 20.0);
+        if (wavesValue (rw, 29).value_or (0.0) < 0.5)
+            dry = 0.8 * std::pow (10.0, (trueVerbDirectDb + trueVerbDirectPerDistance * wavesValue (rw, 5).value_or (0.0)) / 20.0);
+    }
+    else
+        early = (double) fit->early / 160.0;
+    const double wet = std::clamp (fit->wet0 * std::pow (10.0, (fit->tcDb * std::log10 (*decay / 1.5) + levelDb) / 20.0), 0.0, 1.0);
+    s.p[12] = (int) std::lround (wet * 160.0);
+    s.p[11] = (int) std::lround (std::min (1.0, early) * 160.0);
+    s.p[10] = (int) std::lround (dry * 160.0);
+    reeverb2::toParams (s, slot.params);
+    slot.mix = 1.0f; // the dry path is Reeverb's own (TrueVerb's direct sound); the slot plays the whole output
+    return 10;
+}
+
 // DeEsser (15 values): 0 frequency Hz, 2 threshold dB, 10 monitor (1 = side chain), 13 side chain (1 = high pass,
 // 2 = band pass), 14 audio (0 = split, 1 = wideband). Round 123: Hush's "classic split" voicing is the de-esser measured
 // black-box on the official trial (core/VoiceMatch.h; REA_rodada123 §2), so the controls map one to one.
@@ -3072,6 +3146,8 @@ RawTranslator rawTranslatorNamed (std::string_view name)
         return translateWavesSuperTap;
     if (name == "waves-sslcomp")
         return translateWavesSslComp;
+    if (name == "waves-reverb")
+        return translateWavesReverb;
     return nullptr;
 }
 

+ 93 - 18
src/core/VoiceMatch.cpp

@@ -915,6 +915,30 @@ struct Timing190iq
  #define TIMING_190IQ_CONSTEXPR constexpr
 #endif
 TIMING_190IQ_CONSTEXPR Timing190iq timingAll190iq { 0.0084, 1.4611, 2.9413, 5.8197, 1.0945, -4.8461 };
+// round 190js [EXEC] (refcap030's `ess` probe, Single Vocal: a 500 Hz body at -14 dBFS under 5 … 9 kHz bursts of rising
+// level, a sweep of band tones and a long burst alone): Single Vocal's revision 1. The reference leaves a burst alone until
+// it stands out from the body by a margin (+5 dB: nothing; +11 dB: the whole range at every threshold), ignores band
+// tones at the body's level, decides late (the reduction starts ~20 ms after the burst minus the look-ahead) and then
+// holds a steady reduction; alone, a burst follows a level law steeper than round 148's. The stand-out test compares the
+// signal above a split (0.567 x the band's high-pass, 4th-order) with the body below it from 200 Hz up — round 148's test
+// (the band against everything under the high-pass) counted a burst's own lower half as the body, and a kick drum's low
+// end hid the cymbals (tp172b's drums). Fitted by Nelder-Mead on the 27 Single Vocal ess renders (5 ms windows, full
+// band and above 4 kHz; /mnt/e/lynx-work/parity190js/hush/fitsv.py): 3.05 → 0.50 dB rms; the body's 200 Hz high-pass and
+// the law offset (9.65 → 9.0) then chosen on the parity score of tp172b's drums / vocal and refcap030's mix / stim
+// renders (hush/svscore.py). Fields: ratio ms, open / close dB, gate delay ms, gain attack / release ms, law offset dB,
+// span scale, detector release ms, split, body high-pass Hz.
+struct Vocal190js
+{
+    double ratioMs, openRatioDb, closeRatioDb, gateDelayMs, gainAttackMs, gainReleaseMs, lawOffsetDb, spanScale, detReleaseMs;
+    double splitRatio; // the stand-out test's split: the band's high-pass x this (the signal above it against the signal below)
+    double bodyLowHz;  // the body (the signal below the split) starts here (2nd-order high-pass; 0 = from DC)
+};
+#ifdef LYNX_LAB190JS
+ #define VOCAL_190JS_CONSTEXPR static
+#else
+ #define VOCAL_190JS_CONSTEXPR constexpr
+#endif
+VOCAL_190JS_CONSTEXPR Vocal190js vocal190js { 4.85, 8.19, 7.57, 1.57, 6.21, 20.4, 9.0, 1.11, 0.50, 0.567, 200.0 };
 } // namespace
 
 void DeEsser::prepare (double sampleRate) noexcept
@@ -923,16 +947,23 @@ void DeEsser::prepare (double sampleRate) noexcept
     if (const char* e = std::getenv ("LYNX_LAB_IQA"))
         std::sscanf (e, "%lf,%lf,%lf,%lf,%lf,%lf", &timingAll190iq.detAttackMs, &timingAll190iq.detReleaseMs, &timingAll190iq.gainAttackMs,
                      &timingAll190iq.gainReleaseMs, &timingAll190iq.aheadScale, &timingAll190iq.aheadOffsetMs);
+#endif
+#ifdef LYNX_LAB190JS
+    if (const char* e = std::getenv ("LYNX_LAB_SV"))
+        std::sscanf (e, "%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &vocal190js.ratioMs, &vocal190js.openRatioDb, &vocal190js.closeRatioDb,
+                     &vocal190js.gateDelayMs, &vocal190js.gainAttackMs, &vocal190js.gainReleaseMs, &vocal190js.lawOffsetDb,
+                     &vocal190js.spanScale, &vocal190js.detReleaseMs, &vocal190js.splitRatio, &vocal190js.bodyLowHz);
 #endif
     sr = sampleRate > 0.0 ? sampleRate : 48000.0;
     latency = std::clamp ((int) std::lround (0.015 * sr), 1, ring / 2);
-    designedHp = designedLp = -1.0;
+    designedHp = designedLp = designedSplit = -1.0;
     reset();
 }
 
 void DeEsser::reset() noexcept
 {
-    for (auto* b : { &hp1, &hp2, &lp1, &lp2, &low1, &low2, &split1, &split2, &bhp1, &bhp2, &blp1, &blp2, &blow1, &blow2 })
+    for (auto* b : { &hp1, &hp2, &lp1, &lp2, &low1, &low2, &split1, &split2, &bhp1, &bhp2, &blp1, &blp2, &blow1, &blow2,
+                     &shi1, &shi2, &slo1, &slo2, &bshi1, &bshi2, &bslo1, &bslo2 })
         b->reset();
     eh = qh = ql = sm = 0.0;
     beh = bqh = bql = bsm = 0.0;
@@ -967,18 +998,40 @@ void DeEsser::design (const Settings& s) noexcept
 void DeEsser::process (float* l, float* r, int n, const Settings& s) noexcept
 {
     design (s);
+    if (s.vocalRevision >= 1 && s.gate) // round 190js: the stand-out test's split (4th-order Butterworth both ways)
+    {
+        const double f = std::clamp (designedHp * vocal190js.splitRatio, 200.0, sr * 0.45);
+        if (f != designedSplit)
+        {
+            designedSplit = f;
+            shi1.filter (sr, 1, f, 0.54119610); shi2.filter (sr, 1, f, 1.30656296);
+            slo1.filter (sr, 0, f, 0.54119610); slo2.filter (sr, 0, f, 1.30656296);
+            sbody.filter (sr, 1, std::clamp (vocal190js.bodyLowHz, 10.0, f), 0.70710678);
+            bshi1 = shi1; bshi2 = shi2; bslo1 = slo1; bslo2 = slo2; bsbody = sbody;
+            for (auto* b : { &shi1, &shi2, &slo1, &slo2, &bshi1, &bshi2, &bslo1, &bslo2, &sbody, &bsbody })
+                b->reset();
+        }
+    }
     const bool t1 = s.timing >= 1 && ! s.gate; // round 190iq: timing revision 1 (the Allround law only)
+    const bool v1 = s.vocalRevision >= 1 && s.gate; // round 190js: Single Vocal's revision 1
     const auto& T = timingAll190iq;
-    const double ca = pole (t1 ? T.detAttackMs : detAttackMs, sr), cr = pole (t1 ? T.detReleaseMs : s.gate ? sDetReleaseMs : detReleaseMs, sr);
-    const double ga = pole (t1 ? T.gainAttackMs : s.gate ? sGainAttackMs : gainAttackMs, sr);
-    const double gr = pole (t1 ? T.gainReleaseMs : s.gate ? sGainReleaseMs : gainReleaseMs, sr);
-    const double cq = pole (ratioMs, sr);
+    const auto& V = vocal190js;
+    const double ca = pole (t1 ? T.detAttackMs : detAttackMs, sr);
+    const double cr = pole (t1 ? T.detReleaseMs : v1 ? V.detReleaseMs : s.gate ? sDetReleaseMs : detReleaseMs, sr);
+    const double ga = pole (t1 ? T.gainAttackMs : v1 ? V.gainAttackMs : s.gate ? sGainAttackMs : gainAttackMs, sr);
+    const double gr = pole (t1 ? T.gainReleaseMs : v1 ? V.gainReleaseMs : s.gate ? sGainReleaseMs : gainReleaseMs, sr);
+    const double cq = pole (v1 ? V.ratioMs : ratioMs, sr);
+    const double openR = v1 ? V.openRatioDb : openRatioDb, closeR = v1 ? V.closeRatioDb : closeRatioDb;
     const double thr = std::clamp (s.thresholdDb, -60.0, 0.0), range = std::clamp (s.rangeDb, 0.0, 24.0);
-    const double span = s.gate ? std::max (1.0, spanDb + spanScale * (0.1 - thr)) : 0.1 - thr;
-    const double laAdj = s.gate ? lawOffsetDb : allroundOffsetDb + allroundBw * 10.0 * std::log10 (7000.0 / std::max (100.0, designedLp - designedHp));
+    const double span = s.gate ? std::max (1.0, spanDb + (v1 ? V.spanScale : spanScale) * (0.1 - thr)) : 0.1 - thr;
+    const double laAdj = s.gate ? (v1 ? V.lawOffsetDb : lawOffsetDb)
+                                : allroundOffsetDb + allroundBw * 10.0 * std::log10 (7000.0 / std::max (100.0, designedLp - designedHp));
     const double aheadMs = t1 ? T.aheadScale * (s.lookahead ? std::clamp (s.lookaheadMs, 0.0, 15.0) : 0.0) + T.aheadOffsetMs
                               : (s.lookahead ? std::clamp (s.lookaheadMs, 0.0, 15.0) + extraAheadMs : 0.0);
     const int ahead = std::clamp ((int) std::lround (aheadMs * 0.001 * sr), 0, latency);
+    // round 190js: Single Vocal's revision decides on the stand-out test this many samples after the sample played now
+    // (its ratio is read at now + ahead − gateDelay, never older than the ring holds)
+    const int gateShift = v1 ? std::clamp (ahead - (int) std::lround (V.gateDelayMs * 0.001 * sr), -(ring - latency - 64), latency) : 0;
     constexpr std::int64_t m = ring - 1;
     float maxGr = 0.0f, maxDet = -300.0f;
     // round 165x: the reference's link (two lanes when the channels hear different signals)
@@ -1005,8 +1058,19 @@ void DeEsser::process (float* l, float* r, int n, const Settings& s) noexcept
         const double lw = low2.process (low1.process ((float) x, 0), 0);
         const double ph = h * h, pl = lw * lw;
         eh = ph > eh ? ca * eh + (1.0 - ca) * ph : cr * eh + (1.0 - cr) * ph;
-        qh = cq * qh + (1.0 - cq) * ph;
-        ql = cq * ql + (1.0 - cq) * pl;
+        if (v1) // round 190js: above the split against below it
+        {
+            const double a1 = shi2.process (shi1.process ((float) x, 0), 0);
+            double b1 = slo2.process (slo1.process ((float) x, 0), 0);
+            if (vocal190js.bodyLowHz > 0.0) b1 = sbody.process ((float) b1, 0);
+            qh = cq * qh + (1.0 - cq) * a1 * a1;
+            ql = cq * ql + (1.0 - cq) * b1 * b1;
+        }
+        else
+        {
+            qh = cq * qh + (1.0 - cq) * ph;
+            ql = cq * ql + (1.0 - cq) * pl;
+        }
         const auto w = (std::size_t) (pos & m);
         level[w] = (float) (10.0 * std::log10 (2.0 * eh + 1e-30));
         ratio[w] = (float) (10.0 * std::log10 ((qh + 1e-30) / (ql + 1e-30)));
@@ -1016,8 +1080,19 @@ void DeEsser::process (float* l, float* r, int n, const Settings& s) noexcept
             const double lb = blow2.process (blow1.process ((float) xb, 0), 0);
             const double pbh = hb * hb, pbl = lb * lb;
             beh = pbh > beh ? ca * beh + (1.0 - ca) * pbh : cr * beh + (1.0 - cr) * pbh;
-            bqh = cq * bqh + (1.0 - cq) * pbh;
-            bql = cq * bql + (1.0 - cq) * pbl;
+            if (v1)
+            {
+                const double a1 = bshi2.process (bshi1.process ((float) xb, 0), 0);
+                double b1 = bslo2.process (bslo1.process ((float) xb, 0), 0);
+                if (vocal190js.bodyLowHz > 0.0) b1 = bsbody.process ((float) b1, 0);
+                bqh = cq * bqh + (1.0 - cq) * a1 * a1;
+                bql = cq * bql + (1.0 - cq) * b1 * b1;
+            }
+            else
+            {
+                bqh = cq * bqh + (1.0 - cq) * pbh;
+                bql = cq * bql + (1.0 - cq) * pbl;
+            }
             blevel[w] = (float) (10.0 * std::log10 (2.0 * beh + 1e-30));
             bratio[w] = (float) (10.0 * std::log10 ((bqh + 1e-30) / (bql + 1e-30)));
         }
@@ -1028,12 +1103,12 @@ void DeEsser::process (float* l, float* r, int n, const Settings& s) noexcept
         double gainDb = 0.0;
         if (now >= 0)
         {
-            const double la = level[(std::size_t) ((now + ahead) & m)], rr = ratio[(std::size_t) (now & m)];
+            const double la = level[(std::size_t) ((now + ahead) & m)], rr = ratio[(std::size_t) ((now + gateShift) & m)];
             if (! s.gate)
                 open = true;
-            else if (! open && la >= thr + openDb && rr >= openRatioDb)
+            else if (! open && la >= thr + openDb && rr >= openR)
                 open = true;
-            else if (open && (la < thr + closeDb || rr < closeRatioDb))
+            else if (open && (la < thr + closeDb || rr < closeR))
                 open = false;
             const double t = open ? std::clamp (range * (la + laAdj - thr) / span, 0.0, range) : 0.0;
             sm = t > sm ? ga * sm + (1.0 - ga) * t : gr * sm + (1.0 - gr) * t;
@@ -1041,12 +1116,12 @@ void DeEsser::process (float* l, float* r, int n, const Settings& s) noexcept
             maxDet = std::max (maxDet, (float) la);
             if (two)
             {
-                const double lb = blevel[(std::size_t) ((now + ahead) & m)], rb = bratio[(std::size_t) (now & m)];
+                const double lb = blevel[(std::size_t) ((now + ahead) & m)], rb = bratio[(std::size_t) ((now + gateShift) & m)];
                 if (! s.gate)
                     bopen = true;
-                else if (! bopen && lb >= thr + openDb && rb >= openRatioDb)
+                else if (! bopen && lb >= thr + openDb && rb >= openR)
                     bopen = true;
-                else if (bopen && (lb < thr + closeDb || rb < closeRatioDb))
+                else if (bopen && (lb < thr + closeDb || rb < closeR))
                     bopen = false;
                 const double tb = bopen ? std::clamp (range * (lb + laAdj - thr) / span, 0.0, range) : 0.0;
                 bsm = tb > bsm ? ga * bsm + (1.0 - ga) * tb : gr * bsm + (1.0 - gr) * tb;

+ 6 - 0
src/core/VoiceMatch.h

@@ -151,6 +151,9 @@ struct Settings
     double link = 1.0, linkOnly = 0.0;
     bool gate = true; // round tp172b: false = the reference's Allround mode (no single-vocal gate, the same level law)
     int timing = 0;   // round 190iq: 1 = the Allround law's measured timing revision (detector, gain, look-ahead); Single Vocal ignores it
+    // round 190js: 1 = Single Vocal's "stands out" revision (the band must stand out from the signal below it by the
+    // measured margin, the gate decides a fixed delay late, the measured level law and gain timing); Allround ignores it
+    int vocalRevision = 0;
 };
 
 class DeEsser
@@ -174,6 +177,9 @@ private:
     // round 165x: the second detector lane (the right channel's blend, or the side signal)
     Biquad bhp1, bhp2, blp1, blp2, blow1, blow2;
     double beh = 0.0, bqh = 0.0, bql = 0.0, bsm = 0.0;
+    // round 190js: Single Vocal's revision compares the signal above a split under the band with the signal below it
+    Biquad shi1, shi2, slo1, slo2, bshi1, bshi2, bslo1, bslo2, sbody, bsbody;
+    double designedSplit = -1.0;
     bool bopen = false;
     std::array<float, ring> blevel {}, bratio {};
     std::array<float, ring> dl {}, dr {}, level {}, ratio {};

+ 2 - 0
tests/Dyn190dmTests.inc

@@ -29,6 +29,8 @@ inline Render render (const Case& c)
     auto slot = lynx::makeEffectSlot (c.kind);
     for (const auto& [k, v] : c.set)
         slot.params[(std::size_t) k] = v;
+    if (c.kind == lynx::EffectKind::hushDeEsser) // round 190js: a new Hush runs Single Vocal's revision; the base commit had none
+        slot.params[(std::size_t) lynx::mixsuite::hush::vocalRevision] = 0.0f;
     auto fx = lynx::makeEffect (slot);
     fx->prepare (sr);
     const int n = (int) (1.5 * sr), block = 256;

+ 4 - 2
tests/Parity190iqTests.inc

@@ -80,7 +80,8 @@ TEST (parity190iq_hush_timing_is_hidden_new_instances_run_it_old_projects_do_not
     CHECK (info.params.size() == (std::size_t) hu::timing); // hidden: not in the info, so no new control or string
     auto s = makeEffectSlot (EffectKind::hushDeEsser);
     CHECK (s.params[(std::size_t) hu::timing] == 1.0f);
-    CHECK (savedEffectParamCount (s) == (std::size_t) hu::timing + 1); // saved, since it is not zero
+    CHECK (savedEffectParamCount (s) == (std::size_t) hu::vocalRevision + 1); // saved, since it is not zero (round 190js: and the
+                                                                                // Single Vocal revision after it)
     auto now = s;
     upgradeLoadedEffectParams (now, (std::size_t) hu::timing + 1);
     CHECK (now.params[(std::size_t) hu::timing] == 1.0f);
@@ -88,7 +89,7 @@ TEST (parity190iq_hush_timing_is_hidden_new_instances_run_it_old_projects_do_not
     auto old = s;
     upgradeLoadedEffectParams (old, (std::size_t) hu::timing);
     CHECK (old.params[(std::size_t) hu::timing] == 0.0f);
-    CHECK (savedEffectParamCount (old) == (std::size_t) hu::timing);
+    CHECK (old.params[(std::size_t) hu::vocalRevision] == 0.0f && savedEffectParamCount (old) == (std::size_t) hu::timing);
 }
 
 TEST (parity190iq_pro_ds_translation_runs_the_measured_timing)
@@ -134,6 +135,7 @@ TEST (parity190iq_hush_timing0_renders_as_the_base_commit_did)
     {
         auto s = parity190iq::slot (c.voc != 0);
         s.params[(std::size_t) hu::timing] = 0.0f;
+        s.params[(std::size_t) hu::vocalRevision] = 0.0f; // round 190js: a project saved before has Single Vocal's revision off too
         if (c.idx >= 0) s.params[(std::size_t) c.idx] = c.val;
         if (c.idx2 >= 0) s.params[(std::size_t) c.idx2] = c.val2;
         const int n = (int) (1.6 * c.sr);

+ 7 - 4
tests/Parity190jhTests.inc

@@ -150,8 +150,11 @@ TEST (parity190jh_facet_auto_threshold_follows_the_loudest_recent_level)
     const double loud = gainAt (1.5), back = gainAt (3.0), later = gainAt (5.5);
     std::printf ("  facet auto: %.2f dB at -12 dBFS, %.2f / %.2f dB at -40 dBFS (1 s / 3.5 s later)\n", loud, back, later);
     CHECK (std::abs (loud - (6.0 - 15.0)) < 0.6);          // the whole range
-    CHECK (back > 6.0 - 6.0 && back < 6.0 - 0.5);          // mostly recovered (the soft knee still takes a little)
-    CHECK (later < back - 0.2 && later > 6.0 - 15.0);      // the threshold creeps down with the top (soft knee: slowly)
+    // round 190js refitted the law (the knee is 1.53 x the range: a -15 dB band lets go 28 dB under the top, the reference's
+    // behaviour on the time-constant probe): 1 s later still releasing (305 ms here), then about recovered while the
+    // threshold creeps down into the knee
+    CHECK (back > 6.0 - 1.0 && back < 6.0 + 0.1);
+    CHECK (later > 6.0 - 1.5 && later < 6.0 + 0.1);
     // the manual threshold at the same setting is the old law: -80 dB = the whole range at both levels
     auto m = s;
     m.params[(std::size_t) facet::autoThresholdParam0] = 0.0f;
@@ -184,8 +187,8 @@ TEST (parity190jh_pro_q4_dynamic_bands_are_translated)
     CHECK (std::abs (facet::rangeDb (s.params[(std::size_t) facet::rangeParam0 + 1]) - 12.0) < 0.01 && ! facet::autoThreshold (s.params, 1));
     CHECK (std::abs (facet::thresholdDb (s.params[(std::size_t) facet::thresholdParam0 + 1]) + 30.0) < 0.01);
     CHECK (! facet::isDynamic (s.params, 2) && ! facet::autoThreshold (s.params, 2)); // dynamics off: a static band
-    CHECK (std::abs (facet::attackMs (s.params[(std::size_t) facet::attackParam]) - 18.1) < 0.1);
-    CHECK (std::abs (facet::releaseMs (s.params[(std::size_t) facet::releaseParam]) - 305.0) < 1.0);
+    CHECK (std::abs (facet::attackMs (s.params[(std::size_t) facet::attackParam]) - 9.22) < 0.1);   // (round 190js: was 18.1 / 305)
+    CHECK (std::abs (facet::releaseMs (s.params[(std::size_t) facet::releaseParam]) - 268.0) < 1.0);
     // the manual threshold law (the parameter's own texts): 0 -90, 0.125 -66, 0.25 -45, 0.875 -7.5 dB
     for (const auto& [x, db] : { std::pair { 0.0f, -80.0 }, std::pair { 0.125f, -66.0 }, std::pair { 0.25f, -45.0 }, std::pair { 0.875f, -7.5 } })
     {

+ 6 - 0
tests/Parity190jsGold.inc

@@ -0,0 +1,6 @@
+        { -1, 0.00000000f, -1, 0.00000000f, 48000.0, 0xbd0267fe8bd247eaull, 3118.72192, 0.173205078, -0.0222742148 },
+        { 1, 0.200000003f, 2, 0.800000012f, 44100.0, 0xbaea8e67799d0fa5ull, 2849.29999, 0.169534072, 0.00140445493 },
+        { 1, 0.800000012f, 2, 0.250000000f, 96000.0, 0xb914a8acfdfe6ffaull, 6652.05275, 0.173205078, -4.78844158e-05 },
+        { 3, 0.00000000f, 6, 0.00000000f, 48000.0, 0x40efdb52ce2963f6ull, 3116.91572, 0.173205078, -0.0222742148 },
+        { 0, 0.300000012f, 11, 0.600000024f, 48000.0, 0x397327a37351722eull, 3117.00111, 0.173205078, -0.0222742148 },
+        { 13, 0.400000006f, 24, 1.00000000f, 48000.0, 0x55ba3d8544ab1d1full, 3118.70938, 0.173205078, -0.0222742148 },

+ 236 - 0
tests/Parity190jsTests.inc

@@ -0,0 +1,236 @@
+// Round 190js: plugin parity 5 (black-box; /mnt/e/lynx-work/parity190js/HANDOFF.md).
+// - The Waves reverbs (RVerb, H-Reverb, TrueVerb) translated onto their stand-in Reeverb 2: decay, pre-delay, the wet level
+//   by the decay, each reverb's measured tone, H-Reverb's ducking, TrueVerb's direct path and levels (refcap182).
+// - Hush De-esser's Single Vocal gets a "stands out" revision (hidden vocalRevision; a project saved before keeps round
+//   148's Single Vocal bit for bit: fingerprints from the base commit's objects, /mnt/e/lynx-work/parity190js/gold).
+// - Facet EQ's automatic threshold refitted at 5 ms (knee by the range; the Pro-Q 4 translator's 50 % = 9.2 / 268 ms).
+#include <cmath>
+#include <cstdint>
+#include <cstring>
+
+#include "core/Effects.h"
+#include "core/FacetEq.h"
+#include "core/MixSuite.h"
+#include "core/Reeverb2.h"
+
+namespace parity190js
+{
+namespace hu = lynx::mixsuite::hush;
+// the gold input (as gold/gold.cpp): a 500 Hz body (-14 dBFS) with resonant 7 kHz hiss bursts of rising level, the body off
+// after 1.75 s
+inline void signal (std::vector<float>& l, std::vector<float>& r, double sr)
+{
+    unsigned s = 19034u;
+    double y1 = 0.0, y2 = 0.0;
+    const double w = 2.0 * M_PI * 7000.0 / sr, rr = 0.93, a1 = 2.0 * rr * std::cos (w), a2 = -rr * rr;
+    const int n = (int) l.size();
+    for (int i = 0; i < n; ++i)
+    {
+        const double t = i / sr;
+        s = s * 1664525u + 1013904223u;
+        const double nz = (double) (s >> 8) / 8388608.0 - 1.0;
+        const double y = nz + a1 * y1 + a2 * y2; y2 = y1; y1 = y;
+        const int k = (int) (t / 0.25);
+        const double ph = t - 0.25 * k, lvl = std::pow (10.0, (-36.0 + 6.0 * (k % 7)) / 20.0);
+        const double burst = ph > 0.05 && ph < 0.2 ? lvl * 0.05 * y : 0.0;
+        const double body = t < 1.75 ? 0.2 * std::sin (2.0 * M_PI * 500.0 * t) : 0.0;
+        const double v = body + burst;
+        l[(std::size_t) i] = (float) v;
+        r[(std::size_t) i] = (float) (0.9 * v);
+    }
+}
+inline lynx::EffectSlot vocal (float revision)
+{
+    auto s = lynx::makeEffectSlot (lynx::EffectKind::hushDeEsser);
+    s.params[(std::size_t) hu::rangeLaw] = 1.0f;
+    s.params[(std::size_t) hu::vocalVoicing] = 1.0f;
+    s.params[(std::size_t) hu::allround] = 0.0f;
+    s.params[(std::size_t) hu::lookaheadTime] = 10.0f / 15.0f;
+    s.params[(std::size_t) hu::vocalRevision] = revision;
+    return s;
+}
+inline void render (const lynx::EffectSlot& s, double sr, std::vector<float>& l, std::vector<float>& r)
+{
+    auto fx = lynx::makeEffect (s);
+    fx->prepare (sr);
+    const int n = (int) l.size();
+    for (int off = 0; off < n; off += 256)
+        fx->process (l.data() + off, r.data() + off, std::min (256, n - off), s.params, 120.0);
+}
+// band-limited level change (dB) of out against in over [a, b) s, through an FFT-free one-pole pair (lo … hi Hz)
+inline double bandGainDb (const std::vector<float>& in, const std::vector<float>& out, int latency, double sr, double a, double b)
+{
+    double x = 0.0, y = 0.0;
+    for (int i = (int) (a * sr); i < (int) (b * sr); ++i)
+    {
+        x += (double) in[(std::size_t) i] * in[(std::size_t) i];
+        y += (double) out[(std::size_t) (i + latency)] * out[(std::size_t) (i + latency)];
+    }
+    return 10.0 * std::log10 ((y + 1e-30) / (x + 1e-30));
+}
+} // namespace parity190js
+
+TEST (parity190js_hush_single_vocal_revision_is_hidden_new_and_translated_run_it_old_projects_do_not)
+{
+    using namespace lynx;
+    namespace hu = mixsuite::hush;
+    const auto& info = effectInfo (EffectKind::hushDeEsser);
+    CHECK (info.params.size() == (std::size_t) hu::timing && hu::vocalRevision == hu::timing + 1); // hidden: no control, no string
+    auto s = makeEffectSlot (EffectKind::hushDeEsser);
+    CHECK (s.params[(std::size_t) hu::vocalRevision] == 1.0f && savedEffectParamCount (s) == (std::size_t) hu::vocalRevision + 1);
+    auto now = s;
+    upgradeLoadedEffectParams (now, (std::size_t) hu::vocalRevision + 1);
+    CHECK (now.params[(std::size_t) hu::vocalRevision] == 1.0f);
+    // saved by round 190iq (the timing, not the revision) or before: round 148's Single Vocal
+    auto iq = s;
+    upgradeLoadedEffectParams (iq, (std::size_t) hu::vocalRevision);
+    CHECK (iq.params[(std::size_t) hu::vocalRevision] == 0.0f && iq.params[(std::size_t) hu::timing] == 1.0f);
+    auto old = s;
+    upgradeLoadedEffectParams (old, (std::size_t) hu::timing);
+    CHECK (old.params[(std::size_t) hu::vocalRevision] == 0.0f && old.params[(std::size_t) hu::timing] == 0.0f);
+    // a translated Pro-DS state (her first state's values) runs it
+    std::vector<float> st { 0.0f, 0.2715f, 6.0f, 0.0f, 0.75f, 1.0f, 12.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
+                            0.0f, 0.0f, 0.0f, 0.2f, 0.0f, -1.0f, 0.0f, 0.0f };
+    int n = 0;
+    const auto t = m124x::substitute ("FabFilter Pro-DS", p165w::fabf (st), n);
+    CHECK (t.kind == EffectKind::hushDeEsser && t.params[(std::size_t) hu::vocalRevision] == 1.0f);
+}
+
+TEST (parity190js_hush_single_vocal_revision0_renders_as_the_base_commit_did)
+{
+    using namespace lynx;
+    namespace hu = mixsuite::hush;
+    struct Case
+    {
+        int idx;
+        float val;
+        int idx2;
+        float val2;
+        double sr;
+        std::uint64_t hash;
+        double energy, a, b;
+    };
+    // 2.2 s of the gold input in blocks of 256: FNV-1a of the float bits, the energy, two samples. From the base commit's
+    // objects (origin/parity190jh; /mnt/e/lynx-work/parity190js/gold: gold_base.txt — the round's objects print the same lines)
+    const Case cases[] = {
+#include "tests/Parity190jsGold.inc"
+    };
+    for (const auto& c : cases)
+    {
+        auto s = parity190js::vocal (0.0f);
+        if (c.idx >= 0) s.params[(std::size_t) c.idx] = c.val;
+        if (c.idx2 >= 0) s.params[(std::size_t) c.idx2] = c.val2;
+        const int n = (int) (2.2 * c.sr);
+        std::vector<float> l ((std::size_t) n), r ((std::size_t) n);
+        parity190js::signal (l, r, c.sr);
+        parity190js::render (s, c.sr, l, r);
+        std::uint64_t h = 1469598103934665603ull;
+        double e = 0.0;
+        for (int i = 0; i < n; ++i)
+            for (const float v : { l[(std::size_t) i], r[(std::size_t) i] })
+            {
+                std::uint32_t u;
+                std::memcpy (&u, &v, 4);
+                for (int b = 0; b < 4; ++b) { h ^= (u >> (8 * b)) & 0xffu; h *= 1099511628211ull; }
+                e += (double) v * v;
+            }
+       #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 43))
+        CHECK (h == c.hash); // the libm the fingerprints were taken with
+       #endif
+        CHECK (std::abs (e - c.energy) < 1e-6 * c.energy + 1e-9);
+        CHECK (std::abs ((double) l[(std::size_t) (n / 3)] - c.a) < 1e-6 && std::abs ((double) r[(std::size_t) (n / 2)] - c.b) < 1e-6);
+    }
+}
+
+TEST (parity190js_hush_single_vocal_acts_on_what_stands_out)
+{
+    using namespace lynx;
+    // a 500 Hz body at -14 dBFS (sine peak) under a 7 kHz burst at 0.3 … 0.6 s: 5 dB over the body (the reference leaves it),
+    // 12 dB over (the whole range); range 12 dB, threshold -30 dB, wide band, look-ahead 10 ms, 48 kHz
+    const double sr = 48000.0;
+    const auto run = [&] (float rev, double burstDb) {
+        const int n = (int) sr;
+        std::vector<float> in ((std::size_t) n);
+        for (int i = 0; i < n; ++i)
+        {
+            const double t = i / sr;
+            in[(std::size_t) i] = (float) (0.2 * std::sin (2.0 * M_PI * 500.0 * t)
+                                           + (t >= 0.3 && t < 0.6 ? 0.2 * std::pow (10.0, burstDb / 20.0) * std::sin (2.0 * M_PI * 7000.0 * t) : 0.0));
+        }
+        auto s = parity190js::vocal (rev);
+        s.params[(std::size_t) mixsuite::hush::mode] = 1.0f;
+        s.params[(std::size_t) mixsuite::hush::threshold] = 0.5f;
+        s.params[(std::size_t) mixsuite::hush::range] = 0.5f;
+        auto l = in, r = in;
+        auto fx = makeEffect (s);
+        fx->prepare (sr);
+        const int lat = fx->latencySamples();
+        for (int off = 0; off < n; off += 256)
+            fx->process (l.data() + off, r.data() + off, std::min (256, n - off), s.params, 120.0);
+        return parity190js::bandGainDb (in, l, lat, sr, 0.4, 0.55);
+    };
+    const double small1 = run (1.0f, 5.0), big1 = run (1.0f, 12.0), small0 = run (0.0f, 5.0);
+    std::printf ("  hush single vocal: +5 dB burst %.2f dB (revision 0: %.2f), +12 dB burst %.2f dB\n", small1, small0, big1);
+    CHECK (small1 > -1.0);               // stands out by 5 dB: left alone (the reference: -0.2 dB)
+    CHECK (big1 < -10.0 && big1 > -12.5); // by 12 dB: the whole range (12 dB)
+    CHECK (small0 < small1 - 1.0);       // round 148's test acted on it
+}
+
+TEST (parity190js_facet_auto_threshold_knee_follows_the_range)
+{
+    using namespace lynx;
+    // a +6 dB bell at 1 kHz, automatic threshold: a -6 dBFS tone for 1 s, then -40 dBFS. The reference keeps ~5 dB of cut
+    // at -40 dBFS with a -30 dB range (time-constant probe: 4.5 s), and none with -15 dB; round 190jh's 30.5 dB knee took
+    // 2.7 / 0.6 dB there
+    const double sr = 48000.0;
+    const auto cutAt = [&] (double rangeDb) {
+        auto s = parity190jh::facetBand (0, facet::shapeValue (facet::Shape::bell), facet::gainValue (6.0), facet::rangeValue (rangeDb),
+                                         facet::thresholdValue (-80.0), 0.5f, 0.5f, 0.0f);
+        s.params[(std::size_t) facet::autoThresholdParam0] = 1.0f;
+        const int n = (int) (2.5 * sr);
+        std::vector<float> l ((std::size_t) n), r;
+        for (int i = 0; i < n; ++i)
+            l[(std::size_t) i] = (float) (std::pow (10.0, (i < (int) sr ? -6.0 : -40.0) / 20.0) * std::sin (2.0 * M_PI * 1000.0 * i / sr));
+        r = l;
+        const auto in = l;
+        parity190jh::render (s, sr, l, r);
+        return 6.0 - parity190js::bandGainDb (in, l, 0, sr, 2.0, 2.2);
+    };
+    const double c30 = cutAt (-30.0), c15 = cutAt (-15.0);
+    std::printf ("  facet auto: cut %.2f dB (range -30) / %.2f dB (range -15) 1 s after a -6 dBFS tone, at -40 dBFS\n", c30, c15);
+    CHECK (c30 > 3.5 && c30 < 8.0);
+    CHECK (c15 < 0.5);
+    CHECK (std::abs (facet::autoLaw().kneePerRange - 1.53) < 1e-9 && std::abs (facet::autoLaw().decayDbPerSecond - 1.70) < 1e-9);
+}
+
+TEST (parity190js_waves_reverbs_are_translated_onto_reeverb2)
+{
+    using namespace lynx;
+    int n = 0;
+    // RVerb: decay 2.4 s, pre-delay 30 ms (index 2 / 17)
+    const auto rv = parity190jh::waves ("RVerb Stereo", "RVerb", parity190jh::list (96, { { 2, "2.4" }, { 17, "30" } }), n);
+    CHECK (rv.kind == EffectKind::reeverb2 && n == 10 && rv.mix == 1.0f);
+    auto s = reeverb2::fromParams (rv.params);
+    CHECK (s.p[5] == 24 && s.p[2] == 12 && s.p[10] == 0 && s.p[1] == 96 && s.p[6] == 29 && s.p[11] == 160);
+    CHECK (s.p[12] == (int) std::lround (160.0 * 0.54 * std::pow (10.0, -8.25 * std::log10 (2.4 / 1.5) / 20.0)));
+    // a longer RVerb keeps about its level: a lower wet control
+    const auto rv4 = parity190jh::waves ("RVerb Stereo", "RVerb", parity190jh::list (96, { { 2, "4" } }), n);
+    CHECK (reeverb2::fromParams (rv4.params).p[12] < s.p[12]);
+    // H-Reverb: reverb time 2.16 (x 1.45 = 3.1 s), pre-delay 24 ms; ducking on (249) with a -9 dB range (59): 2.25 dB less wet
+    const auto hr = parity190jh::waves ("H-Reverb Stereo", "H-Reverb", parity190jh::list (269, { { 5, "2.16" }, { 16, "24" }, { 59, "-18" } }), n);
+    const auto hd = parity190jh::waves ("H-Reverb Stereo", "H-Reverb", parity190jh::list (269, { { 5, "2.16" }, { 16, "24" }, { 59, "-9" }, { 249, "1" } }), n);
+    const auto h0 = reeverb2::fromParams (hr.params), h1 = reeverb2::fromParams (hd.params);
+    CHECK (h0.p[5] == 31 && h0.p[2] == 9 && h0.p[1] == 44 && h0.p[10] == 0);
+    CHECK (std::abs (20.0 * std::log10 ((double) h1.p[12] / h0.p[12]) + 2.25) < 0.2);
+    // TrueVerb: decay 1.6 s, distance 4.5, pre-delay 63 ms, reverb -10 dB, early -12 dB, the direct path on / off
+    const auto tv = parity190jh::waves ("TrueVerb Stereo", "TrueVerb",
+                                        parity190jh::list (50, { { 0, "1.6" }, { 5, "4.5" }, { 24, "63" }, { 42, "-10" }, { 43, "-12" } }), n);
+    const auto t0 = reeverb2::fromParams (tv.params);
+    CHECK (t0.p[10] == (int) std::lround (160.0 * 0.8 * std::pow (10.0, (-0.7 - 0.135 * 4.5) / 20.0)) && t0.p[1] == 221);
+    CHECK (t0.p[11] == (int) std::lround (160.0 * 0.36 * std::pow (10.0, -12.0 / 20.0)));
+    const auto td = parity190jh::waves ("TrueVerb Stereo", "TrueVerb", parity190jh::list (50, { { 0, "1.6" }, { 29, "1" } }), n);
+    CHECK (reeverb2::fromParams (td.params).p[10] == 0);
+    // another Waves reverb name, or no readable state: the entry's preset at the slot's 25 % as before
+    const auto other = parity190jh::waves ("RVerb Stereo", "Renaissance Reverb", parity190jh::list (96, { { 2, "2.4" } }), n);
+    CHECK (other.kind == EffectKind::reeverb2 && std::abs (other.mix - 0.25f) < 1e-6f && n == 0);
+}

+ 1 - 0
tests/tests.cpp

@@ -17774,6 +17774,7 @@ TEST (fl_low_lifter_matches_fl_engine)
 #include "Parity190iqTests.inc"
 #include "Parity190itTests.inc"
 #include "Parity190jhTests.inc" // round 190jh: Facet's automatic threshold, Pro-Q 4 dynamic bands, Waves L2 / SuperTap / SSLComp / CLA-76
+#include "Parity190jsTests.inc" // round 190js: the Waves reverbs on Reeverb 2, Hush's Single Vocal revision, Facet's auto-threshold refit
 #include "Sampler190dhTests.inc"
 #include "Fix190eaTests.inc"
 #include "Iss158Tests.inc"