@openmixer/omx-contract 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,6 +78,18 @@ export const CHORUS_MIX_RANGE = {
78
78
  "defaultFrom": "desk"
79
79
  };
80
80
 
81
+ /**
82
+ * The chorus's base delay, ms: the voices swing around it by up to the depth.
83
+ * @see data/kernels/chorus.json
84
+ */
85
+ export const CHORUS_BASE_MS = 10;
86
+
87
+ /**
88
+ * The longest delay a chorus voice reaches, rounded up to whole ms: the base delay plus the depth maximum. The delay line is sized from it.
89
+ * @see data/kernels/chorus.json
90
+ */
91
+ export const CHORUS_MAX_MS = 22;
92
+
81
93
  /**
82
94
  * The legal range of each compressor field (engineering units). The widget clamps drags to these, `normalizeComp` enforces them, the row's codec refuses by them and the travel sheet publishes them. `default`/`defaultFrom` are the come-up values `defaultCompState` seeds a fresh strip with, read BACK from here rather than restated there.
83
95
  * @see data/kernels/comp.json
@@ -255,6 +267,15 @@ export const DEESS_RELEASE_RANGE = {
255
267
  */
256
268
  export const DEESS_KNEE_DB = 6;
257
269
 
270
+ /**
271
+ * The de-esser's modes, in the order of the integer the kernel reads: split attenuates the detected band only, wideband the whole signal while the sibilance lasts.
272
+ * @see data/kernels/deesser.json
273
+ */
274
+ export const DEESS_MODES = [
275
+ "split",
276
+ "wideband"
277
+ ];
278
+
258
279
  /**
259
280
  * The FX delay's time travel. `max` is the NATIVE ring's ceiling — the same number as `OMX_FXDELAY_MAX_MS` in `omx_delay.h`, pinned to it by `output-delay-ceiling.test.ts`. Distinct from the per-route ALIGNMENT delay (`OUTPUT_DELAY_RANGE`, 1 s, `OMX_DELAY_MAX_MS`): one is a musical echo with feedback and mix, the other is a pure latency. Two facts, two rings, two ceilings — sharing the word "delay" is why they keep being confused for each other.
260
281
  * @see data/kernels/delay.json
@@ -387,6 +408,28 @@ export const DRIVE_TRIM_RANGE = {
387
408
  "defaultFrom": "desk"
388
409
  };
389
410
 
411
+ /**
412
+ * The drive's shaper curves, in the order of the integer the kernel reads. Exciter runs the soft shape in a parallel-sum topology.
413
+ * @see data/kernels/drive.json
414
+ */
415
+ export const DRIVE_CURVES = [
416
+ "soft",
417
+ "tape",
418
+ "tube",
419
+ "exciter"
420
+ ];
421
+
422
+ /**
423
+ * Which part of the spectrum the drive's curve is fed, in the order of the integer the kernel reads. The split is complementary, so mix 0 stays bit-identical to the dry signal.
424
+ * @see data/kernels/drive.json
425
+ */
426
+ export const DRIVE_BANDS = [
427
+ "full",
428
+ "low",
429
+ "high",
430
+ "tilt"
431
+ ];
432
+
390
433
  /**
391
434
  * The maximum number of parametric bands a channel EQ may hold — the operator can add up to this many. Generated into `omx_contract_limits.h` as `OMX_EQ_MAX_BANDS`, which `omx_biquad.h` reads (`output-delay-ceiling.test.ts` reads the header): the native lane allocates exactly this many biquad slots per channel and silently clamps above it, so the model, the wire, and the DSP agree by test, not by memory.
392
435
  * @see data/kernels/eq.json
@@ -503,6 +546,290 @@ export const LPF_FREQ_RANGE = {
503
546
  "unit": "Hz"
504
547
  };
505
548
 
549
+ /**
550
+ * The band slots kept for the operator's own hand: the reserve the feedback suppressor and the ring correction may never eat into. Nine is the working set a live EQ actually holds. The budget OPERATOR_EQ_BANDS_RESERVE + FBS_DEFAULT_MAX_AUTO_BANDS + HRP_DEFAULT_MAX_AUTO_BANDS (9 + 6 + 8 = 23) must fit EQ_MAX_BANDS, and `omx-contract validate` refuses data where it does not.
551
+ * @see data/kernels/eq.json
552
+ */
553
+ export const OPERATOR_EQ_BANDS_RESERVE = 9;
554
+
555
+ /**
556
+ * The generic EQ band shapes, in the order a picker offers them and in the order of the integer a plugin host sees on a band type port. The id is the name; the position is the value. A bell is the shape a band added by the operator starts as.
557
+ * @see data/kernels/eq.json
558
+ */
559
+ export const EQ_BAND_TYPES = [
560
+ "bell",
561
+ "lowShelf",
562
+ "highShelf",
563
+ "notch",
564
+ "allpass1",
565
+ "allpass2"
566
+ ];
567
+
568
+ /**
569
+ * The pass-filter slopes the EQ offers, in dB per octave. The id is the slope: 12 is one maximally flat section, 24 the two-section Butterworth.
570
+ * @see data/kernels/eq.json
571
+ */
572
+ export const FILTER_SLOPES = [
573
+ 12,
574
+ 24
575
+ ];
576
+
577
+ /**
578
+ * How many bands each strip type's EQ starts with (`default`) and may hold (`max`). `channel` is the console's channel strip: it starts with four and the operator adds bands up to EQ_MAX_BANDS (a band added takes the frequency it is added at, so no default is declared for it). `strip` is the omx-strip plugin's EQ and `eq8`, `eq16` and `eq32` the omx-eq plugins, whose bands are fixed. A default may never exceed its maximum, and the default centres of any count come from the one default rule, whatever the strip.
579
+ * @see data/kernels/eq.json
580
+ */
581
+ export const EQ_BAND_COUNTS = {
582
+ "channel": {
583
+ "default": 4,
584
+ "max": 24
585
+ },
586
+ "strip": {
587
+ "default": 4,
588
+ "max": 4
589
+ },
590
+ "eq8": {
591
+ "default": 8,
592
+ "max": 8
593
+ },
594
+ "eq16": {
595
+ "default": 16,
596
+ "max": 16
597
+ },
598
+ "eq32": {
599
+ "default": 32,
600
+ "max": 32
601
+ }
602
+ };
603
+
604
+ /**
605
+ * What every band of a fresh EQ comes up at, whatever its type and its strip: flat (0 dB) and Q 1. The band frequencies and types come from the default rule.
606
+ * @see data/kernels/eq.json
607
+ */
608
+ export const EQ_BAND_DEFAULTS = {
609
+ "gainDb": 0,
610
+ "q": 1
611
+ };
612
+
613
+ /**
614
+ * The corners the high-pass and low-pass filters of a fresh EQ are parked at, whatever the strip. Both come up off.
615
+ * @see data/kernels/eq.json
616
+ */
617
+ export const EQ_PASS_FILTER_DEFAULTS = {
618
+ "hpfFreqHz": 80,
619
+ "lpfFreqHz": 18000
620
+ };
621
+
622
+ /**
623
+ * The default band centres of a four-band EQ, Hz: ISO 266 preferred values, two to two and a half octaves apart. The default rule gives every other band count its centres from the preferred series; four bands start here.
624
+ * @see data/kernels/eq.json
625
+ */
626
+ export const EQ_DEFAULT_CENTRES_FOUR_BAND_HZ = [
627
+ 100,
628
+ 400,
629
+ 2000,
630
+ 8000
631
+ ];
632
+
633
+ /**
634
+ * The ISO 266 R20 preferred frequencies from 20 Hz to 20 kHz (61 values, sixth-octave spacing): the finer series the default band rule falls back to where R10 (ISO_THIRD_OCTAVE_CENTRES_HZ, 31 values) has too few to give every band its own centre. R10 is a subset of it.
635
+ * @see data/kernels/eq.json
636
+ */
637
+ export const EQ_CENTRE_SERIES_R20_HZ = [
638
+ 20,
639
+ 22.4,
640
+ 25,
641
+ 28,
642
+ 31.5,
643
+ 35.5,
644
+ 40,
645
+ 45,
646
+ 50,
647
+ 56,
648
+ 63,
649
+ 71,
650
+ 80,
651
+ 90,
652
+ 100,
653
+ 112,
654
+ 125,
655
+ 140,
656
+ 160,
657
+ 180,
658
+ 200,
659
+ 224,
660
+ 250,
661
+ 280,
662
+ 315,
663
+ 355,
664
+ 400,
665
+ 450,
666
+ 500,
667
+ 560,
668
+ 630,
669
+ 710,
670
+ 800,
671
+ 900,
672
+ 1000,
673
+ 1120,
674
+ 1250,
675
+ 1400,
676
+ 1600,
677
+ 1800,
678
+ 2000,
679
+ 2240,
680
+ 2500,
681
+ 2800,
682
+ 3150,
683
+ 3550,
684
+ 4000,
685
+ 4500,
686
+ 5000,
687
+ 5600,
688
+ 6300,
689
+ 7100,
690
+ 8000,
691
+ 9000,
692
+ 10000,
693
+ 11200,
694
+ 12500,
695
+ 14000,
696
+ 16000,
697
+ 18000,
698
+ 20000
699
+ ];
700
+
701
+ /**
702
+ * How far (bins) around bin/2 and bin/3 PSHR (`omx_fbs_pshr`) scans for a sub-harmonic line. A true half/third partial lands mid-bin in the worst case (bin/2 and bin/3 are rarely integers) and spectral leakage smears it one bin further; ±2 covers both. Measured on the #116 live-music corpus: every false positive's sub-line sat inside this window. Deliberately NOT wider — at low bins the window is already a large fraction of an octave, and widening it would start reading unrelated program lines as "sub-harmonics" of real feedback.
703
+ * @see data/kernels/fbs.json
704
+ */
705
+ export const SUBHARMONIC_RADIUS_BINS = 2;
706
+
707
+ /**
708
+ * PAPR's guard band: bins either side of the peak left out of the floor average (its own skirt).
709
+ * @see data/kernels/fbs.json
710
+ */
711
+ export const FBS_PAPR_GUARD_BINS = 2;
712
+
713
+ /**
714
+ * PNPR's neighbourhood radius in bins, and the guard inside it that belongs to the peak's own skirt: a pure tone is compared with bins 2 and 3 away on each side.
715
+ * @see data/kernels/fbs.json
716
+ */
717
+ export const FBS_PNPR_RADIUS_BINS = 3;
718
+
719
+ /**
720
+ * The guard inside PNPR's neighbourhood radius that belongs to the peak's own skirt, in bins.
721
+ * @see data/kernels/fbs.json
722
+ */
723
+ export const FBS_PNPR_GUARD_BINS = 1;
724
+
725
+ /**
726
+ * How many harmonics PHPR reads above the candidate: 2f, 3f and 4f.
727
+ * @see data/kernels/fbs.json
728
+ */
729
+ export const FBS_PHPR_HARMONICS = 3;
730
+
731
+ /**
732
+ * PSHR skips sub-window bins within this many of the candidate, so a low bin never measures its own skirt as a sub-harmonic.
733
+ * @see data/kernels/fbs.json
734
+ */
735
+ export const FBS_PSHR_SELF_SKIP_BINS = 3;
736
+
737
+ /**
738
+ * The magnitude floor of every detector dB reading (−240 dB): a zero bin stays finite.
739
+ * @see data/kernels/fbs.json
740
+ */
741
+ export const FBS_FLOOR_LIN = 1e-12;
742
+
743
+ /**
744
+ * Tracked candidate bins per armed channel. A candidate that finds no free slot is COUNTED and reported, never dropped silently; the identity corpus peaks at 34.
745
+ * @see data/kernels/fbs.json
746
+ */
747
+ export const FBS_TRACK_SLOTS = 512;
748
+
749
+ /**
750
+ * Minimum PSHR (`omx_fbs_pshr`) (dB) for a candidate frame to count as sub-harmonic-CLEAN. Evidence-set on the #116 corpus, margin on both sides: the four live false positives (musical overtones at 1 869.1 / 832.0 / 263.7 / 228.5 Hz) read PSHR between −10.2 and +8.8 dB across their windows — never a 5-frame sub-clean stretch, and the single closest approach (+8.8) is isolated between frames at ≈ −1 and −10 — while the committed #106 injected ramp reads ≥ +12.2 dB from its second frame on (its frame 0 sits at +9.4, costing exactly one frame of confirm latency, pinned in the corpus test). A static program line at f/2 of REAL feedback also clears this fast: the runaway gains several dB per hop on anything static, so the deferral is transient.
751
+ * @see data/kernels/fbs.json
752
+ */
753
+ export const PSHR_MIN_DB = 10;
754
+
755
+ /**
756
+ * How many of a candidate bin's most recent dB readings feed the growth-slope estimate (the engine's least-squares slope) — set equal to DEFAULT_THRESHOLDS's `persistFrames` so growth is judged over the SAME window persistence already demands (the full run since the bin became a candidate, not a shorter or longer slice of it). Long enough that a couple of noisy/vibrato frames can't fake a trend by themselves.
757
+ * @see data/kernels/fbs.json
758
+ */
759
+ export const GROWTH_WINDOW_FRAMES = 5;
760
+
761
+ /**
762
+ * The DEEP plateau tier's dwell: ~2 s at the watcher's 10 Hz — the TIME that buys the deeper floor its music safety (see DetectThresholds.deepPlateauFloorDb).
763
+ * @see data/kernels/fbs.json
764
+ */
765
+ export const DEEP_PLATEAU_FRAMES = 20;
766
+
767
+ /**
768
+ * Minimum least-squares slope, in dB PER FRAME, over GROWTH_WINDOW_FRAMES for a bin to count as "running away" rather than merely holding level. Set with real margin on BOTH sides — comfortably above measurement jitter on a held tone or a quiet/broadband mix (well under 0.2 dB/frame in practice) and comfortably below a genuine feedback ramp, which climbs several dB across a handful of ~20 ms hops as it heads toward clipping. Issue #91's acceptance bar is "arming must never burst-alarm on non-growing content", so this errs conservative (under-fire a marginal ramp) rather than tight (risk a false alarm) — the ramp gate (`omx_fbs_is_growing`) also requires the window's end to sit above its start, a cheap belt-and-braces check against a fit dragged positive by one mid-window wobble.
769
+ * @see data/kernels/fbs.json
770
+ */
771
+ export const GROWTH_MIN_DB_PER_FRAME = 0.8;
772
+
773
+ /**
774
+ * Largest single-frame DIP (dB) a run-away window may contain. Real feedback climbs every hop; a small allowance covers measurement jitter and the −0.3 dB-ish wobble frames seen on live captures, while any real drop (a note ending, tremolo) breaks the run.
775
+ * @see data/kernels/fbs.json
776
+ */
777
+ export const GROWTH_MAX_DIP_DB = 0.5;
778
+
779
+ /**
780
+ * Minimum END-TO-END rise (dB) across the window. The live-music corpus (issue #106) showed sustained melody notes drifting up ~4–5 dB over a window without ever being feedback; a loop past unity gains several dB per hop and clears 6 dB in a window trivially. Below this the tone is holding level, not running away.
781
+ * @see data/kernels/fbs.json
782
+ */
783
+ export const GROWTH_MIN_TOTAL_RISE_DB = 6;
784
+
785
+ /**
786
+ * Cap on the share of the window's total rise a SINGLE frame may carry. Feedback is exponential in amplitude ⇒ linear in dB ⇒ its rise is distributed roughly evenly across the window; a musical attack / re-articulation puts almost the whole rise in one hop (the exact shape behind every one of issue #106's 72 live false positives). One half is generous to real ramps (an even N-frame ramp puts 1/(N−1) per hop) and fatal to steps. A side effect worth knowing: a 2-sample window can never pass (one hop IS the whole rise), so confirmation always rests on at least three frames of actual ramp evidence.
787
+ * @see data/kernels/fbs.json
788
+ */
789
+ export const GROWTH_MAX_SINGLE_FRAME_SHARE = 0.5;
790
+
791
+ /**
792
+ * How many CONSECUTIVE frames the ramp gate (`omx_fbs_is_growing`) must hold before a bin confirms — the time-domain tiebreak for the one shape a single window cannot judge (issue #106): a smooth musical crescendo. Within one window a +6 dB swell (live corpus: a C6 at 1 049 Hz, `[-53.7, -51.4, -50.4, -48, -47.3]`) is indistinguishable from slow feedback — the difference is only visible on the NEXT hop, where a crescendo peaks and plateaus (the window's rise collapses) while feedback keeps climbing. Requiring the gate to hold twice in a row costs a clean ramp nothing — its gate is already true while persistence is still arming — and blocks the swell that peaks the very frame it would have confirmed.
793
+ * @see data/kernels/fbs.json
794
+ */
795
+ export const GROWTH_CONFIRM_FRAMES = 2;
796
+
797
+ /**
798
+ * The corpus-tuned SAFE DEFAULT — today's exact gates, assembled byte-for-byte from the exported consts above (which stay the authoritative literal source, so the corpus test's import type { MagnitudeSeries } from './spectrum-bands.js'; imports remain the single truth). This is the ANCHOR the whole sensitivity mapping pins to: thresholdsFor`(0, 'live')` and `(0, 'fixed')` both deep-equal this object, so an untouched channel runs the identical detector it does now. `plateauFloorDb` is omitted ⇒ the #140 plateau route is OFF at the default.
799
+ * @see data/kernels/fbs.json
800
+ */
801
+ export const DEFAULT_THRESHOLDS = {
802
+ "paprDb": 18,
803
+ "pnprDb": 12,
804
+ "phprDb": 9,
805
+ "persistFrames": 5,
806
+ "growthConfirmFrames": 2,
807
+ "subCleanFrames": 5,
808
+ "growthMinTotalRiseDb": 6,
809
+ "growthMaxSingleFrameShare": 0.5,
810
+ "growthMinDbPerFrame": 0.8,
811
+ "growthMaxDipDb": 0.5,
812
+ "pshrMinDb": 10
813
+ };
814
+
815
+ /**
816
+ * THE NOTCH DEPTH LAW: the deepest cut any machine planter may propose from one reading, in dB. A number, not a literal at the call site, because two planters now lean on it. FBS derives a candidate's depth from the peak-to-average ratio around its bin and stops here; Room Analysis derives a mode's depth from its height above the median curve and is held to the SAME ceiling (2026-09-08-room-analysis.md §4 — "never more than the FBS notch depth law"). Written twice as `18` those two bounds would be equal by coincidence and could drift apart in silence. It is a CEILING ON THE PROPOSAL, not the final gain: a band that lands as a rampable BELL is bounded again by `EQ_GAIN_RANGE`, which is tighter. A planter must honour both and REPORT when either bit, never quietly deliver a shallower cut than it was asked for.
817
+ * @see data/kernels/fbs.json
818
+ */
819
+ export const FBS_MAX_NOTCH_DEPTH_DB = 18;
820
+
821
+ /**
822
+ * Default planted-notch width (Q) — the dbx-AFS-style ultra-narrow notch the corrector plants. `addBand`'s per-shape clamp holds it at 116 for a fixed notch and narrows it to 8 for a live bell, so this is the declared starting point rather than the width every notch ends up with.
823
+ * @see data/kernels/fbs.json
824
+ */
825
+ export const FBS_DEFAULT_NOTCH_Q = 116;
826
+
827
+ /**
828
+ * Default per-channel cap on auto-planted bands — a full pool plants nothing and raises a pool-full alert instead (predictability over silent eviction).
829
+ * @see data/kernels/fbs.json
830
+ */
831
+ export const FBS_DEFAULT_MAX_AUTO_BANDS = 6;
832
+
506
833
  /**
507
834
  * The flanger's jet sweep (§3b).
508
835
  * @see data/kernels/flanger.json
@@ -555,6 +882,18 @@ export const FLANGER_MIX_RANGE = {
555
882
  "defaultFrom": "desk"
556
883
  };
557
884
 
885
+ /**
886
+ * The flanger's base delay, ms: the sweep rides on it up to the depth.
887
+ * @see data/kernels/flanger.json
888
+ */
889
+ export const FLANGER_BASE_MS = 0.5;
890
+
891
+ /**
892
+ * The longest delay a flanger sweep reaches, rounded up to whole ms: the base delay plus the depth maximum. The delay line is sized from it.
893
+ * @see data/kernels/flanger.json
894
+ */
895
+ export const FLANGER_MAX_MS = 6;
896
+
558
897
  /**
559
898
  * The legal range of each gate field (engineering units). The widget clamps drags to these, `normalizeGate` enforces them, the row's codec refuses by them and the travel sheet publishes them — one source of truth. `rangeDb` reaches GATE_RANGE_FLOOR_DB, shown as "−∞" in readouts (a gate fully closed is silence).
560
899
  * @see data/kernels/gate.json
@@ -634,6 +973,15 @@ export const GATE_LIMITS = {
634
973
  }
635
974
  };
636
975
 
976
+ /**
977
+ * Where the gate listens: its own input (self), or the key it is handed (sidechain), in the order of the integer the key port carries.
978
+ * @see data/kernels/gate.json
979
+ */
980
+ export const GATE_KEY_SOURCES = [
981
+ "self",
982
+ "sidechain"
983
+ ];
984
+
637
985
  /**
638
986
  * One graphic-EQ fader's travel: EQ_GAIN_RANGE by reference (a graphic fader is an EQ gain), with the come-up value it needs as a row field — flat, 0 dB (graphic-eq-31 spec §3).
639
987
  * @see data/kernels/geq.json
@@ -665,6 +1013,66 @@ export const GEQ_PROTO_DB = 12;
665
1013
  */
