Explorar el Código

190mm scheps: Scheps Omni Channel on Ridge Strip's hidden omni law

Ridge Strip gets a hidden omni law block at fixed indices 100..191 (0 = off:
new instances and every project saved before, bit for bit): a five-module
channel strip (Pre, Gate, DS2, EQ, Comp) run in a stored order. Each module is
LYNX's own model fitted on our Waves-demo probes: RBJ / matched-bell EQ laws,
the Pre filters, thump and saturation, the compressor types with their
automatic make-up grid and time constants, DS2 dynamic bands.

The Scheps Omni Channel had no entry (projects lost the plug-in); its state's
module presets, bypass flags and slot order are now translated.
docs/analise/REA_rodada190mm_scheps.md, tests/Parity190mmSchepsTests.inc.
Ka1-S hace 2 semanas
padre
commit
e78497403d

+ 84 - 0
docs/analise/REA_rodada190mm_scheps.md

@@ -0,0 +1,84 @@
+# REA round 190mm, sub-round "scheps": Waves Scheps Omni Channel 2 → Ridge Strip's hidden omni law
+
+Owner's decision 3 (round 190mm): build a stand-in chain from the plug-in's five inner modules and their order. Before
+this round the plug-in had no entry (a project that used it lost it). Clean-room: the bundle's user guide (PDF), its
+ParamXML, the saved states of refcap182's bank and our own demo-mode probes (two takes 7.5 s apart, the demo mutes
+spliced out) — no vendor code, tables or presets copied. Every constant below was fitted on our own probe renders.
+Lab: /mnt/e/lynx-work/waves4_190mm/scheps (lab/*.py, sim/comp.c, fit/*.json / *.txt, cap/scr/*.txt probe scripts).
+
+## 1. Structure (the state)
+
+- The component state's outer RealWorld list (ParamXML order): 0 input dB, 2 / 3 phase L / R, 4 output dB, 35 limiter on,
+  36 limiter threshold, 57 `PARAM_SLOT_SERILIZATION_PLUGIN` = the module order as slot numbers 1 … 6, first to last
+  (default 153426), 58 the per-slot bypass digits (not kept up to date by the plug-in; the slots' own flags are used).
+- `<slot index="0…5">` each carries one inner module preset (its own SETUP_A RealWorld list) and `<plugin_bypass>`:
+  0 Pre (`SOC_Pre`), 1 Gate (`SCS Gate`), 2 DS2 (`SCS DeEsser`), 3 EQ, 4 Comp (`SCS`), 5 the insert slot (a hosted
+  plug-in: no LYNX module). Default order 153426 = Pre → Comp → DS2 → EQ → Gate (the guide: Pre sits first by default;
+  "make sure your Compressor is post EQ" — i.e. it is not by default).
+- Inner lists (left / mid values; the right / side copies follow): Pre 9 saturation %, 10 saturation on, 11 type
+  (Odd / Even / Heavy / Crush), 12 thump on, 13 thump +2 / +4, 14 HP on, 15 slope (6 / 12 / 18 / 24), 16 HP Hz, 17 HP Q,
+  18 … 21 the LP; EQ band k (LF, Tone, Mid, HF): 6k+1 on, +2 type, +3 gain, +4 Hz, +5 Q; Comp 29 type (VCA / FET / Opt /
+  Soft), 34 out dB, 38 ratio, 40 threshold, 42 release ms, 44 attack ms, 78 mix %, 47 / 49 SC HP on / Hz, 51 / 53 / 55
+  SC bell on / dB / Hz, 59 / 61 / 63 SC shelf on / dB / Hz; DS2 band 1 at 20 … 24 (on, threshold, range, Hz, type),
+  band 2 at 28 … 32, 17 output, 12 / 15 attack reference / release ms; Gate 18 threshold, 23 floor, 24 / 25 attack /
+  release, 26 Gate / Exp, 28 close, 13 … 16 SC HP / LP (the gate's indices are read from the default state only: the
+  bank never switches the gate on — unverified, see §6).
+- A bypassed strip (refcap182 D, every module off) is bit-transparent (-220 dB), latency 0.
+
+## 2. EQ (probe batches eq1 / eq2: impulse responses, lab/fiteq*.py, lab/fitgen.py)
+
+- Every band is one biquad (a free biquad fit nulls every probe to -160 dB).
+- Shelf types: RBJ shelves. LF Shelf: f0 = f × r(|g|) pre-warped (ln r 2.753 / 2.055 / 1.309 / 0.845 at 3 / 6 / 12 / 18 dB,
+  ~1 / g below), Q 0.490 … 0.458 boost, 0.503 … 0.535 cut (-103 … -130 dB). HF Shelf: f0 from the unwarped
+  K = π f r / sr with log2 r = 0.04155 (|g| - 12), Q 0.498 … 0.440 (-66 … -82 dB).
+- Bells (Tone / Mid Wide and Narrow, Parametric, LF / HF Parametric): an analog bell with pole Q = q·A and zero Q = q / A
+  (A = gain^½), bilinear pre-warped poles, numerator matched to the analog magnitude at DC, f0 and Nyquist (-60 … -108
+  dB at 200 Hz / 1 kHz; -32 … -43 dB at 5 / 8 kHz). Parametric q = Q / √2; Wide / Narrow q against |gain| per band
+  (Tone Wide 0.235 → 0.471, Tone Narrow 0.471 → 0.937, Mid Wide 0.045 → 0.326, Mid Narrow 0.188 → 1.168 from 1 to 18 dB).
+- ResShelf (both shelves): not reproduced exactly (LF is not one biquad); an RBJ shelf approximation (§6).
+
+## 3. Pre (probe batch pre1)
+
+- Filters: RBJ high- / low-pass. 6 dB: first order; 12 dB: second order, Q 0.7071·Q (Q ≥ 1), 0.7071·Q^0.301 below;
+  18 dB: second order (Q 1 at the default) × first order; 24 dB "resonant": two second-order sections at f·10^∓0.2 with
+  Q 4.016·√Q and 2.259·√Q (all -110 dB).
+- Thump: a very wide low bell (+2: 65 Hz Q 0.107 2 dB; +4: 122 Hz Q 0.098 4 dB) and a faint high shelf (5.8 kHz, +0.27 dB),
+  -37 … -45 dB.
+- Saturation: Odd / Even = a level-independent gain (Even 0.5 + 0.05 × amount dB; Odd +1.39 dB at 30, +8.69 at 100) times a
+  first-order all-pass at ~8 Hz (in phase at the top, inverted at DC: -70 dB fit of the sweep), harmonics -66 dB at 30 %;
+  Heavy = a static odd soft clipper (residual -148 dB; ceiling 0.215 at 100 %, knee n ≈ 5, gain +1.76 / +9.47 dB at 30 /
+  100); Crush = clipping with its own phase shift (approximated by a harder clipper, §6).
+
+## 4. Compressor (probe batches comp1 stairs / bursts, mk1 / mk2 the make-up grid, prog1 programme)
+
+- Feed-forward log-domain gain computer per type (feedback fits worse on our probes): threshold offset, knee, ratio
+  scale (VCA 2.9 dB / 14.7 dB / 1.0, FET 3.76 / 18.1 / 1.52, Opt 2.29 / 16.0 / 0.65, Soft -0.54 / 34.1 / 0.67); ratio
+  capped at 20 : 1 ("Inf" = 20, read from the make-up grid).
+- Automatic make-up: always on; a smooth function of threshold × ratio (separable within ±0.1 dB) times a factor of
+  attack × release (longer attack less, longer release more make-up). LYNX keeps our measured grid (fit/makeup.json:
+  7 thresholds × 8 ratios at 0.4 / 50 ms and 5 × 5 attack / release at -30 dB 4 : 1 per type) and interpolates
+  (checked on five other settings within 0.05 dB).
+- Time constants: VCA attack 0.22 ms + 0.047 × setting, release 0.58·(rel / 50 ms)^0.4·50 ms plus a slow stage (3.5 × rel,
+  weight 0.24 + 0.51·log10 (rel / 200 ms)); FET attack 0.45 × setting, release 1.1·(rel / 50)^1.17·50 ms; Soft 0.15 ms +
+  0.042 × setting, 0.49·(rel / 50)^0.43·50 ms + slow stage; Opt (programme probes): attack 0.0367 × max (setting, 50 ms
+  from a 200 ms release on), release 0.385 × setting.
+- Mix: linear dry / wet after the make-up; out gain after the mix (X4: -30 … -40 dB ESR on the bank).
+
+## 5. DS2 and Gate
+
+- DS2 (prog1, sweep / stair probes): per band a side-chain shape (high-pass / low-pass for the shelves, bells for Bell /
+  Notch) detects; above the threshold the band is cut on a shelf / bell of the same type (shelf corner 0.55 × f for the
+  high shelf, 1.8 × f for the low shelf, Q 0.6), up to the range, 3 : 4 slope; matches our music probe to -30 dB.
+- Gate / expander: a standard model (threshold, Close as the lower closing threshold, floor, attack, release, 2 : 1
+  expander mode, SC HP / LP). Not probed (the bank never uses it).
+
+## 6. Not reproduced / approximations (documented, reversible)
+
+- Stereo modes Duo / M-S and unlinked left / right values (the translator reads the left / mid values, Stereo mode).
+- ResShelf shapes, Crush's phase, the even / odd harmonic curves above 30 % (approximated), the output limiter (a plain
+  instant-attack peak limiter), the insert slot (a hosted plug-in), external side chain, listen / monitor modes.
+- The Opt type's attack depends on the programme (bursts say ~50 ms, programme probes ~2 ms): LYNX follows the programme.
+
+## 7. Results (refcap182 bank, 25 files; before: no stand-in, n = 0)
+
+See /mnt/e/lynx-work/waves4_190mm/scheps/HANDOFF.md for the table, CPU and gold renders.

+ 46 - 0
src/core/MixSuite.cpp

@@ -395,6 +395,39 @@ double mLfGainDb (float v) noexcept { return lin (v, -16.5, 16.5); }
 double mGainDb (float v) noexcept { return lin (v, -20.0, 20.0); }
 double mQ (float v) noexcept { return lin (v, 0.5, 2.5); }
 double mHoldSeconds (float v) noexcept { return lin (v, 0.0, 4.0); }
+// round 190mm (scheps): the hidden omni law's value scales (MixSuite.h OmniParam)
+namespace omni
+{
+float dbValue (double db) noexcept { return (float) std::clamp ((db + 72.0) / 96.0, 0.0, 1.0); }
+double db (float v) noexcept { return lin (v, -72.0, 24.0); }
+float hzValue (double hz) noexcept { return (float) std::clamp (std::log (std::max (hz, 20.0) / 20.0) / std::log (1000.0), 0.0, 1.0); }
+double hz (float v) noexcept { return logMap (v, 20.0, 20000.0); }
+float qValue (double q) noexcept { return (float) std::clamp (std::log (std::max (q, 0.1) / 0.1) / std::log (100.0), 0.0, 1.0); }
+double q (float v) noexcept { return logMap (v, 0.1, 10.0); }
+float msValue (double ms) noexcept { return (float) std::clamp (std::log10 (std::max (ms, 0.01) / 0.01) / 6.0, 0.0, 1.0); }
+double ms (float v) noexcept { return logMap (v, 0.01, 10000.0); }
+float ratioValue (double r) noexcept { return (float) std::clamp ((1.0 - 1.0 / std::clamp (r, 1.0, 20.0)) / 0.95, 0.0, 1.0); }
+double ratio (float v) noexcept { return 1.0 / std::max (0.05, 1.0 - 0.95 * (double) std::clamp (v, 0.0f, 1.0f)); }
+float indexValue (int k) noexcept { return (float) std::clamp (k, 0, 8) / 8.0f; }
+int index (float v) noexcept { return (int) std::lround (std::clamp (v, 0.0f, 1.0f) * 8.0f); }
+float orderValue (const int (&order)[5]) noexcept
+{
+    long code = 0;
+    for (int m : order) code = code * 10 + std::clamp (m, 0, 9);
+    return (float) ((double) code / 100000.0);
+}
+void orderOf (float v, int (&order)[5]) noexcept
+{
+    static constexpr int byDefault[5] = { pre, comp, ds2, eq, gate };   // the reference's default chain (REA §1)
+    auto code = (long) std::lround ((double) v * 100000.0);
+    int seen = 0;
+    for (int i = 4; i >= 0; --i) { order[i] = (int) (code % 10); code /= 10; }
+    for (int m : order) if (m >= pre && m <= comp) seen |= 1 << m;
+    if (seen != 0x3e)
+        for (int i = 0; i < 5; ++i) order[i] = byDefault[i];
+}
+bool omniLawOn (const EffectParams& p) noexcept { return p[(std::size_t) omniLaw] > 0.5f; }
+} // namespace omni
 namespace
 {
 // the reference's ratio dial (its read-outs at eighths of the travel); 63 .. infinity on the last eighth
@@ -1042,6 +1075,8 @@ std::unique_ptr<Effect> makeKiln() { return std::make_unique<KilnChannel>(); }
 
 namespace
 {
+#include "core/OmniStrip.inc" // round 190mm (scheps): the hidden omni law
+
 class Strip final : public Effect
 {
 public:
@@ -1061,6 +1096,7 @@ public:
         modernEngine.prepare (rate);
         vocalEngine.prepare (rate);
         drive.prepare (rate);
+        omniEngine.prepare (rate);
         reset();
         if (hasParams0)
         {
@@ -1084,6 +1120,7 @@ public:
         modernEngine.reset();
         vocalEngine.reset();
         drive.reset();
+        omniEngine.reset();
         for (auto* d : { &audio, &side })
         {
             d->hp1.reset(); d->hp2.reset(); d->lp.reset(); d->lf.reset(); d->lmf.reset(); d->hmf.reset(); d->hf.reset();
@@ -1098,6 +1135,14 @@ public:
 
     void process (float* l, float* r, int n, const EffectParams& p, double) noexcept override
     {
+        if (omni::omniLawOn (p)) // round 190mm (scheps): the hidden omni law (off = everything below, unchanged)
+        {
+            const auto inPeak = Meters::peak (l, r, n);
+            vocalLatency = 0;
+            omniEngine.process (l, r, n, p);
+            meters.set (omniEngine.compGrDb(), omniEngine.gateGrDb(), inPeak, Meters::peak (l, r, n));
+            return;
+        }
         if (vocalVoicing (p))
         {
             const auto inPeak = Meters::peak (l, r, n);
@@ -1292,6 +1337,7 @@ private:
     int vocalLatency = 0;
     DriveStage drive; // round tp172c6
     int driveLatency = 0;
+    omnistrip::Engine omniEngine; // round 190mm (scheps): the hidden omni law
     bool driveWasIn = false;
     EffectParams params0 {};
     bool hasParams0 = false;

+ 36 - 0
src/core/MixSuite.h

@@ -160,6 +160,42 @@ enum Param
 };
 double compGrCapDb (float v) noexcept;   // 0 = no cap (a huge value), else 0 .. 60 dB
 double compAttackFineSeconds (float v) noexcept; // 0 .. 0.25 s
+
+// round 190mm (scheps), hidden like compGrCap (not in the info: no control, no text; saved while non-zero) at FIXED
+// indices 100 … 191: the "omni" law — a five-module channel strip (Pre, Gate, DS2, EQ, Comp in a stored order) that
+// stands in for a multi-module channel strip whose modules the user can reorder (REA_rodada190mm_scheps). omniLaw 0 =
+// off: new instances and every project saved before (Ridge's engines above, bit for bit); only the Waves translator
+// sets it. Values are stored 0 … 1 through the omni:: scales below.
+enum OmniParam
+{
+    omniLaw = 100, omniOrder, omniIn, omniOut, omniInvL, omniInvR, omniLimOn, omniLimThr,
+    // Pre: saturation, thump, high- / low-pass
+    oPreOn = 110, oHpOn, oHpHz, oHpSlope, oHpQ, oLpOn, oLpHz, oLpSlope, oLpQ, oThump, oSatOn, oSatType, oSatAmount,
+    // Gate / expander
+    oGateOn = 125, oGateThr, oGateFloor, oGateClose, oGateAtt, oGateRel, oGateExp, oGateHpOn, oGateHpHz, oGateLpOn, oGateLpHz,
+    // DS2 (two dynamic bands)
+    oDsOn = 140, oDs1On, oDs1Thr, oDs1Type, oDs1Hz, oDs1Range, oDs2On, oDs2Thr, oDs2Type, oDs2Hz, oDs2Range, oDsOut, oDsAtt, oDsRel,
+    // EQ: four bands (LF, Tone, Mid, HF) × on, type, frequency, gain, Q
+    oEqOn = 155, oEqBand0,
+    // Compressor
+    oCompOn = 176, oCompType, oCompRatio, oCompAtt, oCompRel, oCompThr, oCompMix, oCompOut,
+    oScHpOn, oScHpHz, oScBellOn, oScBellHz, oScBellDb, oScShelfOn, oScShelfHz, oScShelfDb,
+    omniEnd
+};
+namespace omni
+{
+enum Module { pre = 1, gate, ds2, eq, comp };
+float dbValue (double db) noexcept;      double db (float v) noexcept;      // −72 … +24 dB
+float hzValue (double hz) noexcept;      double hz (float v) noexcept;      // 20 Hz … 20 kHz (log)
+float qValue (double q) noexcept;        double q (float v) noexcept;       // 0.1 … 10 (log)
+float msValue (double ms) noexcept;      double ms (float v) noexcept;      // 0.01 ms … 10 s (log)
+float ratioValue (double r) noexcept;    double ratio (float v) noexcept;   // 1 … 20 : 1 (∞ = 20)
+float indexValue (int k) noexcept;       int index (float v) noexcept;      // a selector position k / 8
+// the module order: five digits (module ids above, first to last) / 100000; a bad value = the default order
+float orderValue (const int (&order)[5]) noexcept;
+void orderOf (float v, int (&order)[5]) noexcept;
+bool omniLawOn (const EffectParams& p) noexcept;
+} // namespace omni
 // round tp172c6: the drive models (DRIVE section), in the Model selector's order
 enum DriveModel { driveSaturate, driveConsoleE, driveConsoleG, driveConsoleA, driveConsoleN, driveConsoleY, driveTube,
                   driveGuitarAmp, driveBassAmp, driveModels };

+ 508 - 0
src/core/OmniStrip.inc

@@ -0,0 +1,508 @@
+// OmniStrip.inc (included by MixSuite.cpp inside namespace lynx::mixsuite::ridge, anonymous namespace) — round 190mm
+// (scheps): Ridge Strip's hidden "omni" law. A five-module channel strip — Pre (saturation, thump, high- / low-pass),
+// Gate / expander, DS2 (two dynamic bands), EQ (four bands) and a compressor with four detector types, auto make-up,
+// mix and output — run in a stored order between an input and an output stage. LYNX's own model of the structure the
+// reference's manual and our demo-mode probes show (docs/analise/REA_rodada190mm_scheps.md): every constant below was
+// fitted on our own probe renders (the lab scripts and fit/*.json of round 190mm "scheps"); no vendor code or table.
+
+namespace omnistrip
+{
+constexpr double pi = 3.14159265358979323846;
+
+// ---- filter designs (b0 b1 b2 / a0 a1 a2 into lynx::Biquad) ----
+void flat (Biquad& f) noexcept { f.set (1, 0, 0, 1, 0, 0); }
+// RBJ forms (bilinear, pre-warped at f0)
+void rbjHp2 (Biquad& f, double sr, double hz, double q) noexcept
+{
+    const auto w = 2 * pi * std::min (hz, 0.49 * sr) / sr, c = std::cos (w), al = std::sin (w) / (2 * q);
+    f.set ((1 + c) / 2, -(1 + c), (1 + c) / 2, 1 + al, -2 * c, 1 - al);
+}
+void rbjLp2 (Biquad& f, double sr, double hz, double q) noexcept
+{
+    const auto w = 2 * pi * std::min (hz, 0.49 * sr) / sr, c = std::cos (w), al = std::sin (w) / (2 * q);
+    f.set ((1 - c) / 2, 1 - c, (1 - c) / 2, 1 + al, -2 * c, 1 - al);
+}
+void hp1 (Biquad& f, double sr, double hz) noexcept
+{
+    const auto k = std::tan (pi * std::min (hz, 0.49 * sr) / sr);
+    f.set (1, -1, 0, 1 + k, k - 1, 0);
+}
+void lp1 (Biquad& f, double sr, double hz) noexcept
+{
+    const auto k = std::tan (pi * std::min (hz, 0.49 * sr) / sr);
+    f.set (k, k, 0, 1 + k, k - 1, 0);
+}
+void rbjPeak (Biquad& f, double sr, double hz, double q, double db) noexcept
+{
+    const auto a = std::pow (10.0, db / 40), w = 2 * pi * std::min (hz, 0.49 * sr) / sr, c = std::cos (w), al = std::sin (w) / (2 * q);
+    f.set (1 + al * a, -2 * c, 1 - al * a, 1 + al / a, -2 * c, 1 - al / a);
+}
+void rbjShelf (Biquad& f, double sr, double hz, double q, double db, bool high) noexcept
+{
+    const auto a = std::pow (10.0, db / 40), w = 2 * pi * std::min (hz, 0.49 * sr) / sr, c = std::cos (w);
+    const auto s = 2 * std::sqrt (a) * std::sin (w) / (2 * q);
+    if (high)
+        f.set (a * ((a + 1) + (a - 1) * c + s), -2 * a * ((a - 1) + (a + 1) * c), a * ((a + 1) + (a - 1) * c - s),
+               (a + 1) - (a - 1) * c + s, 2 * ((a - 1) - (a + 1) * c), (a + 1) - (a - 1) * c - s);
+    else
+        f.set (a * ((a + 1) - (a - 1) * c + s), 2 * a * ((a - 1) - (a + 1) * c), a * ((a + 1) - (a - 1) * c - s),
+               (a + 1) + (a - 1) * c + s, -2 * ((a - 1) + (a + 1) * c), (a + 1) + (a - 1) * c - s);
+}
+// the measured bells: an analog bell (pole Q = q·A, zero Q = q / A, A = gain^½) with bilinear (pre-warped) poles and
+// a numerator matched to the analog magnitude at DC, f0 and Nyquist — the form that nulls our probes to -60 … -100 dB
+void matchedBell (Biquad& f, double sr, double hz, double q, double db) noexcept
+{
+    hz = std::min (hz, 0.45 * sr);
+    const auto g = std::pow (10.0, db / 20), A = std::sqrt (g), qp = q * A, qz = q / A, w0 = 2 * pi * hz / sr;
+    const auto K = std::tan (w0 / 2), d = 1 + K / qp + K * K;
+    const auto a1 = 2 * (K * K - 1) / d, a2 = (1 - K / qp + K * K) / d;
+    auto ana2 = [&] (double w) { // |H(jw)|² of the analog bell, w in rad/sample mapped to analog by w / w0 ratio
+        const auto x = w / w0, re = 1 - x * x;
+        return (re * re + x * x / (qz * qz)) / (re * re + x * x / (qp * qp));
+    };
+    const auto A0 = (1 + a1 + a2) * (1 + a1 + a2), A1 = (1 - a1 + a2) * (1 - a1 + a2), A2 = -4 * a2;
+    const auto s2 = std::sin (w0 / 2) * std::sin (w0 / 2), p0 = 1 - s2, p1 = s2, p2 = 4 * p0 * p1;
+    const auto B0 = A0, B1 = A1 * ana2 (pi);
+    const auto B2 = (g * g * (A0 * p0 + A1 * p1 + A2 * p2) - B0 * p0 - B1 * p1) / p2;
+    const auto W = 0.5 * (std::sqrt (B0) + std::sqrt (std::max (B1, 0.0)));
+    const auto b0 = 0.5 * (W + std::sqrt (std::max (W * W + B2, 0.0))), b1 = 0.5 * (std::sqrt (B0) - std::sqrt (std::max (B1, 0.0)));
+    const auto b2 = -B2 / (4 * b0);
+    f.set (b0, b1, b2, 1, a1, a2);
+}
+// piecewise-linear interpolation over a table (x ascending)
+template <std::size_t N> double interp (const double (&x)[N], const double (&y)[N], double v) noexcept
+{
+    if (v <= x[0]) return y[0];
+    for (std::size_t i = 1; i < N; ++i)
+        if (v <= x[i]) return y[i - 1] + (y[i] - y[i - 1]) * (v - x[i - 1]) / (x[i] - x[i - 1]);
+    return y[N - 1];
+}
+
+// ---- EQ laws (probe batches eq1 / eq2, lab/fiteq2.py) ----
+// bells: the analog Q (A-symmetric) per type against |gain| (Wide / Narrow differ between Tone and Mid); Parametric = Q / √2
+constexpr double bellG[] = { 1, 3, 6, 12, 18 };
+constexpr double toneWideQ[] = { 0.2351, 0.2556, 0.2880, 0.3676, 0.4705 };
+constexpr double toneNarrowQ[] = { 0.4711, 0.5110, 0.5764, 0.7330, 0.9367 };
+constexpr double midWideQ[] = { 0.0451, 0.0619, 0.0879, 0.1693, 0.3261 };
+constexpr double midNarrowQ[] = { 0.1879, 0.2340, 0.3222, 0.6120, 1.1675 };
+// shelves: RBJ shelves at f × ratio(|gain|) with Q(gain); the low shelf pre-warped, the high shelf unwarped (K = π f r / sr)
+constexpr double shelfG[] = { 3, 6, 12, 18 };
+constexpr double lfRatioLog[] = { 2.75321, 2.05458, 1.30887, 0.84476 }; // ln ratio
+constexpr double lfQBoost[] = { 0.4899, 0.4835, 0.4710, 0.4578 };
+constexpr double lfQCut[] = { 0.5027, 0.5100, 0.5220, 0.5349 };
+constexpr double hfQ[] = { 0.4982, 0.4927, 0.4720, 0.4397 };
+
+void eqBand (Biquad& f, double sr, int band, int type, double hz, double db, double qSet) noexcept
+{
+    if (std::abs (db) < 1e-6) { flat (f); return; }
+    const auto g = std::abs (db);
+    const bool shelfBand = band == 0 || band == 3;
+    if (shelfBand && type == 2) { matchedBell (f, sr, hz, qSet / std::sqrt (2.0), db); return; }   // Parametric
+    if (! shelfBand)
+    {
+        double q = qSet / std::sqrt (2.0);
+        if (type == 0) q = interp (bellG, band == 1 ? toneWideQ : midWideQ, g);
+        else if (type == 1) q = interp (bellG, band == 1 ? toneNarrowQ : midNarrowQ, g);
+        matchedBell (f, sr, hz, q, db);
+        return;
+    }
+    if (band == 0)
+    {
+        // ln ratio: the table, and ~1 / gain below 3 dB (the measured trend)
+        const auto lr = g < 3 ? lfRatioLog[0] + std::log (3.0 / g) : interp (shelfG, lfRatioLog, g);
+        auto q = interp (shelfG, db > 0 ? lfQBoost : lfQCut, g);
+        auto f0 = hz * std::exp (lr);
+        if (type == 0) { f0 = hz * 2.2; q = 0.8; }   // ResShelf: a shelf with a resonant bump (approximation, REA doc §3)
+        rbjShelf (f, sr, std::min (f0, 0.45 * sr), q, db, false);
+        return;
+    }
+    const auto r = std::exp2 (0.04155 * (g - 12.0));
+    auto fa = hz * r;
+    auto q = interp (shelfG, hfQ, g);
+    if (type == 0) { fa = hz * 0.6; q = 0.9; }      // ResShelf (approximation)
+    const auto f0 = std::atan (pi * fa / sr) * sr / pi;
+    rbjShelf (f, sr, std::min (f0, 0.45 * sr), q, db, true);
+}
+
+// ---- compressor (probe batches comp1 / mk1 / mk2, lab/fitcomp.py, lab/fittau.py, lab/gentab.py) ----
+#include "core/OmniStripTables.inc"
+struct CompType
+{
+    double dT, knee, rScale;   // threshold offset dB, knee width dB, ratio scale (1 + (r - 1) s)
+    double a0, aK;             // attack time constant = a0 + aK · attack (s)
+    double rK, rExp;           // fast release = rK · (release / 50 ms)^rExp · 50 ms
+    double slowK, slowW0, slowW1; // slow release stage = slowK · release, weight slowW0 + slowW1 · log10 (release / 200 ms)
+};
+constexpr CompType compTypes[4] = {
+    { 2.90, 14.7, 1.000, 0.00022, 0.047, 0.58, 0.40, 3.5, 0.24, 0.51 },   // VCA
+    { 3.76, 18.1, 1.519, 0.00010, 0.450, 1.10, 1.17, 3.0, 0.00, 0.00 },   // FET
+    { 2.29, 16.0, 0.652, 0.00000, 0.0367, 0.385, 1.00, 3.0, 0.00, 0.00 }, // Opt (attack: see setup; programme probes prog1)
+    { -0.54, 34.1, 0.673, 0.00015, 0.042, 0.49, 0.43, 2.0, 0.32, 0.34 },  // Soft
+};
+double makeupDb (int type, double thr, double ratio, double attMs, double relMs) noexcept
+{
+    type = std::clamp (type, 0, 3);
+    constexpr double th[] = { -50, -40, -30, -20, -10, -5, 0 };
+    constexpr double rs[] = { 1.6, 2.3, 3.3, 5.0, 7.5, 16.0, 50.0, 1e9 };
+    auto rIndex = [&] (double r) { // position in the ratio table on the (1 - 1 / r) scale
+        const auto u = 1 - 1 / std::max (r, 1.0);
+        if (u <= 1 - 1 / rs[0]) return u / (1 - 1 / rs[0]) - 1.0;   // below 1.6 : 1 → towards 0 at 1 : 1
+        for (int i = 1; i < 8; ++i) { const auto hi = 1 - 1 / rs[i], lo = 1 - 1 / rs[i - 1]; if (u <= hi) return (i - 1) + (u - lo) / (hi - lo); }
+        return 7.0;
+    };
+    auto tIndex = [&] (double t) {
+        if (t <= th[0]) return 0.0;
+        for (int i = 1; i < 7; ++i) if (t <= th[i]) return (i - 1) + (t - th[i - 1]) / (th[i] - th[i - 1]);
+        return 6.0;
+    };
+    const auto ri = rIndex (ratio), ti = tIndex (thr);
+    auto at = [&] (int t, double r) {
+        if (r < 0) return makeupThrRatio[type][t][0] * (r + 1.0);
+        const auto i = std::min ((int) r, 6); const auto fr = r - i;
+        return makeupThrRatio[type][t][i] * (1 - fr) + makeupThrRatio[type][t][i + 1] * fr;
+    };
+    const auto t0 = std::min ((int) ti, 5); const auto ft = ti - t0;
+    const auto base = at (t0, ri) * (1 - ft) + at (t0 + 1, ri) * ft;
+    // the time factor: bilinear on log attack / log release
+    constexpr double atk[] = { 0.4, 1.76, 7.75, 34.09, 150.0 }, rel[] = { 50, 158.1, 500, 1581.1, 5000 };
+    auto logIndex = [] (const double (&x)[5], double v) {
+        v = std::clamp (v, x[0], x[4]);
+        for (int i = 1; i < 5; ++i) if (v <= x[i]) return (i - 1) + std::log (v / x[i - 1]) / std::log (x[i] / x[i - 1]);
+        return 4.0;
+    };
+    const auto ai = logIndex (atk, attMs), li = logIndex (rel, relMs);
+    const auto a0 = std::min ((int) ai, 3), l0 = std::min ((int) li, 3);
+    const auto fa = ai - a0, fl = li - l0;
+    const auto& T = makeupTime[type];
+    const auto tf = (T[a0][l0] * (1 - fl) + T[a0][l0 + 1] * fl) * (1 - fa) + (T[a0 + 1][l0] * (1 - fl) + T[a0 + 1][l0 + 1] * fl) * fa;
+    return base * tf / T[0][0];
+}
+
+// ---- saturation (probe batch pre1, lab/anasat.py / lab/curve.py) ----
+// Odd / Even: a level-independent gain, a first-order all-pass (~8 Hz, the phase our probes show) and a soft clipper
+// whose ceiling falls with the amount; Heavy: a static soft clipper (knee n = 5); Crush: Heavy's curve driven harder
+double satGainDb (int type, double amount) noexcept
+{
+    amount = std::clamp (amount, 0.0, 100.0);
+    switch (type)
+    {
+        case 0: return 0.5 + 0.00201 * std::pow (amount, 1.807);   // Odd: +1.39 dB at 30, +8.69 at 100
+        case 1: return 0.5 + 0.05 * amount;                         // Even: +2.0 at 30, +5.5 at 100
+        case 2: return 0.0153 * std::pow (amount, 1.398);           // Heavy: +1.76 at 30, +9.47 at 100
+        default: return 3.2 + 0.104 * amount;                       // Crush: +6.3 at 30, +13.6 at 100
+    }
+}
+double satCeiling (int type, double amount) noexcept
+{
+    amount = std::clamp (amount, 0.0, 100.0);
+    switch (type)
+    {
+        case 0: return std::exp (std::log (2.5) + amount / 100.0 * std::log (0.43 / 2.5));   // Odd: ≈ 0.43 at 100
+        case 1: return std::exp (std::log (2.5) + amount / 100.0 * std::log (0.55 / 2.5));   // Even
+        case 2: return std::exp (std::log (1.53) + amount / 100.0 * std::log (0.2154 / 1.53)); // Heavy: 0.85 at 30, 0.2154 at 100
+        default: return std::exp (std::log (0.6) + amount / 100.0 * std::log (0.06 / 0.6));  // Crush
+    }
+}
+inline double softClip (double v, double c, double n) noexcept
+{
+    const auto u = std::abs (v) / c;
+    return v / std::pow (1 + std::pow (u, n), 1 / n);
+}
+
+struct Engine
+{
+    void prepare (double rate) noexcept { sr = rate; reset(); }
+    void reset() noexcept
+    {
+        for (auto* f : { &hpA, &hpB, &lpA, &lpB, &thumpA, &thumpB, &eq[0], &eq[1], &eq[2], &eq[3], &scHp, &scBell, &scShelf,
+                         &gHp, &gLp, &ds[0].sc, &ds[1].sc, &ds[0].cut, &ds[1].cut })
+            f->reset();
+        apL = apR = apXL = apXR = 0;
+        cg = cg2 = 0; gateG = 1; gateOpen = false; gateEnv = 0; limG = 1;
+        ds[0].env = ds[1].env = 0; ds[0].gr = ds[1].gr = -1;
+        lastKey = -1;
+    }
+    float compGrDb() const noexcept { return (float) cgShown; }
+    float gateGrDb() const noexcept { return (float) (-20 * std::log10 (std::max (gateG, 1e-6))); }
+
+    void process (float* l, float* r, int n, const EffectParams& p) noexcept
+    {
+        namespace o = omni;
+        setup (p);
+        const auto gin = std::pow (10.0, o::db (p[omniIn]) / 20) , gout = std::pow (10.0, o::db (p[omniOut]) / 20);
+        const auto il = on (p[omniInvL]) ? -gin : gin, ir = on (p[omniInvR]) ? -gin : gin;
+        for (int i = 0; i < n; ++i) { l[i] = (float) (l[i] * il); r[i] = (float) (r[i] * ir); }
+        int order[5];
+        o::orderOf (p[omniOrder], order);
+        for (int m : order)
+            switch (m)
+            {
+                case o::pre: if (on (p[oPreOn])) processPre (l, r, n, p); break;
+                case o::gate: if (on (p[oGateOn])) processGate (l, r, n, p); break;
+                case o::ds2: if (on (p[oDsOn])) processDs (l, r, n, p); break;
+                case o::eq: if (on (p[oEqOn])) for (auto& f : eq) f.processBlock (l, r, n); break;
+                case o::comp: if (on (p[oCompOn])) processComp (l, r, n, p); break;
+                default: break;
+            }
+        if (gout != 1.0)
+            for (int i = 0; i < n; ++i) { l[i] = (float) (l[i] * gout); r[i] = (float) (r[i] * gout); }
+        if (on (p[omniLimOn])) // the output brickwall limiter (instant attack, 50 ms release; not measured)
+        {
+            const auto ceil = std::pow (10.0, o::db (p[omniLimThr]) / 20), rel = std::exp (-1 / (0.05 * sr));
+            for (int i = 0; i < n; ++i)
+            {
+                const auto pk = std::max (std::abs ((double) l[i]), std::abs ((double) r[i]));
+                const auto want = pk * limG > ceil ? ceil / pk : 1.0;
+                limG = want < limG ? want : rel * limG + (1 - rel) * want;
+                l[i] = (float) (l[i] * limG); r[i] = (float) (r[i] * limG);
+            }
+        }
+    }
+
+private:
+    static bool on (float v) noexcept { return v > 0.5f; }
+
+    // coefficients from the parameters (only when they change: a key over every value)
+    void setup (const EffectParams& p) noexcept
+    {
+        namespace o = omni;
+        double key = 0;
+        for (int i = omniLaw; i < omniEnd; ++i) key = key * 1.000003 + p[(std::size_t) i] * (i + 1);
+        if (key == lastKey) return;
+        lastKey = key;
+        // Pre filters
+        const auto hpHz = o::hz (p[oHpHz]), lpHz = o::hz (p[oLpHz]);
+        const auto qs = o::q (p[oHpQ]), ql = o::q (p[oLpQ]);
+        auto q12 = [] (double q) { return q >= 1 ? 0.70711 * q : 0.70711 * std::pow (q, 0.301); };
+        hpSlope = std::clamp (o::index (p[oHpSlope]), 0, 3); lpSlope = std::clamp (o::index (p[oLpSlope]), 0, 3);
+        flat (hpA); flat (hpB); flat (lpA); flat (lpB);
+        if (on (p[oHpOn]))
+            switch (hpSlope)
+            {
+                case 0: hp1 (hpA, sr, hpHz); break;
+                case 1: rbjHp2 (hpA, sr, hpHz, q12 (qs)); break;
+                case 2: rbjHp2 (hpA, sr, hpHz, 1.41421 * q12 (qs)); hp1 (hpB, sr, hpHz); break;
+                default: rbjHp2 (hpA, sr, hpHz * 0.630957, 4.0163 * std::sqrt (qs)); rbjHp2 (hpB, sr, hpHz * 1.584893, 2.2592 * std::sqrt (qs)); break;
+            }
+        if (on (p[oLpOn]))
+            switch (lpSlope)
+            {
+                case 0: lp1 (lpA, sr, lpHz); break;
+                case 1: rbjLp2 (lpA, sr, lpHz, q12 (ql)); break;
+                case 2: rbjLp2 (lpA, sr, lpHz, 1.41421 * q12 (ql)); lp1 (lpB, sr, lpHz); break;
+                default: rbjLp2 (lpA, sr, lpHz * 1.584893, 4.0163 * std::sqrt (ql)); rbjLp2 (lpB, sr, lpHz * 0.630957, 2.2592 * std::sqrt (ql)); break;
+            }
+        // thump (+2 / +4 dB: a very wide low bell and a faint high shelf, probe batch pre1)
+        flat (thumpA); flat (thumpB);
+        if (p[oThump] > 0.25f)
+        {
+            const bool four = p[oThump] > 0.75f;
+            rbjPeak (thumpA, sr, four ? 122.0 : 65.0, four ? 0.098 : 0.107, four ? 3.99 : 2.0);
+            rbjShelf (thumpB, sr, 5800.0, 0.63, 0.27, true);
+        }
+        // saturation
+        satType = std::clamp (o::index (p[oSatType]), 0, 3);
+        const auto amount = 100.0 * std::clamp ((double) p[oSatAmount], 0.0, 1.0);
+        satGain = std::pow (10.0, satGainDb (satType, amount) / 20);
+        satC = satCeiling (satType, amount);
+        apC = (1 - std::tan (pi * 8.0 / sr)) / (1 + std::tan (pi * 8.0 / sr));
+        // EQ
+        for (int b = 0; b < 4; ++b)
+        {
+            const auto base = oEqBand0 + 5 * b;
+            if (! on (p[(std::size_t) base])) { flat (eq[b]); continue; }
+            eqBand (eq[b], sr, b, std::clamp (o::index (p[(std::size_t) base + 1]), 0, 2), o::hz (p[(std::size_t) base + 2]),
+                    o::db (p[(std::size_t) base + 3]), o::q (p[(std::size_t) base + 4]));
+        }
+        // compressor
+        cType = std::clamp (o::index (p[oCompType]), 0, 3);
+        const auto& T = compTypes[cType];
+        const auto ratio = o::ratio (p[oCompRatio]), attMs = o::ms (p[oCompAtt]), relMs = o::ms (p[oCompRel]);
+        cThr = o::db (p[oCompThr]) + T.dT;
+        cSlope = 1 - 1 / (1 + (std::min (ratio, 20.0) - 1) * T.rScale);
+        cKnee = T.knee;
+        auto tauA = T.a0 + T.aK * attMs * 1e-3;
+        if (cType == 2) // Opt: the cell's attack slows with the release setting (probe batches comp1 / prog1)
+            tauA = T.aK * std::max (attMs * 1e-3, 0.05 * std::clamp (std::log2 (relMs / 50.0) / 2.0, 0.0, 1.0));
+        cAtt = std::exp (-1 / (std::max (tauA, 1e-5) * sr));
+        const auto fastRel = T.rK * std::pow (relMs / 50.0, T.rExp) * 0.05;
+        cRel = std::exp (-1 / (fastRel * sr));
+        cW2 = std::clamp (T.slowW0 + T.slowW1 * std::log10 (relMs / 200.0), 0.0, 0.7);
+        cRel2 = std::exp (-1 / (T.slowK * relMs * 1e-3 * sr));
+        cMakeup = std::pow (10.0, makeupDb (cType, o::db (p[oCompThr]), ratio, attMs, relMs) / 20);
+        cMix = std::clamp ((double) p[oCompMix], 0.0, 1.0);
+        cOut = std::pow (10.0, o::db (p[oCompOut]) / 20);
+        flat (scHp); flat (scBell); flat (scShelf);
+        if (on (p[oScHpOn])) rbjHp2 (scHp, sr, o::hz (p[oScHpHz]), 0.70711);
+        if (on (p[oScBellOn])) rbjPeak (scBell, sr, o::hz (p[oScBellHz]), 0.709, o::db (p[oScBellDb]));
+        if (on (p[oScShelfOn])) rbjShelf (scShelf, sr, o::hz (p[oScShelfHz]), 0.709, o::db (p[oScShelfDb]), true);
+        scFilters = on (p[oScHpOn]) || on (p[oScBellOn]) || on (p[oScShelfOn]);
+        // gate
+        flat (gHp); flat (gLp);
+        if (on (p[oGateHpOn])) rbjHp2 (gHp, sr, o::hz (p[oGateHpHz]), 0.70711);
+        if (on (p[oGateLpOn])) rbjLp2 (gLp, sr, o::hz (p[oGateLpHz]), 0.70711);
+        // DS2 bands
+        for (int b = 0; b < 2; ++b)
+        {
+            auto& d = ds[b];
+            const auto base = b == 0 ? oDs1On : oDs2On;
+            d.on = on (p[(std::size_t) base]);
+            d.thr = o::db (p[(std::size_t) base + 1]);
+            d.type = std::clamp (o::index (p[(std::size_t) base + 2]), 0, 3);
+            d.hz = o::hz (p[(std::size_t) base + 3]);
+            d.range = std::max (3.0, -o::db (p[(std::size_t) base + 4]));
+            switch (d.type)
+            {
+                case 0: rbjLp2 (d.sc, sr, d.hz, 0.70711); break;
+                case 1: rbjPeak (d.sc, sr, d.hz, 1.0, 12.0); break;
+                case 2: rbjPeak (d.sc, sr, d.hz, 4.0, 18.0); break;
+                default: rbjHp2 (d.sc, sr, d.hz, 0.70711); break;
+            }
+            d.gr = -1; // re-design the cut
+        }
+        dsOut = std::pow (10.0, o::db (p[oDsOut]) / 20);
+        dsAtt = std::exp (-1 / (std::max (o::ms (p[oDsAtt]), 0.1) * 1e-3 * sr));
+        dsRel = std::exp (-1 / (std::max (o::ms (p[oDsRel]), 1.0) * 1e-3 * sr));
+    }
+
+    void processPre (float* l, float* r, int n, const EffectParams& p) noexcept
+    {
+        if (on (p[oSatOn]))
+        {
+            const auto knee = satType == 2 ? 5.0 : satType == 3 ? 3.0 : 4.0;
+            const auto bias = satType == 1 ? 0.35 * satC : 0.0;
+            const auto off = bias != 0 ? softClip (bias, satC, knee) : 0.0;
+            // the small-signal slope at the bias point, so that the measured level-independent gain holds
+            const auto eps = 1e-4 * satC;
+            const auto norm = bias != 0 ? 2 * eps / (softClip (bias + eps, satC, knee) - softClip (bias - eps, satC, knee)) : 1.0;
+            for (int i = 0; i < n; ++i)
+            {
+                double x[2] = { l[i] * satGain, r[i] * satGain };
+                for (int c = 0; c < 2; ++c)
+                {
+                    auto y = (softClip (x[c] + bias, satC, knee) - off) * norm;
+                    if (satType <= 1)
+                    {   // the first-order all-pass the probes show (in phase at the top, inverted at DC)
+                        auto& xs = c == 0 ? apXL : apXR; auto& ys = c == 0 ? apL : apR;
+                        const auto a = apC * y - xs + apC * ys;
+                        xs = y; ys = a; y = a;
+                    }
+                    x[c] = y;
+                }
+                l[i] = (float) x[0]; r[i] = (float) x[1];
+            }
+        }
+        if (p[oThump] > 0.25f) { thumpA.processBlock (l, r, n); thumpB.processBlock (l, r, n); }
+        if (on (p[oHpOn])) { hpA.processBlock (l, r, n); if (hpSlope >= 2) hpB.processBlock (l, r, n); }
+        if (on (p[oLpOn])) { lpA.processBlock (l, r, n); if (lpSlope >= 2) lpB.processBlock (l, r, n); }
+    }
+
+    void processComp (float* l, float* r, int n, const EffectParams&) noexcept
+    {
+        const auto& T = compTypes[cType];
+        (void) T;
+        double peak = 0;
+        for (int i = 0; i < n; ++i)
+        {
+            double s = 0.5 * ((double) l[i] + (double) r[i]);
+            if (scFilters) { s = scHp.process ((float) s, 0); s = scBell.process ((float) s, 0); s = scShelf.process ((float) s, 0); }
+            const auto L = 20 * std::log10 (std::abs (s) + 1e-15), d = L - cThr;
+            double t = 0;
+            if (2 * std::abs (d) <= cKnee) t = cSlope * (d + cKnee / 2) * (d + cKnee / 2) / (2 * cKnee);
+            else if (d > 0) t = cSlope * d;
+            const auto c = t > cg ? cAtt : cRel;
+            cg = c * cg + (1 - c) * t;
+            const auto c2 = cg > cg2 ? cAtt : cRel2;
+            cg2 = c2 * cg2 + (1 - c2) * cg;
+            const auto G = (1 - cW2) * cg + cW2 * cg2;
+            peak = std::max (peak, G);
+            const auto wet = std::pow (10.0, -G / 20) * cMakeup;
+            const auto g = (wet * cMix + (1 - cMix)) * cOut;
+            l[i] = (float) (l[i] * g); r[i] = (float) (r[i] * g);
+        }
+        cgShown = peak;
+    }
+
+    void processGate (float* l, float* r, int n, const EffectParams& p) noexcept
+    {
+        namespace o = omni;
+        const auto thrV = p[oGateThr];
+        const auto thr = thrV <= 0.0f ? -1e9 : o::db (thrV);
+        const auto closeDb = o::db (p[oGateClose]);
+        const auto close = closeDb < -0.01 ? thr + closeDb : thr;   // Close: a second, lower closing threshold
+        const auto floor = std::pow (10.0, std::min (0.0, o::db (p[oGateFloor])) / 20);
+        const bool exp = on (p[oGateExp]);
+        const auto att = std::exp (-1 / (std::max (o::ms (p[oGateAtt]), 0.05) * 1e-3 * sr));
+        const auto rel = std::exp (-1 / (std::max (o::ms (p[oGateRel]), 0.05) * 1e-3 * sr));
+        const auto envC = std::exp (-1 / (0.001 * sr));
+        const bool hp = on (p[oGateHpOn]), lp = on (p[oGateLpOn]);
+        for (int i = 0; i < n; ++i)
+        {
+            double s = 0.5 * ((double) l[i] + (double) r[i]);
+            if (hp) s = gHp.process ((float) s, 0);
+            if (lp) s = gLp.process ((float) s, 0);
+            gateEnv = std::max (std::abs (s), envC * gateEnv);
+            const auto L = 20 * std::log10 (gateEnv + 1e-15);
+            if (gateOpen ? L < close : L >= thr) gateOpen = ! gateOpen;
+            double want = 1;
+            if (exp) want = L >= thr ? 1.0 : std::max (floor, std::pow (10.0, (L - thr) / 20));   // 2 : 1 downward expander
+            else want = gateOpen ? 1.0 : floor;
+            const auto c = want > gateG ? att : rel;
+            gateG = c * gateG + (1 - c) * want;
+            l[i] = (float) (l[i] * gateG); r[i] = (float) (r[i] * gateG);
+        }
+    }
+
+    void processDs (float* l, float* r, int n, const EffectParams&) noexcept
+    {
+        // each band: its side-chain shape detects; above the threshold the same region is cut (up to the range)
+        constexpr int sub = 16;
+        for (int i0 = 0; i0 < n; i0 += sub)
+        {
+            const auto m = std::min (sub, n - i0);
+            for (auto& d : ds)
+            {
+                if (! d.on) continue;
+                double e = 0;
+                for (int i = i0; i < i0 + m; ++i)
+                {
+                    const auto s = d.sc.process ((float) (0.5 * ((double) l[i] + (double) r[i])), 0);
+                    e = std::max (e, std::abs ((double) s));
+                }
+                const auto c = e > d.env ? dsAtt : dsRel;
+                d.env = c * d.env + (1 - c) * e;
+                const auto L = 20 * std::log10 (d.env + 1e-15);
+                const auto want = std::clamp ((L - d.thr) * 0.75, 0.0, d.range);
+                if (std::abs (want - d.gr) > 0.05)
+                {
+                    d.gr = want;
+                    switch (d.type)
+                    {
+                        // the shelves' cut reaches below / above the detection corner (probe batch prog1: 2 … 5 kHz cut
+                        // with a 6 kHz high shelf)
+                        case 0: rbjShelf (d.cut, sr, d.hz * 1.8, 0.6, -want, false); break;
+                        case 1: rbjPeak (d.cut, sr, d.hz, 1.0, -want); break;
+                        case 2: rbjPeak (d.cut, sr, d.hz, 4.0, -want); break;
+                        default: rbjShelf (d.cut, sr, d.hz * 0.55, 0.6, -want, true); break;
+                    }
+                }
+                d.cut.processBlock (l + i0, r + i0, m);
+            }
+        }
+        if (dsOut != 1.0)
+            for (int i = 0; i < n; ++i) { l[i] = (float) (l[i] * dsOut); r[i] = (float) (r[i] * dsOut); }
+    }
+
+    double sr = 48000;
+    double lastKey = -1;
+    Biquad hpA, hpB, lpA, lpB, thumpA, thumpB, eq[4], scHp, scBell, scShelf, gHp, gLp;
+    int hpSlope = 1, lpSlope = 1, satType = 0, cType = 0;
+    double satGain = 1, satC = 1, apC = 0, apL = 0, apR = 0, apXL = 0, apXR = 0;
+    double cThr = 0, cSlope = 0, cKnee = 0, cAtt = 0, cRel = 0, cRel2 = 0, cW2 = 0, cMakeup = 1, cMix = 1, cOut = 1, cg = 0, cg2 = 0, cgShown = 0;
+    bool scFilters = false;
+    double gateG = 1, gateEnv = 0, limG = 1;
+    bool gateOpen = false;
+    struct DsBand { Biquad sc, cut; bool on = false; int type = 3; double thr = 0, hz = 6000, range = 12, env = 0, gr = -1; } ds[2];
+    double dsOut = 1, dsAtt = 0, dsRel = 0;
+};
+} // namespace omnistrip

+ 55 - 0
src/core/OmniStripTables.inc

@@ -0,0 +1,55 @@
+// round 190mm: the compressor's automatic make-up (dB) measured on our demo-mode probes (lab/gentab.py, fit/makeup.json):
+// [type][threshold -50 -40 -30 -20 -10 -5 0][ratio 1.6 2.3 3.3 5 7.5 16 50 20+] at attack 0.4 ms / release 50 ms, and
+// [type][attack 0.4 1.76 7.75 34.09 150 ms][release 50 158.1 500 1581.1 5000 ms] at -30 dB 4:1 (the time factor)
+constexpr float makeupThrRatio[4][7][8] = {
+    { { 6.47f, 9.75f, 12.03f, 13.81f, 14.96f, 16.18f, 16.39f, 16.39f },
+      { 4.85f, 7.31f, 9.02f, 10.35f, 11.21f, 12.13f, 12.29f, 12.29f },
+      { 3.28f, 4.94f, 6.09f, 6.99f, 7.57f, 8.19f, 8.30f, 8.30f },
+      { 1.79f, 2.70f, 3.33f, 3.82f, 4.14f, 4.48f, 4.54f, 4.54f },
+      { 0.52f, 0.79f, 0.97f, 1.11f, 1.21f, 1.31f, 1.32f, 1.32f },
+      { 0.10f, 0.15f, 0.18f, 0.21f, 0.22f, 0.24f, 0.24f, 0.24f },
+      { -0.00f, -0.00f, -0.00f, -0.00f, -0.00f, -0.00f, -0.00f, -0.00f } },
+    { { 6.43f, 9.76f, 12.07f, 13.88f, 15.05f, 16.62f, 16.94f, 16.94f },
+      { 4.83f, 7.35f, 9.09f, 9.46f, 11.34f, 12.61f, 12.88f, 12.88f },
+      { 3.27f, 5.00f, 6.20f, 7.14f, 7.75f, 8.72f, 8.94f, 8.94f },
+      { 1.81f, 2.80f, 3.48f, 4.02f, 4.36f, 5.06f, 5.23f, 5.23f },
+      { 0.54f, 0.89f, 1.13f, 1.31f, 1.43f, 1.89f, 2.02f, 2.02f },
+      { 0.07f, 0.18f, 0.26f, 0.32f, 0.35f, 0.72f, 0.84f, 0.84f },
+      { -0.14f, -0.14f, -0.14f, -0.14f, -0.14f, -0.14f, -0.14f, -0.14f } },
+    { { 6.61f, 10.04f, 12.41f, 14.27f, 15.47f, 16.74f, 16.97f, 16.97f },
+      { 5.02f, 7.63f, 9.45f, 10.86f, 11.78f, 12.75f, 12.93f, 12.93f },
+      { 3.47f, 5.30f, 6.57f, 7.56f, 8.20f, 8.88f, 9.01f, 9.01f },
+      { 2.01f, 3.10f, 3.85f, 4.44f, 4.82f, 5.23f, 5.30f, 5.30f },
+      { 0.72f, 1.16f, 1.46f, 1.70f, 1.85f, 2.02f, 2.05f, 2.05f },
+      { 0.22f, 0.40f, 0.52f, 0.62f, 0.68f, 0.75f, 0.76f, 0.76f },
+      { -0.10f, -0.08f, -0.07f, -0.06f, -0.06f, -0.05f, -0.05f, -0.05f } },
+    { { 8.95f, 13.49f, 16.64f, 19.10f, 20.69f, 22.38f, 22.68f, 22.68f },
+      { 7.15f, 10.77f, 13.28f, 14.25f, 16.52f, 17.87f, 18.10f, 18.10f },
+      { 5.23f, 7.88f, 9.72f, 11.15f, 12.08f, 13.07f, 13.24f, 13.24f },
+      { 3.48f, 5.24f, 6.46f, 7.41f, 8.03f, 8.69f, 8.80f, 8.80f },
+      { 1.91f, 2.88f, 3.55f, 4.07f, 4.41f, 4.77f, 4.83f, 4.83f },
+      { 1.18f, 1.78f, 2.19f, 2.52f, 2.73f, 2.95f, 2.99f, 2.99f },
+      { 0.56f, 0.84f, 1.04f, 1.19f, 1.29f, 1.40f, 1.42f, 1.42f } },
+};
+constexpr float makeupTime[4][5][5] = {
+    { { 6.55f, 7.58f, 8.60f, 9.55f, 10.42f },
+      { 5.27f, 6.26f, 7.29f, 8.31f, 9.29f },
+      { 4.10f, 5.00f, 5.97f, 6.99f, 8.02f },
+      { 3.11f, 3.87f, 4.73f, 5.68f, 6.70f },
+      { 2.30f, 2.91f, 3.64f, 4.47f, 5.40f } },
+    { { 6.69f, 7.76f, 8.81f, 9.81f, 10.72f },
+      { 5.35f, 6.38f, 7.45f, 8.51f, 9.53f },
+      { 4.14f, 5.07f, 6.08f, 7.14f, 8.21f },
+      { 3.10f, 3.89f, 4.79f, 5.78f, 6.83f },
+      { 2.26f, 2.90f, 3.65f, 4.52f, 5.49f } },
+    { { 7.08f, 8.21f, 9.33f, 10.39f, 11.34f },
+      { 5.67f, 6.76f, 7.89f, 9.02f, 10.09f },
+      { 4.38f, 5.37f, 6.44f, 7.56f, 8.69f },
+      { 3.29f, 4.12f, 5.07f, 6.12f, 7.24f },
+      { 2.40f, 3.07f, 3.87f, 4.79f, 5.81f } },
+    { { 10.46f, 11.58f, 12.69f, 13.74f, 14.69f },
+      { 8.19f, 9.27f, 10.40f, 11.51f, 12.58f },
+      { 6.25f, 7.23f, 8.29f, 9.41f, 10.53f },
+      { 4.70f, 5.53f, 6.48f, 7.52f, 8.62f },
+      { 3.56f, 4.23f, 5.02f, 5.93f, 6.95f } },
+};

+ 193 - 0
src/core/PluginSubstitutes.cpp

@@ -744,6 +744,17 @@ waves = C4
 # (docs/analise/REA_rodada190mg.md §2)
 translate = waves-c4
 
+# round 190mm (scheps): the multi-module channel strip role (no entry before: such projects lost the plug-in). Its five
+# modules (Pre, Gate, DS2, EQ, Comp), their on / off and the module order are read from the state and run by Ridge
+# Strip's hidden omni law: LYNX's own model of each module, fitted on our Waves-demo probes (EQ shapes, filters, thump,
+# saturation, the compressor types with their automatic make-up; docs/analise/REA_rodada190mm_scheps.md)
+[waves-scheps-omni]
+product = Scheps Omni Channel
+vendor = Waves
+lynx = Ridge Strip
+waves = Scheps Omni Channel; Scheps Omni Channel 2
+translate = waves-scheps-omni
+
 [waves-ar-plates]
 product = Abbey Road Reverb Plates
 vendor = Waves
@@ -3533,6 +3544,186 @@ int translateFittedMap (const std::vector<std::uint8_t>& state, EffectSlot& slot
     return 0;
 }
 
+// ---- round 190mm (scheps): Scheps Omni Channel -> Ridge Strip's hidden omni law (MixSuite.h OmniParam) ----
+// The state holds the strip's own RealWorld list (input / output, phase, limiter, PARAM_SLOT_SERILIZATION_PLUGIN = the
+// module order as slot numbers 1 … 6, first to last) and one <slot index="k"> per module with the module's own preset
+// (its SETUP_A RealWorld list) and <plugin_bypass>. Indices below: REA_rodada190mm_scheps §1 (states of the bank and
+// the module presets compared value by value); the left / mid values are taken (both sides linked).
+namespace
+{
+std::vector<double> omniNumbers (std::string_view text)
+{
+    std::vector<double> out;
+    std::size_t p = 0;
+    while (p < text.size())
+    {
+        while (p < text.size() && std::isspace ((unsigned char) text[p])) ++p;
+        const auto s = p;
+        while (p < text.size() && ! std::isspace ((unsigned char) text[p])) ++p;
+        if (p == s) break;
+        const std::string tok (text.substr (s, p - s));
+        char* end = nullptr;
+        const auto v = std::strtod (tok.c_str(), &end);
+        out.push_back (tok != "*" && end != nullptr && *end == 0 ? v : std::numeric_limits<double>::quiet_NaN());
+    }
+    return out;
+}
+std::string_view omniBetween (std::string_view t, std::string_view a, std::string_view b, std::size_t from = 0)
+{
+    const auto i = t.find (a, from);
+    if (i == std::string_view::npos) return {};
+    const auto j = t.find (b, i + a.size());
+    return j == std::string_view::npos ? std::string_view {} : t.substr (i + a.size(), j - i - a.size());
+}
+struct OmniModule { int kind = 0; bool bypass = true; std::vector<double> rw; };
+} // namespace
+
+int translateWavesSchepsOmni (const std::vector<std::uint8_t>& state, EffectSlot& slot)
+{
+    namespace o = mixsuite::ridge::omni;
+    namespace rg = mixsuite::ridge;
+    if (slot.kind != EffectKind::ridgeStrip)
+        return 0;
+    const auto start = findBytes (state, "<PresetChunkXMLTree");
+    if (start == std::string::npos)
+        return 0;
+    const std::string xml (state.begin() + (std::ptrdiff_t) start, state.end());
+    const std::string_view x (xml);
+    if (omniBetween (x, "<PluginName>", "</PluginName>").find ("Scheps Omni Channel") == std::string_view::npos)
+        return 0;
+    const auto outer = wavesRealWorldParams (state);
+    const auto a = x.find ("<PresetData Setup=\"SETUP_A\"");
+    const auto slotsEnd = a == std::string_view::npos ? a : x.find ("</PluginSpecificXMLData>", a);
+    if (outer.size() < 58 || slotsEnd == std::string_view::npos)
+        return 0;
+    OmniModule slots[6];
+    for (int k = 0; k < 6; ++k)
+    {
+        const auto tag = "<slot index=\"" + std::to_string (k) + "\">";
+        const auto i = x.find (tag, a);
+        if (i == std::string_view::npos || i > slotsEnd) continue;
+        const auto j = x.find ("</slot>", i);
+        const auto t = x.substr (i, (j == std::string_view::npos ? slotsEnd : j) - i);
+        const auto name = omniBetween (t, "<plugin_name>", "</plugin_name>");
+        auto& m = slots[k];
+        m.kind = name == "Internal_SOC_Pre" ? o::pre : name == "Internal_SOC_Gate" ? o::gate : name == "Internal_SOC_DeEsser" ? o::ds2
+               : name == "Internal_SOC_EQ" ? o::eq : name == "Internal_SOC_Comp" ? o::comp : 0;
+        m.bypass = omniBetween (t, "<plugin_bypass>", "</plugin_bypass>") != "false";
+        const auto pd = t.find ("<PresetData Setup=\"SETUP_A\"");
+        if (pd != std::string_view::npos)
+            m.rw = omniNumbers (omniBetween (t, "<Parameters Type=\"RealWorld\">", "</Parameters>", pd));
+    }
+    auto& p = slot.params;
+    const auto set = [&p] (int k, float v) { p[(std::size_t) k] = std::clamp (v, 0.0f, 1.0f); };
+    const auto val = [] (const std::vector<double>& rw, std::size_t i, double fallback) {
+        return i < rw.size() && std::isfinite (rw[i]) ? rw[i] : fallback;
+    };
+    for (int k = rg::omniLaw; k < rg::omniEnd; ++k) p[(std::size_t) k] = 0.0f;
+    set (rg::omniLaw, 1.0f);
+    // the order: the slot numbers, first to last (the insert slot, 6, holds no LYNX module)
+    int order[5] = {}, n = 0;
+    const auto code = (long) std::llround (val (outer, 57, 153426.0));
+    const auto digits = std::to_string (code);
+    for (const auto c : digits)
+    {
+        const auto s = c - '1';
+        if (s >= 0 && s < 6 && slots[s].kind != 0 && n < 5) order[n++] = slots[s].kind;
+    }
+    set (rg::omniOrder, n == 5 ? o::orderValue (order) : 0.0f);
+    set (rg::omniIn, o::dbValue (std::max (-72.0, val (outer, 0, 0.0))));
+    set (rg::omniOut, o::dbValue (std::max (-72.0, val (outer, 4, 0.0))));
+    set (rg::omniInvL, val (outer, 2, 0.0) >= 0.5 ? 1.0f : 0.0f);
+    set (rg::omniInvR, val (outer, 3, 0.0) >= 0.5 ? 1.0f : 0.0f);
+    set (rg::omniLimOn, val (outer, 35, 0.0) >= 0.5 ? 1.0f : 0.0f);
+    set (rg::omniLimThr, o::dbValue (val (outer, 36, 0.0)));
+    int modules = 0;
+    for (const auto& m : slots)
+    {
+        if (m.kind == 0 || m.rw.empty()) continue;
+        const auto& rw = m.rw;
+        const auto on = ! m.bypass;
+        modules += on ? 1 : 0;
+        switch (m.kind)
+        {
+            case o::pre:
+                set (rg::oPreOn, on ? 1.0f : 0.0f);
+                set (rg::oSatAmount, (float) (val (rw, 9, 0.0) / 100.0));
+                set (rg::oSatOn, val (rw, 10, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oSatType, o::indexValue ((int) std::lround (val (rw, 11, 0.0))));
+                set (rg::oThump, val (rw, 12, 0.0) >= 0.5 ? (val (rw, 13, 0.0) >= 0.5 ? 1.0f : 0.5f) : 0.0f);
+                set (rg::oHpOn, val (rw, 14, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oHpSlope, o::indexValue ((int) std::lround (val (rw, 15, 1.0))));
+                set (rg::oHpHz, o::hzValue (val (rw, 16, 20.0)));
+                set (rg::oHpQ, o::qValue (val (rw, 17, 1.0)));
+                set (rg::oLpOn, val (rw, 18, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oLpSlope, o::indexValue ((int) std::lround (val (rw, 19, 1.0))));
+                set (rg::oLpHz, o::hzValue (val (rw, 20, 20000.0)));
+                set (rg::oLpQ, o::qValue (val (rw, 21, 1.0)));
+                break;
+            case o::gate:
+                set (rg::oGateOn, on ? 1.0f : 0.0f);
+                set (rg::oGateThr, val (rw, 18, -144.0) <= -72.0 ? 0.0f : o::dbValue (val (rw, 18, -144.0)));
+                set (rg::oGateFloor, o::dbValue (val (rw, 23, -60.0)));
+                set (rg::oGateClose, o::dbValue (val (rw, 28, 0.0)));
+                set (rg::oGateAtt, o::msValue (val (rw, 24, 1.0)));
+                set (rg::oGateRel, o::msValue (val (rw, 25, 100.0)));
+                set (rg::oGateExp, val (rw, 26, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oGateHpOn, val (rw, 13, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oGateHpHz, o::hzValue (val (rw, 14, 60.0)));
+                set (rg::oGateLpOn, val (rw, 15, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oGateLpHz, o::hzValue (val (rw, 16, 15000.0)));
+                break;
+            case o::ds2:
+                set (rg::oDsOn, on ? 1.0f : 0.0f);
+                for (int b = 0; b < 2; ++b)
+                {
+                    const auto i0 = (std::size_t) (b == 0 ? 20 : 28); const int k0 = b == 0 ? rg::oDs1On : rg::oDs2On;
+                    set (k0, val (rw, i0, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                    set (k0 + 1, o::dbValue (val (rw, i0 + 1, 0.0)));
+                    set (k0 + 4, o::dbValue (val (rw, i0 + 2, -12.0)));
+                    set (k0 + 3, o::hzValue (val (rw, i0 + 3, b == 0 ? 4490.0 : 300.0)));
+                    set (k0 + 2, o::indexValue ((int) std::lround (val (rw, i0 + 4, b == 0 ? 3.0 : 1.0))));
+                }
+                set (rg::oDsOut, o::dbValue (val (rw, 17, 0.0)));
+                set (rg::oDsAtt, o::msValue (val (rw, 12, 42.0) * 0.1));
+                set (rg::oDsRel, o::msValue (val (rw, 15, 50.0)));
+                break;
+            case o::eq:
+                set (rg::oEqOn, on ? 1.0f : 0.0f);
+                for (int b = 0; b < 4; ++b)
+                {
+                    const auto i0 = (std::size_t) (6 * b); const int k0 = rg::oEqBand0 + 5 * b;
+                    set (k0, val (rw, i0 + 1, 1.0) >= 0.5 ? 1.0f : 0.0f);
+                    set (k0 + 1, o::indexValue ((int) std::lround (val (rw, i0 + 2, 1.0))));
+                    set (k0 + 2, o::hzValue (val (rw, i0 + 4, 1000.0)));
+                    set (k0 + 3, o::dbValue (val (rw, i0 + 3, 0.0)));
+                    set (k0 + 4, o::qValue (val (rw, i0 + 5, 1.0)));
+                }
+                break;
+            case o::comp:
+                set (rg::oCompOn, on ? 1.0f : 0.0f);
+                set (rg::oCompType, o::indexValue ((int) std::lround (val (rw, 29, 0.0))));
+                set (rg::oCompRatio, o::ratioValue (val (rw, 38, 3.5)));
+                set (rg::oCompAtt, o::msValue (val (rw, 44, 3.0)));
+                set (rg::oCompRel, o::msValue (val (rw, 42, 200.0)));
+                set (rg::oCompThr, o::dbValue (val (rw, 40, 0.0)));
+                set (rg::oCompMix, (float) (val (rw, 78, 100.0) / 100.0));
+                set (rg::oCompOut, o::dbValue (val (rw, 34, 0.0)));
+                set (rg::oScHpOn, val (rw, 47, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oScHpHz, o::hzValue (val (rw, 49, 80.0)));
+                set (rg::oScBellOn, val (rw, 51, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oScBellDb, o::dbValue (val (rw, 53, 0.0)));
+                set (rg::oScBellHz, o::hzValue (val (rw, 55, 500.0)));
+                set (rg::oScShelfOn, val (rw, 59, 0.0) >= 0.5 ? 1.0f : 0.0f);
+                set (rg::oScShelfDb, o::dbValue (val (rw, 61, 0.0)));
+                set (rg::oScShelfHz, o::hzValue (val (rw, 63, 8000.0)));
+                break;
+            default: break;
+        }
+    }
+    return 8 + modules;
+}
+
 RawTranslator rawTranslatorNamed (std::string_view name)
 {
     if (name == "fitted-map")
@@ -3596,6 +3787,8 @@ RawTranslator rawTranslatorNamed (std::string_view name)
         return translateWavesSslCompBus;
     if (name == "waves-reverb")
         return translateWavesReverb;
+    if (name == "waves-scheps-omni") // round 190mm (scheps)
+        return translateWavesSchepsOmni;
     return nullptr;
 }
 

+ 222 - 0
tests/Parity190mmSchepsTests.inc

@@ -0,0 +1,222 @@
+// Round 190mm (sub-round "scheps"): the Waves Scheps Omni Channel on Ridge Strip's hidden omni law (owner's permission
+// of 2026-11-17 for clean-room REA of third-party binaries; /mnt/e/lynx-work/waves4_190mm/scheps/HANDOFF.md,
+// docs/analise/REA_rodada190mm_scheps.md).
+// - Ridge gets a hidden omni law block at fixed indices 100 … 191 (MixSuite.h OmniParam): 0 for new instances and every
+//   project saved before (bit for bit: waves4_190mm/scheps/lab/gold.sh); only the Scheps translator sets it.
+// - The Scheps Omni Channel had no entry before (such projects lost the plug-in): its five modules, their on / off and
+//   the module order are read from its state.
+#include <cmath>
+#include <string>
+#include <vector>
+
+#include "core/Effects.h"
+#include "core/MixSuite.h"
+#include "core/PluginSubstitutes.h"
+
+namespace parity190mmscheps
+{
+namespace rg = lynx::mixsuite::ridge;
+// a minimal state of the strip's form: the outer RealWorld list (order code at 57) and one slot per module
+inline std::vector<std::uint8_t> state (const std::string& order, const std::string (&modules)[5], const bool (&bypass)[5])
+{
+    static const char* names[5] = { "Internal_SOC_Pre", "Internal_SOC_Gate", "Internal_SOC_DeEsser", "Internal_SOC_EQ", "Internal_SOC_Comp" };
+    std::string outer;
+    for (int i = 0; i < 61; ++i)
+        outer += (i == 57 ? order : i == 58 ? std::string ("222221") : i < 6 ? std::string ("0") : std::string ("*")) + " ";
+    std::string xml = "<PresetChunkXMLTree version=\"3\">\n <Preset Name=\"\" GenericType=\"ACSS\">\n  <PresetHeader>\n   <PluginName>Scheps Omni Channel</PluginName>\n"
+                      "   <ActiveSetup>SETUP_A</ActiveSetup>\n  </PresetHeader>\n  <PresetData Setup=\"SETUP_A\" SetupName=\"\">\n   <Parameters Type=\"RealWorld\">\n"
+                      + outer + "\n</Parameters>\n   <PluginSpecificXMLData>\n";
+    for (int k = 0; k < 5; ++k)
+        xml += "    <slot index=\"" + std::to_string (k) + "\">\n     <slot_data>\n      <plugin_preset><![CDATA[<PresetChunkXMLTree version=\"3\">\n <Preset Name=\"\">\n"
+               "  <PresetData Setup=\"SETUP_A\">\n   <Parameters Type=\"RealWorld\">\n" + modules[k] + "\n</Parameters>\n   <PluginSpecificXMLData />\n  </PresetData>\n"
+               " </Preset>\n</PresetChunkXMLTree>\n]]></plugin_preset>\n      <plugin_name>" + names[k] + "</plugin_name>\n      <plugin_bypass>"
+               + (bypass[k] ? "true" : "false") + "</plugin_bypass>\n     </slot_data>\n    </slot>\n";
+    xml += "    <slot index=\"5\">\n    </slot>\n   </PluginSpecificXMLData>\n  </PresetData>\n </Preset>\n</PresetChunkXMLTree>\n";
+    std::vector<std::uint8_t> c { 0, 0, 3, 0xe2, 0, 0, 0, 3, 0, 0, 0, 1, 'A', 'C', 'S', 'S', 's', 'e', 't', 'A', 0, 0, 3, 0xc6, 'X', 'P', 's', 't', 0 };
+    c.insert (c.end(), xml.begin(), xml.end());
+    return c;
+}
+inline std::string list (std::initializer_list<std::pair<int, double>> values, int n)
+{
+    std::vector<std::string> v ((std::size_t) n, "0");
+    for (const auto& [i, x] : values) { char t[32]; std::snprintf (t, sizeof (t), "%g", x); v[(std::size_t) i] = t; }
+    std::string s;
+    for (const auto& x : v) s += x + " ";
+    return s;
+}
+// the bank's defaults (every module present, values of a full reset) with some changes
+inline std::string pre (std::initializer_list<std::pair<int, double>> c = {}) { auto s = list ({ { 15, 1 }, { 16, 20 }, { 17, 1 }, { 19, 1 }, { 20, 20000 }, { 21, 1 } }, 60); return c.size() ? list (c, 60) : s; }
+inline std::string comp (std::initializer_list<std::pair<int, double>> c) { return list (c, 88); }
+inline lynx::EffectSlot translate (const std::vector<std::uint8_t>& st, int* n = nullptr)
+{
+    lynx::PluginIdentity id;
+    id.format = lynx::ForeignPlugin::Format::vst3;
+    id.name = "WaveShell1-VST3 17.1_x64";
+    id.state = st;
+    const auto* e = lynx::findPluginSubstitute (id, false);
+    if (e == nullptr) return lynx::makeEffectSlot (lynx::EffectKind::ridgeStrip);
+    int k = 0;
+    auto s = lynx::makeSubstituteSlot (*e, &id, &k);
+    if (n != nullptr) *n = k;
+    return s;
+}
+inline std::vector<float> sine (double sr, double hz, double db, int n)
+{
+    std::vector<float> x ((std::size_t) n);
+    for (int i = 0; i < n; ++i) x[(std::size_t) i] = (float) (std::pow (10.0, db / 20) * std::sin (2 * 3.14159265358979 * hz * i / sr));
+    return x;
+}
+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);
+}
+inline double rmsDb (const std::vector<float>& x, int from)
+{
+    double e = 0;
+    for (std::size_t i = (std::size_t) from; i < x.size(); ++i) e += (double) x[i] * x[i];
+    return 10 * std::log10 (e / (double) (x.size() - (std::size_t) from) + 1e-30);
+}
+} // namespace parity190mmscheps
+
+TEST (parity190mm_scheps_omni_law_is_hidden_and_off_for_new_and_old_instances)
+{
+    using namespace lynx;
+    namespace rg = mixsuite::ridge;
+    CHECK (effectInfo (EffectKind::ridgeStrip).params.size() == (std::size_t) rg::count && rg::count <= 100 && rg::omniEnd <= maxEffectParams);
+    auto s = makeEffectSlot (EffectKind::ridgeStrip);
+    const auto saved = savedEffectParamCount (s);
+    CHECK (saved <= 100 && ! rg::omni::omniLawOn (s.params));
+    for (int k = rg::omniLaw; k < rg::omniEnd; ++k) CHECK (s.params[(std::size_t) k] == 0.0f);
+    s.params[(std::size_t) rg::omniLaw] = 1.0f;
+    CHECK (rg::omni::omniLawOn (s.params) && savedEffectParamCount (s) == (std::size_t) rg::omniLaw + 1);
+    // the scales round-trip
+    CHECK (std::abs (rg::omni::db (rg::omni::dbValue (-24.0)) + 24.0) < 1e-4);
+    CHECK (std::abs (rg::omni::hz (rg::omni::hzValue (2890.0)) - 2890.0) < 0.05);
+    CHECK (std::abs (rg::omni::ms (rg::omni::msValue (88.9)) - 88.9) < 1e-3);
+    CHECK (std::abs (rg::omni::ratio (rg::omni::ratioValue (3.5)) - 3.5) < 1e-4 && rg::omni::index (rg::omni::indexValue (3)) == 3);
+    int order[5] = { 5, 1, 4, 3, 2 }, back[5] = {};
+    rg::omni::orderOf (rg::omni::orderValue (order), back);
+    CHECK (back[0] == 5 && back[1] == 1 && back[2] == 4 && back[3] == 3 && back[4] == 2);
+    rg::omni::orderOf (0.0f, back); // a missing order is the reference's default chain: Pre, Comp, DS2, EQ, Gate
+    CHECK (back[0] == rg::omni::pre && back[1] == rg::omni::comp && back[2] == rg::omni::ds2 && back[3] == rg::omni::eq && back[4] == rg::omni::gate);
+}
+
+TEST (parity190mm_scheps_law_off_is_ridge_bit_for_bit)
+{
+    using namespace lynx;
+    using namespace parity190mmscheps;
+    // omni values present but the law off: Ridge's own engine, sample for sample
+    auto a = makeEffectSlot (EffectKind::ridgeStrip);
+    auto b = a;
+    for (int k = rg::omniLaw + 1; k < rg::omniEnd; ++k) b.params[(std::size_t) k] = 0.37f;
+    for (const double sr : { 44100.0, 96000.0 })
+    {
+        auto l1 = sine (sr, 220.0, -6.0, 6000), r1 = sine (sr, 330.0, -9.0, 6000), l2 = l1, r2 = r1;
+        render (a, sr, l1, r1);
+        render (b, sr, l2, r2);
+        CHECK (l1 == l2 && r1 == r2);
+    }
+}
+
+TEST (parity190mm_scheps_state_translates_modules_order_and_bypass)
+{
+    using namespace lynx;
+    using namespace parity190mmscheps;
+    namespace o = rg::omni;
+    // the bank's X4 compressor (VCA 16 : 1, -35 dB, 0.84 / 88.9 ms, +6 dB, 40 %) with the other modules bypassed
+    const std::string mods[5] = { pre(), list ({}, 68), list ({}, 62), list ({ { 1, 1 }, { 7, 1 }, { 13, 1 }, { 19, 1 } }, 71),
+                                  comp ({ { 29, 0 }, { 34, 6 }, { 38, 16 }, { 40, -35 }, { 42, 88.9 }, { 44, 0.84 }, { 78, 40 } }) };
+    const bool bypass[5] = { true, true, true, true, false };
+    int n = 0;
+    const auto s = translate (state ("153426", mods, bypass), &n);
+    CHECK (s.kind == EffectKind::ridgeStrip && n > 0 && o::omniLawOn (s.params));
+    CHECK (s.params[rg::oCompOn] == 1.0f && s.params[rg::oPreOn] == 0.0f && s.params[rg::oEqOn] == 0.0f && s.params[rg::oDsOn] == 0.0f);
+    CHECK (std::abs (o::ratio (s.params[rg::oCompRatio]) - 16.0) < 1e-3 && std::abs (o::db (s.params[rg::oCompThr]) + 35.0) < 1e-3);
+    CHECK (std::abs (o::ms (s.params[rg::oCompAtt]) - 0.84) < 1e-4 && std::abs (o::ms (s.params[rg::oCompRel]) - 88.9) < 1e-3);
+    CHECK (std::abs (s.params[rg::oCompMix] - 0.4f) < 1e-6f && std::abs (o::db (s.params[rg::oCompOut]) - 6.0) < 1e-3);
+    int order[5] = {};
+    o::orderOf (s.params[rg::omniOrder], order);
+    CHECK (order[0] == o::pre && order[1] == o::comp && order[2] == o::ds2 && order[3] == o::eq && order[4] == o::gate);
+    // a moved module: the EQ (slot 4) first
+    const auto t = translate (state ("413526", mods, bypass));
+    o::orderOf (t.params[rg::omniOrder], order);
+    CHECK (order[0] == o::eq && order[1] == o::pre && order[2] == o::ds2 && order[3] == o::comp && order[4] == o::gate);
+}
+
+TEST (parity190mm_scheps_bypassed_strip_passes_the_signal)
+{
+    using namespace lynx;
+    using namespace parity190mmscheps;
+    const std::string mods[5] = { pre(), list ({}, 68), list ({}, 62), list ({ { 1, 1 } }, 71), comp ({ { 38, 3.5 } }) };
+    const bool bypass[5] = { true, true, true, true, true };
+    const auto s = translate (state ("153426", mods, bypass));
+    auto l = sine (48000, 440, -3, 4800), r = sine (48000, 660, -12, 4800);
+    const auto l0 = l, r0 = r;
+    render (s, 48000, l, r);
+    CHECK (l == l0 && r == r0); // the reference renders a full reset bit for bit (refcap182 D: -220 dB)
+}
+
+TEST (parity190mm_scheps_probe_based_behaviours)
+{
+    using namespace lynx;
+    using namespace parity190mmscheps;
+    namespace o = rg::omni;
+    auto strip = [] { auto s = makeEffectSlot (EffectKind::ridgeStrip); s.params[rg::omniLaw] = 1.0f; s.params[rg::omniIn] = o::dbValue (0); s.params[rg::omniOut] = o::dbValue (0); return s; };
+    // compressor: below the threshold the automatic make-up (probe mk1: VCA 16 : 1, -35 dB, 0.84 / 88.9 ms -> +9.91 dB)
+    {
+        auto s = strip();
+        s.params[rg::oCompOn] = 1.0f; s.params[rg::oCompRatio] = o::ratioValue (16); s.params[rg::oCompThr] = o::dbValue (-35);
+        s.params[rg::oCompAtt] = o::msValue (0.84); s.params[rg::oCompRel] = o::msValue (88.9); s.params[rg::oCompMix] = 1.0f; s.params[rg::oCompOut] = o::dbValue (0);
+        auto l = sine (48000, 1000, -70, 24000), r = l;
+        render (s, 48000, l, r);
+        CHECK (std::abs (rmsDb (l, 12000) - (-73.01 + 9.91)) < 0.25);
+        // well above: the gain falls (probe comp1 st_VCA_16.0_m35: -8.86 dB at -12 dB in)
+        auto l2 = sine (48000, 1000, -12, 48000), r2 = l2;
+        render (s, 48000, l2, r2);
+        CHECK (std::abs (rmsDb (l2, 24000) - (-15.01 - 8.86)) < 1.0);
+    }
+    // EQ: the Tone band Wide +12 dB at 1 kHz peaks at 1 kHz (probe eq1); Pre high-pass 12 dB / oct at 100 Hz: -3 dB there
+    {
+        auto s = strip();
+        s.params[rg::oEqOn] = 1.0f;
+        const int tone = rg::oEqBand0 + 5;
+        s.params[(std::size_t) tone] = 1.0f; s.params[(std::size_t) tone + 1] = o::indexValue (0); s.params[(std::size_t) tone + 2] = o::hzValue (1000);
+        s.params[(std::size_t) tone + 3] = o::dbValue (12); s.params[(std::size_t) tone + 4] = o::qValue (1);
+        auto l = sine (48000, 1000, -30, 24000), r = l;
+        render (s, 48000, l, r);
+        CHECK (std::abs (rmsDb (l, 12000) - (-33.01 + 12.0)) < 0.05);
+        auto h = strip();
+        h.params[rg::oPreOn] = 1.0f; h.params[rg::oHpOn] = 1.0f; h.params[rg::oHpSlope] = o::indexValue (1); h.params[rg::oHpHz] = o::hzValue (100); h.params[rg::oHpQ] = o::qValue (1);
+        auto l2 = sine (48000, 100, -20, 48000), r2 = l2;
+        render (h, 48000, l2, r2);
+        CHECK (std::abs (rmsDb (l2, 24000) - (-23.01 - 3.01)) < 0.1);
+    }
+    // saturation: Even at 30 % adds +2.0 dB at every level (probe pre1 sat_Even_30)
+    {
+        auto s = strip();
+        s.params[rg::oPreOn] = 1.0f; s.params[rg::oSatOn] = 1.0f; s.params[rg::oSatType] = o::indexValue (1); s.params[rg::oSatAmount] = 0.3f;
+        auto l = sine (48000, 1000, -30, 24000), r = l;
+        render (s, 48000, l, r);
+        CHECK (std::abs (rmsDb (l, 12000) - (-33.01 + 2.0)) < 0.1);
+    }
+    // the order matters: a hard clipper before or after a +12 dB bell gives different results
+    {
+        auto s = strip();
+        s.params[rg::oPreOn] = 1.0f; s.params[rg::oSatOn] = 1.0f; s.params[rg::oSatType] = o::indexValue (2); s.params[rg::oSatAmount] = 1.0f;
+        s.params[rg::oEqOn] = 1.0f;
+        const int tone = rg::oEqBand0 + 5;
+        s.params[(std::size_t) tone] = 1.0f; s.params[(std::size_t) tone + 2] = o::hzValue (1000); s.params[(std::size_t) tone + 3] = o::dbValue (12);
+        int a[5] = { o::pre, o::eq, o::comp, o::ds2, o::gate }, b[5] = { o::eq, o::pre, o::comp, o::ds2, o::gate };
+        auto t = s;
+        s.params[rg::omniOrder] = o::orderValue (a);
+        t.params[rg::omniOrder] = o::orderValue (b);
+        auto l1 = sine (48000, 1000, -6, 9600), r1 = l1, l2 = l1, r2 = l1;
+        render (s, 48000, l1, r1);
+        render (t, 48000, l2, r2);
+        CHECK (std::abs (rmsDb (l1, 4800) - rmsDb (l2, 4800)) > 3.0);
+    }
+}

+ 1 - 0
tests/tests.cpp

@@ -17786,6 +17786,7 @@ TEST (fl_low_lifter_matches_fl_engine)
 #include "Parity190mgNs1Tests.inc" // round 190mg (ns1): Quell's NS1 law (REA of the Waves NS1: its own structure for 20 … 100 %), NS1 on it
 #include "Parity190mgVocTests.inc" // round 190mg (voc): the Waves Doubler DSP's splice law on Gemini, the Waves Tune RT law on LYNX Tune
 #include "Parity190mgDynTests.inc" // round 190mg (dyn): Facet's PuigTec law, L2's IDR on the Limiter (REA of the Waves PuigTec / L2 DSP)
+#include "Parity190mmSchepsTests.inc" // round 190mm (scheps): the Scheps Omni Channel on Ridge Strip's hidden omni law (five modules, order)
 #include "Sampler190dhTests.inc"
 #include "Fix190eaTests.inc"
 #include "Iss158Tests.inc"