666
1014
  export const GEQ_DESIGN_GAIN_MAX_DB = 30;
667
1015
 
1016
+ /**
1017
+ * The largest automatic cut HRP may place on one harmonic, as a POSITIVE dB magnitude. Well inside the ±15 dB an operator band may hold (core's `EQ_GAIN_LIMIT_DB`): an automatic correction the operator did not ask for gets far less authority than one they dialled themselves.
1018
+ * @see data/kernels/hrp.json
1019
+ */
1020
+ export const HRP_MAX_CUT_DB = 6;
1021
+
1022
+ /**
1023
+ * How many simultaneous musical voices the detector may report on one channel. PINNED to `OMX_HRP_MAX_VOICES` in `pipewire-native/src/hrp_pitch.h` — the C voice set is a FIXED-SIZE array, so a TS number above the macro promises voices the analyser structurally cannot return, and one below it silently drops notes the C already found. `core/src/output-delay-ceiling.test.ts` reads the header and holds the pair equal. EIGHT (operator sizing, 2026-09-01): a guitar sounds six strings, a piano or string-section voicing sits at eight. It is a SEARCH ceiling, not a cost — the detector abandons a round as soon as no credible candidate remains, so monophonic material costs what it always did.
1024
+ * @see data/kernels/hrp.json
1025
+ */
1026
+ export const HRP_MAX_VOICES = 8;
1027
+
1028
+ /**
1029
+ * The Q of an HRP correction band — one declared number, operator-adjustable later. A musical cut, not a ring killer: FBS's default notch Q is ~116 because a howl is a single frequency, whereas a partial that is too loud is a note an instrument is playing and a surgical null on it would be heard as a hole. 5 sits mid-band in the 4…6 range a musical subtractive cut occupies, and inside EQ_Q_RANGE — the gain-carrying shapes' extent — so it survives the store's clamp unchanged. Deliberately NOT derived from the harmonic index. A derivation invented with no measurement behind it is a second declaration wearing a formula; this is revisited when the analyse-only surface shows what real corrections look like.
1030
+ * @see data/kernels/hrp.json
1031
+ */
1032
+ export const HRP_BAND_Q = 5;
1033
+
1034
+ /**
1035
+ * How far a partial must stand above its LEARNED BASELINE before HRP calls it a resonance (increment 8, §23–§24: `deviation = measured − baseline[note][harmonic]`). A partial level tells you nothing on its own; what marks a resonance is a partial louder than THIS instrument normally measures at THIS note. Three decibels is the same order as the feedback detector's peak-to-neighbour gate and for the same reason: below it, an ordinary performance's variation — a bow dug in, a verse sung harder — would be flattened, and flattening expression is not correcting a room. (Before the learned model existed this same threshold gated the placeholder neighbour rule; the number and its reasoning carried over.)
1036
+ * @see data/kernels/hrp.json
1037
+ */
1038
+ export const HRP_EXCESS_THRESHOLD_DB = 3;
1039
+
1040
+ /**
1041
+ * How far ONE reconcile pass may move an HRP band's gain, in dB — §48's gain smoothing, done at the control level because the native cascade applies pushed coefficients verbatim and §48 forbids interpolating there. An unbounded gain step is a waveform discontinuity — the click heard when a correction entered or left at full depth (found live, 2026-08-20, the evening increment 9 raised the enter/leave rate). Bounded, a correction ENTERS by deepening from silence and LEAVES by walking to exactly 0 dB — the provable parked identity (`eqBandIsIdentity`) — from which removal is bit-identical. Two decibels per pass at the corrector's 10 Hz cadence walks the full HRP_MAX_CUT_DB travel in ~300 ms: the same order as the tracker's stability hold and FBS's lift steps, while each individual move stays below audibility on a Q-5 bell.
1042
+ * @see data/kernels/hrp.json
1043
+ */
1044
+ export const HRP_GAIN_STEP_DB = 2;
1045
+
1046
+ /**
1047
+ * How close two correction candidates must sit, in cents, to count as the SAME spectral region (§30): within it, the stronger candidate is selected and the weaker discarded rather than two near-identical filters being planted. One semitone, and the number follows from HRP_BAND_Q: a Q-5 bell's −3 dB half-width is ~170 cents, so two cuts a semitone apart overlap over most of their travel — the second one deepens the first far more than it shapes anything of its own. The spec orders the threshold configurable and tested (§30's last line): declared once here, a parameter everywhere below.
1048
+ * @see data/kernels/hrp.json
1049
+ */
1050
+ export const HRP_COLLISION_CENTS = 100;
1051
+
1052
+ /**
1053
+ * The ATTRIBUTION window (§11): two partials closer than this are one spectral event as far as the desk can tell — the same ±1 bin `omx_hrp_bin_peak` reads over, expressed musically so it holds across the range. A different law from HRP_COLLISION_CENTS (§30's SELECTION window, which stays above it): this one is the analyser's resolution, that one the corrector's. Generated into `omx_contract_limits.h` as `OMX_HRP_ATTRIBUTION_CENTS`; `hrp_attribute.h` reads it.
1054
+ * @see data/kernels/hrp.json
1055
+ */
1056
+ export const HRP_ATTRIBUTION_CENTS = 60;
1057
+
1058
+ /**
1059
+ * How many bands HRP may plant on ONE channel — its half of the machine budget, and the number that makes the budget FORECASTABLE rather than emergent. Without it the count is whatever the material happens to provoke: the placement law is sparse, so a clean note plants two bands and a resonant room plants nine, and nobody can answer "will this fit?" until it does not. With FBS senior (§9.3(b)) that discovery would happen at showtime, to the junior planter, silently. Declared instead, the whole sum is arithmetic an operator can read before a note is played: operator bands + FBS maxAutoBands + HRP maxAutoBands <= EQ_MAX_BANDS EIGHT — ONE CORRECTION PER VOICE at full polyphony (operator sizing, 2026-09-01). The detector's ceiling is HRP_MAX_VOICES voices, a guitar's six strings and a piano/string voicing's eight, and a budget below the voice count would decide by arithmetic which of the notes actually sounding may be corrected — a limit nobody could read off the desk. Scarcity is handled where it belongs instead: the candidates from every voice meet in ONE globally ranked list (spec §29) and the head of it is what gets planted. It is NOT a claim to seniority, and it is larger than FBS's six. Seniority is the ALLOCATION ORDER — `HrpPlanter` takes only `EQ_MAX_BANDS − others.length`, the remainder after the operator and every other machine — so a bigger junior default cannot reach a senior slot; it only means HRP asks for more of what is left. `eq-budget-fits.test.ts` asserts both halves. The per-channel DEFAULT; the row's travel is HRP_AUTO_BANDS_RANGE, so a channel that needs more can have more, as an explicit decision with a visible cost.
1060
+ * @see data/kernels/hrp.json
1061
+ */
1062
+ export const HRP_DEFAULT_MAX_AUTO_BANDS = 8;
1063
+
1064
+ /**
1065
+ * How much of the computed correction HRP applies: 0 = analyse only, 1 = the full cut. It comes up at 0.5, half the computed cut.
1066
+ * @see data/kernels/hrp.json
1067
+ */
1068
+ export const HRP_AMOUNT_RANGE = {
1069
+ "min": 0,
1070
+ "max": 1,
1071
+ "step": 0,
1072
+ "unit": "",
1073
+ "default": 0.5
1074
+ };
1075
+
668
1076
  /**
669
1077
  * The precision limiter's travels (`2026-09-27-precision-limiter.md` §2), rendered into `omx_contract_limits.h` as `OMX_LIMITER_*` by `harness/contract-limits-gen.mjs`, so `mix_limiter.h` reads them and never restates one (R-094). The ceiling is a TRUE peak in dBFS (the ×4 detector); the look-ahead sets the declared latency; the release is the envelope's time constant on the gain depth.
670
1078
  * @see data/kernels/limiter.json
@@ -696,6 +1104,12 @@ export const LIMITER_LIMITS = {
696
1104
  }
697
1105
  };
698
1106
 
1107
+ /**
1108
+ * The input cap a summing bus can be sized to — **the engine's declared input ceiling**, read from `@freemixer/declarations` rather than re-typed here. A gig with more than this many inputs needs more than one engine node; below it a bus is sized to `min(N, BUS_INPUT_CAP)`. It was a literal 64 until 2026-09-15, said to mirror the engine's `MAX_BUS_INPUTS` — and it did, but that 64 was the PipeWire builtin mixer's single-tier fan-in (8 × 8), never the engine's bound: the native node has allocated `OMX_MAX_STRIPS` (128) strips all along. Two literals agreeing by hand is how the console came to refuse a 96-channel desk it could carry. `native-input-ceiling.test.ts` holds this to the C header; spec `docs/design/specs/2026-09-14-console-allocation.md` §9 carries the ruling and the measured cost of width.
1109
+ * @see data/kernels/mixmatrix.json
1110
+ */
1111
+ export const BUS_INPUT_CAP = 128;
1112
+
699
1113
  /**
700
1114
  * The phaser's sweep speed (§3). `omx_lfo_inc` freezes at Nyquist; this travel stays far below.
701
1115
  * @see data/kernels/phaser.json
@@ -834,6 +1248,12 @@ export const PHASER_TRAVELS = {
834
1248
  }
835
1249
  };
836
1250
 
1251
+ /**
1252
+ * The highest frequency the phaser's all-pass sweep reaches, Hz.
1253
+ * @see data/kernels/phaser.json
1254
+ */
1255
+ export const PHASER_F_TOP_HZ = 16000;
1256
+
837
1257
  /**
838
1258
  * PITCH_LIMITS, moved from openmixer.
839
1259
  * @see data/kernels/pitch.json
@@ -1025,6 +1445,24 @@ export const REVERB_GATE_THRESHOLD_RANGE = {
1025
1445
  "defaultFrom": "desk"
1026
1446
  };
1027
1447
 
1448
+ /**
1449
+ * The reverb's algorithms, in the order of the integer the kernel reads. Reverse and gated are the room network handed a window and a gate.
1450
+ * @see data/kernels/reverb.json
1451
+ */
1452
+ export const REVERB_ALGORITHMS = [
1453
+ "room",
1454
+ "plate",
1455
+ "hall",
1456
+ "reverse",
1457
+ "gated"
1458
+ ];
1459
+
1460
+ /**
1461
+ * The gated reverb's gate attack, ms: the time the gate takes to open on a hit.
1462
+ * @see data/kernels/reverb.json
1463
+ */
1464
+ export const REVERB_GATE_ATTACK_MS = 1.5;
1465
+
1028
1466
  /**
1029
1467
  * The horn's chorale (slow) rate, Hz.
1030
1468
  * @see data/kernels/rotary.json
@@ -1251,6 +1689,28 @@ export const ROTARY_STOP_EPS = 0.0001;
1251
1689
  */
1252
1690
  export const ROTARY_RING_FLOATS = 256;
1253
1691
 
1692
+ /**
1693
+ * The rotary speaker's speed settings, in the order of the integer the kernel reads: the rotors stopped, at their chorale (slow) rate, or at their tremolo (fast) rate.
1694
+ * @see data/kernels/rotary.json
1695
+ */
1696
+ export const ROTARY_SPEEDS = [
1697
+ "stop",
1698
+ "slow",
1699
+ "fast"
1700
+ ];
1701
+
1702
+ /**
1703
+ * The RTA's target bin resolution — generated into `omx_contract_limits.h` as `OMX_RTA_TARGET_BIN_HZ`, which `mix_dsp.h` reads; `rta-window-derivation.test.ts` reads it back from the header.
1704
+ * @see data/kernels/rta.json
1705
+ */
1706
+ export const RTA_TARGET_BIN_HZ = 5.9;
1707
+
1708
+ /**
1709
+ * The largest RTA FFT the native ring holds — generated into `omx_contract_limits.h` as `OMX_RTA_FFT_SIZE_MAX`.
1710
+ * @see data/kernels/rta.json
1711
+ */
1712
+ export const RTA_FFT_SIZE_MAX = 32768;
1713
+
1254
1714
  /**
1255
1715
  * The legal range of each transient-designer field (engineering units), transient spec §3. Every kind comes up flat: no per-kind default differs. `harness/contract-limits-gen.mjs` emits each as `OMX_TRANSIENT_<FIELD>_{MIN,MAX,DEFAULT}` for `mix_transient.h`'s resolve; the row publishes them on OPTIONS when it lands (issue #921).
1256
1716
  * @see data/kernels/transient.json
@@ -1392,6 +1852,15 @@ export const TREMOLO_TRAVELS = {
1392
1852
  }
1393
1853
  };
1394
1854
 
1855
+ /**
1856
+ * What the tremolo's one oscillator modulates, in the order of the integer the kernel reads: the level of both legs in phase (tremolo), or the balance law's position with the legs in opposition (pan).
1857
+ * @see data/kernels/tremolo.json
1858
+ */
1859
+ export const TREMOLO_MODES = [
1860
+ "tremolo",
1861
+ "pan"
1862
+ ];
1863
+
1395
1864
  /**
1396
1865
  * The Q of a second-order Butterworth section, 1/√2 — maximally flat, the one value every Butterworth biquad in the tree designs at: the LR4 crossover section, the pitch pre-filter and the drive's tilt / band / HF sections, in TS and (as `OMX_BUTTERWORTH_Q`) in C (§7, the scalar door).
1397
1866
  * @see data/primitives.json
@@ -1505,6 +1974,44 @@ export const TRIM_TRAVELS = {
1505
1974
  }
1506
1975
  };
1507
1976
 
1977
+ /**
1978
+ * How a host draws a parameter: linear, logarithmic (a frequency, a time) or in discrete steps. The words omx-plugins' declarations and plugin-hostd's protocol use; a travel names its own with `scale`.
1979
+ * @see data/primitives.json
1980
+ */
1981
+ export const PARAM_SCALES = [
1982
+ "linear",
1983
+ "log",
1984
+ "stepped"
1985
+ ];
1986
+
1987
+ /**
1988
+ * The EQ's three frequency travels as a host draws them: the band frequency, the high-pass corner and the low-pass corner, EQ_FREQ_RANGE's, HPF_FREQ_RANGE's and LPF_FREQ_RANGE's bounds with no step and a logarithmic scale. The console's EQ quantises frequency to 10 Hz; a frequency drags continuously on a log axis, which is how every host draws it, so this is the form the omx-plugins read. Every number but the step is the source's, held equal by test/continuous-travels.test.mjs. Not rendered to C: no C reader needs a second spelling of the EQ's bounds.
1989
+ * @see data/primitives.json
1990
+ */
1991
+ export const EQ_CONTINUOUS_TRAVELS = {
1992
+ "freqHz": {
1993
+ "min": 20,
1994
+ "max": 20000,
1995
+ "step": 0,
1996
+ "unit": "Hz",
1997
+ "scale": "log"
1998
+ },
1999
+ "hpfFreqHz": {
2000
+ "min": 20,
2001
+ "max": 1000,
2002
+ "step": 0,
2003
+ "unit": "Hz",
2004
+ "scale": "log"
2005
+ },
2006
+ "lpfFreqHz": {
2007
+ "min": 1000,
2008
+ "max": 20000,
2009
+ "step": 0,
2010
+ "unit": "Hz",
2011
+ "scale": "log"
2012
+ }
2013
+ };
2014
+
1508
2015
  /**
1509
2016
  * The standard sample rates (Hz) the desk recognises — the pro-audio superset. One source of truth for the clock controller's `clock.allowed-rates` seed, the force row's validation ceiling and the device-rate probe fallback. What the operator is OFFERED is always the DEVICE's own `supportedRates` (`2026-07-15-clock-rate-honest-force-rate.md`) — this is the ceiling a write is refused by, never a menu.
1510
2017
  * @see data/rates.json
@@ -1532,3 +2039,178 @@ export const RT_HARD_TARGET = {
1532
2039
  * @see data/rates.json
1533
2040
  */
1534
2041
  export const DSP_KNOB_REFERENCE_RATE = 96000;
2042
+
2043
+ /**
2044
+ * The four rates every kernel oracle runs at, whatever STANDARD_SAMPLE_RATES says: a declared list missing one of them stops a suite instead of testing less (omx-dsp, omx-plugins and omx-clap-host run their oracles at these).
2045
+ * @see data/rates.json
2046
+ */
2047
+ export const ORACLE_FLOOR_RATES = [
2048
+ 44100,
2049
+ 48000,
2050
+ 96000,
2051
+ 192000
2052
+ ];
2053
+
2054
+ /**
2055
+ * The nine rates an RME interface clocks at, 32 to 192 kHz. STANDARD_SAMPLE_RATES is a subset of them; an oracle that runs here also covers 32, 64 and 128 kHz, where a kernel still has to meet its closed form even though the console never asks for them.
2056
+ * @see data/rates.json
2057
+ */
2058
+ export const RME_RATES = [
2059
+ 32000,
2060
+ 44100,
2061
+ 48000,
2062
+ 64000,
2063
+ 88200,
2064
+ 96000,
2065
+ 128000,
2066
+ 176400,
2067
+ 192000
2068
+ ];
2069
+
2070
+ /** The declared parameters of the default EQ rule: the four-band set, the preferred series, the band frequency travel, the band gain and Q. */
2071
+ const EQ_DEFAULT_RULE = {
2072
+ "four": [
2073
+ 100,
2074
+ 400,
2075
+ 2000,
2076
+ 8000
2077
+ ],
2078
+ "series": [
2079
+ [
2080
+ 20,
2081
+ 25,
2082
+ 31.5,
2083
+ 40,
2084
+ 50,
2085
+ 63,
2086
+ 80,
2087
+ 100,
2088
+ 125,
2089
+ 160,
2090
+ 200,
2091
+ 250,
2092
+ 315,
2093
+ 400,
2094
+ 500,
2095
+ 630,
2096
+ 800,
2097
+ 1000,
2098
+ 1250,
2099
+ 1600,
2100
+ 2000,
2101
+ 2500,
2102
+ 3150,
2103
+ 4000,
2104
+ 5000,
2105
+ 6300,
2106
+ 8000,
2107
+ 10000,
2108
+ 12500,
2109
+ 16000,
2110
+ 20000
2111
+ ],
2112
+ [
2113
+ 20,
2114
+ 22.4,
2115
+ 25,
2116
+ 28,
2117
+ 31.5,
2118
+ 35.5,
2119
+ 40,
2120
+ 45,
2121
+ 50,
2122
+ 56,
2123
+ 63,
2124
+ 71,
2125
+ 80,
2126
+ 90,
2127
+ 100,
2128
+ 112,
2129
+ 125,
2130
+ 140,
2131
+ 160,
2132
+ 180,
2133
+ 200,
2134
+ 224,
2135
+ 250,
2136
+ 280,
2137
+ 315,
2138
+ 355,
2139
+ 400,
2140
+ 450,
2141
+ 500,
2142
+ 560,
2143
+ 630,
2144
+ 710,
2145
+ 800,
2146
+ 900,
2147
+ 1000,
2148
+ 1120,
2149
+ 1250,
2150
+ 1400,
2151
+ 1600,
2152
+ 1800,
2153
+ 2000,
2154
+ 2240,
2155
+ 2500,
2156
+ 2800,
2157
+ 3150,
2158
+ 3550,
2159
+ 4000,
2160
+ 4500,
2161
+ 5000,
2162
+ 5600,
2163
+ 6300,
2164
+ 7100,
2165
+ 8000,
2166
+ 9000,
2167
+ 10000,
2168
+ 11200,
2169
+ 12500,
2170
+ 14000,
2171
+ 16000,
2172
+ 18000,
2173
+ 20000
2174
+ ]
2175
+ ],
2176
+ "lo": 20,
2177
+ "hi": 20000,
2178
+ "gainDb": 0,
2179
+ "q": 1
2180
+ };
2181
+ function centres(count, p) {
2182
+ if (!Number.isInteger(count) || count < 1) throw new RangeError(`eqDefaultCentres: ${count} is not a band count`);
2183
+ if (count === 4) return [...p.four];
2184
+ const targets = [];
2185
+ for (let i = 0; i < count; i++) targets.push(Math.log(p.lo) + (Math.log(p.hi / p.lo) * (i + 0.5)) / count);
2186
+ for (const series of p.series) {
2187
+ const out = targets.map((t) => {
2188
+ let best = series[0];
2189
+ let bestD = Infinity;
2190
+ for (const f of series) {
2191
+ const d = Math.abs(Math.log(f) - t);
2192
+ if (d < bestD) { bestD = d; best = f; }
2193
+ }
2194
+ return best;
2195
+ });
2196
+ if (new Set(out).size === out.length) return out;
2197
+ }
2198
+ throw new RangeError(`eqDefaultCentres: ${count} bands have no distinct preferred centres across ${p.lo}..${p.hi} Hz`);
2199
+ }
2200
+ function types(count) {
2201
+ if (!Number.isInteger(count) || count < 1) throw new RangeError(`eqDefaultTypes: ${count} is not a band count`);
2202
+ return Array.from({ length: count }, (_, i) => (count === 1 ? 'bell' : i === 0 ? 'lowShelf' : i === count - 1 ? 'highShelf' : 'bell'));
2203
+ }
2204
+ function bands(count, p) {
2205
+ const types = eqDefaultTypes(count);
2206
+ return eqDefaultCentres(count, p).map((freqHz, i) => ({ type: types[i], freqHz, gainDb: p.gainDb, q: p.q }));
2207
+ }
2208
+
2209
+ /** The default band centres (Hz) of an EQ with `count` bands: THE one rule, for every strip, host and count. */
2210
+ export function eqDefaultCentres(count) { return centres(count, EQ_DEFAULT_RULE); }
2211
+
2212
+ /** The default band types, by EQ_BAND_TYPES id: a low shelf, bells, a high shelf (a single band is a bell). */
2213
+ export function eqDefaultTypes(count) { return types(count); }
2214
+
2215
+ /** Every default band of an EQ with `count` bands: type, centre, gain and Q. */
2216
+ export function eqDefaultBands(count) { return bands(count, EQ_DEFAULT_RULE); }