@openmixer/omx-contract 0.0.0 → 1.0.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.
- package/LICENSE +674 -0
- package/README.md +50 -5
- package/bin/omx-contract.mjs +175 -0
- package/data/kernels/chorus.json +15 -0
- package/data/kernels/comp.json +81 -0
- package/data/kernels/delay.json +66 -0
- package/data/kernels/drive.json +12 -0
- package/data/kernels/eq.json +59 -0
- package/data/kernels/gate.json +81 -0
- package/data/kernels/limiter.json +33 -0
- package/data/kernels/pitch.json +35 -0
- package/data/kernels/reverb.json +15 -0
- package/data/kernels/transient.json +73 -0
- package/data/plugins/delay.json +48 -0
- package/data/primitives.json +47 -0
- package/data/rates.json +30 -0
- package/dist/ts/omx-contract.d.ts +517 -0
- package/dist/ts/omx-contract.js +562 -0
- package/include/omxcontract/omx_contract_limits.h +201 -0
- package/include/omxcontract/params/omx_delay_params.h +47 -0
- package/include/omxcontract/params/omx_plugin_param.h +25 -0
- package/lib/data.mjs +182 -0
- package/lib/fmt.mjs +63 -0
- package/lib/semver.mjs +124 -0
- package/lib/validate.mjs +107 -0
- package/package.json +44 -4
- package/render/c/contract-limits-render.mjs +370 -0
- package/render/c/omx_plugin_param.h +25 -0
- package/render/c/params-generate.mjs +83 -0
- package/render/c.mjs +104 -0
- package/render/doors.mjs +64 -0
- package/render/json.mjs +16 -0
- package/render/ts.mjs +42 -0
- package/schema/omx-contract.schema.json +194 -0
- package/share/omx-contract/omx-contract.json +597 -0
package/README.md
CHANGED
|
@@ -1,7 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
|
|
2
|
+
<!-- Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com> -->
|
|
3
|
+
# omx-contract
|
|
2
4
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
+
The FreeMixer declarations as data: what a value may be (a travel, a default, a kernel constant, a
|
|
6
|
+
list, a plugin's parameter selection), as JSON validated by a JSON Schema, rendered by one CLI into
|
|
7
|
+
every language that reads it. Governed by openmixer's
|
|
8
|
+
`docs/design/specs/2026-10-05-omx-contract.md`; 1.0.0 carries the phase-1 items of its §4.1, what
|
|
9
|
+
omx-dsp needs.
|
|
5
10
|
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
```
|
|
12
|
+
data/ the declaration, one file per group, edited by hand
|
|
13
|
+
rates.json primitives.json kernels/<kernel>.json plugins/<plugin>.json
|
|
14
|
+
schema/omx-contract.schema.json JSON Schema 2020-12: five kinds, closed units, refs, closed derivations
|
|
15
|
+
bin/omx-contract.mjs the CLI
|
|
16
|
+
render/ c.mjs (openmixer's renderer, moved unchanged, under c/), ts.mjs, json.mjs
|
|
17
|
+
include/omxcontract/ the committed c render (what omx-contract-devel installs)
|
|
18
|
+
share/omx-contract/ the committed json render (resolved data)
|
|
19
|
+
test/ schema, semantic checks, goldens, perturbation, semver, round trip
|
|
20
|
+
tools/proof/round-trip.mjs the spec §4.4 steps 1 and 2 proof against omx-dsp v0.1.3
|
|
21
|
+
tools/seed/ the one-time seed from openmixer's built core (provenance; never run by CI)
|
|
22
|
+
packaging/ debian/ omx-contract-devel (RPM), libomx-contract-dev (deb)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## The CLI
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
npm ci
|
|
29
|
+
node bin/omx-contract.mjs validate # schema + semantic checks
|
|
30
|
+
node bin/omx-contract.mjs fmt [--check] # the one formatting
|
|
31
|
+
node bin/omx-contract.mjs render --target c|ts|json --out <dir> [--check]
|
|
32
|
+
node bin/omx-contract.mjs semver <previous tag> # exit 1 if the version bump is short
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Exit 0 is a pass, 1 a failure naming file, item and rule, 2 a usage or environment error. A change to
|
|
36
|
+
`data/` is followed by `render --target c --out include`, `render --target json --out
|
|
37
|
+
share/omx-contract` and `render --target ts --out test/golden/ts`; CI holds all three to the data.
|
|
38
|
+
|
|
39
|
+
## Consuming it
|
|
40
|
+
|
|
41
|
+
Pin one version (`omx-contract 1.0.0` in `.github/pins.txt`) and build against its renders, committing
|
|
42
|
+
none: the installed `omx-contract-devel` / `libomx-contract-dev` at exactly that version
|
|
43
|
+
(`pkg-config --exact-version=1.0.0 omx-contract`), else the release's npm tarball, unpacked, and
|
|
44
|
+
`omx-contract render --target c --out build/omx-contract/include`. Include
|
|
45
|
+
`<omxcontract/omx_contract_limits.h>` and `<omxcontract/params/omx_delay_params.h>`.
|
|
46
|
+
|
|
47
|
+
The npm package is `@openmixer/omx-contract` on npmjs.org (the `ts` render is its main export); every
|
|
48
|
+
GitHub release also carries the `npm pack` tarball, the RPMs and the debs.
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
GPL-3.0-or-later. JSON cannot carry an SPDX comment; every data file is covered by `LICENSE`.
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
|
+
// Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
|
|
4
|
+
/**
|
|
5
|
+
* omx-contract — the declarations as data, validated and rendered (omx-contract spec §3.4).
|
|
6
|
+
*
|
|
7
|
+
* omx-contract validate [--data <dir>] schema + semantic checks
|
|
8
|
+
* omx-contract fmt [--check] [--data <dir>] the one formatting
|
|
9
|
+
* omx-contract render --target c|ts|json --out <dir> [--check] [--data <dir> | --sheet <fixture>]
|
|
10
|
+
* omx-contract semver <previous tag> | --from-dir <data dir> --from-version <x.y.z>
|
|
11
|
+
*
|
|
12
|
+
* Exit 0 is a pass, 1 a failure naming what failed, 2 a usage or environment error (never a pass).
|
|
13
|
+
*/
|
|
14
|
+
import { execFileSync } from 'node:child_process';
|
|
15
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
16
|
+
import { dirname, join, relative, resolve } from 'node:path';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
import { loadData, packageVersion, resolveData } from '../lib/data.mjs';
|
|
19
|
+
import { formatDoc } from '../lib/fmt.mjs';
|
|
20
|
+
import { classify, refusal } from '../lib/semver.mjs';
|
|
21
|
+
import { validateData } from '../lib/validate.mjs';
|
|
22
|
+
import { renderC, renderSheetC } from '../render/c.mjs';
|
|
23
|
+
import { renderJson } from '../render/json.mjs';
|
|
24
|
+
import { renderTs } from '../render/ts.mjs';
|
|
25
|
+
|
|
26
|
+
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
27
|
+
|
|
28
|
+
class Usage extends Error {}
|
|
29
|
+
|
|
30
|
+
function opt(argv, name) {
|
|
31
|
+
const i = argv.indexOf(name);
|
|
32
|
+
if (i < 0) return undefined;
|
|
33
|
+
if (i + 1 >= argv.length || argv[i + 1].startsWith('--')) throw new Usage(`${name} needs a value`);
|
|
34
|
+
return argv[i + 1];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function load(argv) {
|
|
38
|
+
const dir = resolve(opt(argv, '--data') ?? join(ROOT, 'data'));
|
|
39
|
+
if (!existsSync(dir)) throw new Usage(`no data directory ${dir}`);
|
|
40
|
+
return loadData(dir);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Every file under `dir`, relative to it. */
|
|
44
|
+
function filesUnder(dir) {
|
|
45
|
+
if (!existsSync(dir)) return [];
|
|
46
|
+
const out = [];
|
|
47
|
+
const walk = (d) => {
|
|
48
|
+
for (const f of readdirSync(d)) {
|
|
49
|
+
const p = join(d, f);
|
|
50
|
+
if (statSync(p).isDirectory()) walk(p);
|
|
51
|
+
else out.push(relative(dir, p));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
walk(dir);
|
|
55
|
+
return out.sort();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function cmdValidate(argv) {
|
|
59
|
+
const data = load(argv);
|
|
60
|
+
const problems = validateData(data);
|
|
61
|
+
for (const p of problems) console.error(`${p.file}: ${p.item}: ${p.rule}: ${p.message}`);
|
|
62
|
+
if (problems.length) return 1;
|
|
63
|
+
console.log(`omx-contract validate: ${data.items.size} items in ${data.files.length} files, valid`);
|
|
64
|
+
return 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function cmdFmt(argv) {
|
|
68
|
+
const dir = resolve(opt(argv, '--data') ?? join(ROOT, 'data'));
|
|
69
|
+
const data = load(argv);
|
|
70
|
+
const check = argv.includes('--check');
|
|
71
|
+
let bad = 0;
|
|
72
|
+
for (const f of data.files) {
|
|
73
|
+
const want = formatDoc(f.doc);
|
|
74
|
+
if (want === f.text) continue;
|
|
75
|
+
if (check) { console.error(`omx-contract fmt --check: ${f.rel} is not in the one formatting`); bad++; } else writeFileSync(join(dir, '..', f.rel), want);
|
|
76
|
+
}
|
|
77
|
+
if (bad) return 1;
|
|
78
|
+
console.log(`omx-contract fmt${check ? ' --check' : ''}: ${data.files.length} files formatted`);
|
|
79
|
+
return 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function renderTarget(target, argv) {
|
|
83
|
+
const sheet = opt(argv, '--sheet');
|
|
84
|
+
if (sheet) {
|
|
85
|
+
if (target !== 'c') throw new Usage('--sheet renders the c target only');
|
|
86
|
+
return renderSheetC(JSON.parse(readFileSync(resolve(sheet), 'utf8')));
|
|
87
|
+
}
|
|
88
|
+
const data = load(argv);
|
|
89
|
+
const resolved = resolveData(data);
|
|
90
|
+
if (target === 'c') return renderC(resolved);
|
|
91
|
+
if (target === 'ts') return renderTs(resolved);
|
|
92
|
+
if (target === 'json') return renderJson(resolved, packageVersion(ROOT));
|
|
93
|
+
throw new Usage(`unknown target ${target} (c, ts, json)`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function cmdRender(argv) {
|
|
97
|
+
const target = opt(argv, '--target');
|
|
98
|
+
const out = opt(argv, '--out');
|
|
99
|
+
if (!target || !out) throw new Usage('render needs --target <c|ts|json> and --out <dir>');
|
|
100
|
+
const files = renderTarget(target, argv);
|
|
101
|
+
const dir = resolve(out);
|
|
102
|
+
if (argv.includes('--check')) {
|
|
103
|
+
const bad = [];
|
|
104
|
+
for (const f of files) {
|
|
105
|
+
const p = join(dir, f.path);
|
|
106
|
+
if (!existsSync(p)) bad.push(`${f.path} is missing`);
|
|
107
|
+
else if (readFileSync(p, 'utf8') !== f.text) bad.push(`${f.path} differs`);
|
|
108
|
+
}
|
|
109
|
+
const scope = target === 'c' ? 'omxcontract' : '';
|
|
110
|
+
const named = new Set(files.map((f) => f.path));
|
|
111
|
+
for (const rel of filesUnder(join(dir, scope))) if (!named.has(join(scope, rel))) bad.push(`${join(scope, rel)} is extra`);
|
|
112
|
+
for (const b of bad) console.error(`omx-contract render --check: ${out.replace(/\/$/, '')}/${b}`);
|
|
113
|
+
if (bad.length) return 1;
|
|
114
|
+
console.log(`omx-contract render --target ${target} --check: ${files.length} files byte-identical under ${out}`);
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
117
|
+
for (const f of files) {
|
|
118
|
+
mkdirSync(dirname(join(dir, f.path)), { recursive: true });
|
|
119
|
+
writeFileSync(join(dir, f.path), f.text);
|
|
120
|
+
}
|
|
121
|
+
console.log(`omx-contract render --target ${target}: wrote ${files.length} files under ${out}`);
|
|
122
|
+
return 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** The data of a git tag, as `{ rel: text }`. */
|
|
126
|
+
function dataAtTag(tag) {
|
|
127
|
+
const git = (...a) => execFileSync('git', ['-C', ROOT, ...a], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
128
|
+
try { git('rev-parse', '--verify', `${tag}^{commit}`); } catch { throw new Usage(`no tag ${tag} in ${ROOT}`); }
|
|
129
|
+
const texts = {};
|
|
130
|
+
for (const rel of git('ls-tree', '-r', '--name-only', tag, '--', 'data').split('\n').filter((p) => p.endsWith('.json'))) texts[rel] = git('show', `${tag}:${rel}`);
|
|
131
|
+
return texts;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function cmdSemver(argv) {
|
|
135
|
+
const fromDir = opt(argv, '--from-dir');
|
|
136
|
+
let prev;
|
|
137
|
+
let from;
|
|
138
|
+
if (fromDir) {
|
|
139
|
+
from = opt(argv, '--from-version');
|
|
140
|
+
if (!from) throw new Usage('--from-dir needs --from-version');
|
|
141
|
+
prev = loadData(resolve(fromDir));
|
|
142
|
+
} else {
|
|
143
|
+
const tag = argv[1];
|
|
144
|
+
if (!tag || tag.startsWith('--')) throw new Usage('semver needs the previous tag');
|
|
145
|
+
from = tag;
|
|
146
|
+
prev = loadData(null, dataAtTag(tag));
|
|
147
|
+
}
|
|
148
|
+
const to = opt(argv, '--version') ?? packageVersion(ROOT);
|
|
149
|
+
const { level, changes } = classify(resolveData(prev), resolveData(load(argv)));
|
|
150
|
+
for (const c of changes) console.log(`${c.level.toUpperCase()} ${c.item}: ${c.what}`);
|
|
151
|
+
const why = refusal(level, from, to);
|
|
152
|
+
console.log(JSON.stringify({ from: from.replace(/^v/, ''), to, level, changes: changes.length, ok: !why }));
|
|
153
|
+
if (why) { console.error(`omx-contract semver: ${why}`); return 1; }
|
|
154
|
+
return 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const USAGE = `usage: omx-contract validate [--data <dir>]
|
|
158
|
+
omx-contract fmt [--check] [--data <dir>]
|
|
159
|
+
omx-contract render --target c|ts|json --out <dir> [--check] [--data <dir> | --sheet <fixture.json>]
|
|
160
|
+
omx-contract semver <previous tag> | --from-dir <data dir> --from-version <x.y.z> [--version <x.y.z>]`;
|
|
161
|
+
|
|
162
|
+
export function main(argv) {
|
|
163
|
+
const cmds = { validate: cmdValidate, fmt: cmdFmt, render: cmdRender, semver: cmdSemver };
|
|
164
|
+
try {
|
|
165
|
+
const cmd = cmds[argv[0]];
|
|
166
|
+
if (!cmd) throw new Usage(argv[0] ? `unknown command ${argv[0]}` : 'no command');
|
|
167
|
+
return cmd(argv);
|
|
168
|
+
} catch (e) {
|
|
169
|
+
if (e instanceof Usage) { console.error(`omx-contract: ${e.message}\n${USAGE}`); return 2; }
|
|
170
|
+
console.error(`omx-contract: ${e.message}`);
|
|
171
|
+
return 1;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) process.exitCode = main(process.argv.slice(2));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"CHORUS_SPREAD_RANGE": {
|
|
4
|
+
"kind": "travels",
|
|
5
|
+
"doc": "The chorus's right-leg phase offset, in TURNS of its one oscillator (§2, §3a; the native-FX catalogue's M32 Dimension row). The right leg's voice k reads the LFO at k/N + spread: 0 is both legs one phase (the stage without the field, bit for bit), 0.25 quadrature, 0.5 the Dimension's opposed sweep. A fraction of a cycle carries no engineering symbol, so the unit is ''.",
|
|
6
|
+
"travel": {
|
|
7
|
+
"min": 0,
|
|
8
|
+
"max": 0.5,
|
|
9
|
+
"step": 0.01,
|
|
10
|
+
"unit": "",
|
|
11
|
+
"default": 0,
|
|
12
|
+
"defaultFrom": "desk"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"COMP_LIMITS": {
|
|
4
|
+
"kind": "travels",
|
|
5
|
+
"doc": "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.",
|
|
6
|
+
"fields": {
|
|
7
|
+
"thresholdDb": {
|
|
8
|
+
"min": -60,
|
|
9
|
+
"max": 0,
|
|
10
|
+
"step": 1,
|
|
11
|
+
"unit": "dB",
|
|
12
|
+
"default": -18,
|
|
13
|
+
"defaultFrom": "desk"
|
|
14
|
+
},
|
|
15
|
+
"ratio": {
|
|
16
|
+
"min": 1,
|
|
17
|
+
"max": 20,
|
|
18
|
+
"step": 0.5,
|
|
19
|
+
"unit": "",
|
|
20
|
+
"default": 4,
|
|
21
|
+
"defaultFrom": "desk"
|
|
22
|
+
},
|
|
23
|
+
"kneeDb": {
|
|
24
|
+
"min": 0,
|
|
25
|
+
"max": 24,
|
|
26
|
+
"step": 0.5,
|
|
27
|
+
"unit": "dB",
|
|
28
|
+
"default": 6,
|
|
29
|
+
"defaultFrom": "desk"
|
|
30
|
+
},
|
|
31
|
+
"attackMs": {
|
|
32
|
+
"min": 0.1,
|
|
33
|
+
"max": 100,
|
|
34
|
+
"step": 1,
|
|
35
|
+
"unit": "ms",
|
|
36
|
+
"default": 5,
|
|
37
|
+
"defaultFrom": "desk"
|
|
38
|
+
},
|
|
39
|
+
"releaseMs": {
|
|
40
|
+
"min": 5,
|
|
41
|
+
"max": 3000,
|
|
42
|
+
"step": 10,
|
|
43
|
+
"unit": "ms",
|
|
44
|
+
"default": 200,
|
|
45
|
+
"defaultFrom": "desk"
|
|
46
|
+
},
|
|
47
|
+
"makeupDb": {
|
|
48
|
+
"min": 0,
|
|
49
|
+
"max": 24,
|
|
50
|
+
"step": 0.5,
|
|
51
|
+
"unit": "dB",
|
|
52
|
+
"default": 0,
|
|
53
|
+
"defaultFrom": "desk"
|
|
54
|
+
},
|
|
55
|
+
"mixPct": {
|
|
56
|
+
"min": 0,
|
|
57
|
+
"max": 100,
|
|
58
|
+
"step": 5,
|
|
59
|
+
"unit": "%",
|
|
60
|
+
"default": 100,
|
|
61
|
+
"defaultFrom": "desk"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"PROGRAM_RELEASE": {
|
|
66
|
+
"kind": "sheet",
|
|
67
|
+
"doc": "The program-dependent release's model constants — the LA-2A's opto cell as DATA (`docs/design/specs/2026-09-26-compressor-models.md` §3b). `chargeMs`/`dischargeMs` are the word's memory constants, shared by every profile; each profile's `fastMs`, `slowMinMs`, `slowMaxMs` and `share` fit the unit's published two-stage recovery. Not operator controls: generated into `omx_contract_limits.h` as `OMX_PROGRAM_RELEASE_*`, which libomxdsp's `omx_env_program_release` reads.",
|
|
68
|
+
"value": {
|
|
69
|
+
"chargeMs": 1000,
|
|
70
|
+
"dischargeMs": 5000,
|
|
71
|
+
"profiles": {
|
|
72
|
+
"opto": {
|
|
73
|
+
"fastMs": 70,
|
|
74
|
+
"slowMinMs": 110,
|
|
75
|
+
"slowMaxMs": 1100,
|
|
76
|
+
"share": 0.5
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"FX_DELAY_TIME_RANGE": {
|
|
4
|
+
"kind": "travels",
|
|
5
|
+
"doc": "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.",
|
|
6
|
+
"travel": {
|
|
7
|
+
"min": 0,
|
|
8
|
+
"max": 2000,
|
|
9
|
+
"step": 1,
|
|
10
|
+
"unit": "ms",
|
|
11
|
+
"default": 300,
|
|
12
|
+
"defaultFrom": "desk"
|
|
13
|
+
},
|
|
14
|
+
"c": {
|
|
15
|
+
"alias": {
|
|
16
|
+
"fact": "delay",
|
|
17
|
+
"field": "timeMs"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"FX_DELAY_FEEDBACK_RANGE": {
|
|
22
|
+
"kind": "travels",
|
|
23
|
+
"doc": "The FX delay's REGENERATION travel — how much of the wet tail feeds back in. Stops short of 1: unity feedback is a runaway the kernel hard-clamps anyway, so offering it would draw travel the DSP refuses. Not NORMALIZED_RANGE for exactly that reason — it is a 0..1 quantity whose top the DSP does not accept, and a control must not offer a value its actuator will eat.",
|
|
24
|
+
"travel": {
|
|
25
|
+
"min": 0,
|
|
26
|
+
"max": 0.99,
|
|
27
|
+
"step": 0,
|
|
28
|
+
"unit": "",
|
|
29
|
+
"default": 0.3,
|
|
30
|
+
"defaultFrom": "desk"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"DELAY_TONE_RANGE": {
|
|
34
|
+
"kind": "travels",
|
|
35
|
+
"doc": "The FX delay's TONE — a NORMALIZED_RANGE instance with its own come-up value, matching `DEFAULT_DELAY_STATE.tone`. See REVERB_SIZE_RANGE for why this is a named constant rather than a default on the shared shape.",
|
|
36
|
+
"travel": {
|
|
37
|
+
"min": 0,
|
|
38
|
+
"max": 1,
|
|
39
|
+
"step": 0,
|
|
40
|
+
"unit": "",
|
|
41
|
+
"default": 0.3,
|
|
42
|
+
"defaultFrom": "desk"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"DELAY_MIX_RANGE": {
|
|
46
|
+
"kind": "travels",
|
|
47
|
+
"doc": "The FX DELAY's wet/dry — the same split as REVERB_MIX_RANGE, its own declaration.",
|
|
48
|
+
"travel": {
|
|
49
|
+
"min": 0,
|
|
50
|
+
"max": 1,
|
|
51
|
+
"step": 0,
|
|
52
|
+
"unit": "",
|
|
53
|
+
"default": 0.3,
|
|
54
|
+
"defaultFrom": "desk",
|
|
55
|
+
"byKind": {
|
|
56
|
+
"fxReturn": 1
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"FX_DELAY_PINGPONG_DEFAULT": {
|
|
61
|
+
"kind": "scalar",
|
|
62
|
+
"doc": "The FX delay's PING-PONG come-up value — a toggle, so it has no travel, only this. Declared here rather than as a literal in the server's `DEFAULT_DELAY_STATE` (which now reads it) so the DPF plugin generator (`packages/omx-plugins/tools/params-gen.mjs`, `2026-09-25-omx-plugins-dpf.md` §3a) reads the same fact the desk seeds a fresh strip with.",
|
|
63
|
+
"unit": "",
|
|
64
|
+
"value": false
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"DRIVE_BIAS_MAX": {
|
|
4
|
+
"kind": "scalar",
|
|
5
|
+
"doc": "The bias at `character = +1`, in the SHAPER's own input units — `OMX_DRIVE_BIAS_MAX`. DERIVED, not chosen (§4b). In the saturating limit every knee tends to `sgn`, the output is a rectangular wave of duty `d = ½ + asin(b)/π`, and its `n`th harmonic goes as `sin(nπd)/n` — so `|H2|` is maximal at `d = ¾`, which is `b = sin(π/4) = 1/√2` exactly. Measured too: the H2-maximising bias for a full-scale sine at unity drive is 0.712 (soft), 0.658 (tape), 0.645 (tube), and this one value costs 0.000 / 0.035 / 0.088 dB of H2 against each curve's own optimum. ONE normalised bias for all three knees, not three.",
|
|
6
|
+
"unit": "",
|
|
7
|
+
"value": {
|
|
8
|
+
"derive": "sqrt",
|
|
9
|
+
"of": 0.5
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"EQ_MAX_BANDS": {
|
|
4
|
+
"kind": "scalar",
|
|
5
|
+
"doc": "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.",
|
|
6
|
+
"unit": "",
|
|
7
|
+
"value": 24
|
|
8
|
+
},
|
|
9
|
+
"ISO_THIRD_OCTAVE_CENTRES_HZ": {
|
|
10
|
+
"kind": "list",
|
|
11
|
+
"doc": "The standard ISO 266 one-third-octave centre frequencies, 20 Hz–20 kHz (31 bands) — the classic 31-band graphic-EQ layout's centres.",
|
|
12
|
+
"unit": "Hz",
|
|
13
|
+
"values": [
|
|
14
|
+
20,
|
|
15
|
+
25,
|
|
16
|
+
31.5,
|
|
17
|
+
40,
|
|
18
|
+
50,
|
|
19
|
+
63,
|
|
20
|
+
80,
|
|
21
|
+
100,
|
|
22
|
+
125,
|
|
23
|
+
160,
|
|
24
|
+
200,
|
|
25
|
+
250,
|
|
26
|
+
315,
|
|
27
|
+
400,
|
|
28
|
+
500,
|
|
29
|
+
630,
|
|
30
|
+
800,
|
|
31
|
+
1000,
|
|
32
|
+
1250,
|
|
33
|
+
1600,
|
|
34
|
+
2000,
|
|
35
|
+
2500,
|
|
36
|
+
3150,
|
|
37
|
+
4000,
|
|
38
|
+
5000,
|
|
39
|
+
6300,
|
|
40
|
+
8000,
|
|
41
|
+
10000,
|
|
42
|
+
12500,
|
|
43
|
+
16000,
|
|
44
|
+
20000
|
|
45
|
+
],
|
|
46
|
+
"c": {
|
|
47
|
+
"render": false
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"GEQ_BANDS": {
|
|
51
|
+
"kind": "scalar",
|
|
52
|
+
"doc": "The graphic EQ's section count: DERIVED from ISO_THIRD_OCTAVE_CENTRES_HZ, never a second literal. Generated into `omx_contract_limits.h` as `OMX_GEQ_BANDS`, which sizes `mix_geq.h`'s section array — its OWN budget, never a claimant on EQ_MAX_BANDS (graphic-eq-31 spec §3, roster ruling 3).",
|
|
53
|
+
"unit": "",
|
|
54
|
+
"value": {
|
|
55
|
+
"derive": "count",
|
|
56
|
+
"of": "ISO_THIRD_OCTAVE_CENTRES_HZ"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"GATE_LIMITS": {
|
|
4
|
+
"kind": "travels",
|
|
5
|
+
"doc": "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).",
|
|
6
|
+
"fields": {
|
|
7
|
+
"thresholdDb": {
|
|
8
|
+
"min": -80,
|
|
9
|
+
"max": 0,
|
|
10
|
+
"step": 1,
|
|
11
|
+
"unit": "dB",
|
|
12
|
+
"default": -40,
|
|
13
|
+
"defaultFrom": "desk"
|
|
14
|
+
},
|
|
15
|
+
"rangeDb": {
|
|
16
|
+
"min": -90,
|
|
17
|
+
"max": 0,
|
|
18
|
+
"step": 1,
|
|
19
|
+
"unit": "dB",
|
|
20
|
+
"default": -90,
|
|
21
|
+
"defaultFrom": "desk"
|
|
22
|
+
},
|
|
23
|
+
"kneeStartDb": {
|
|
24
|
+
"min": -80,
|
|
25
|
+
"max": 0,
|
|
26
|
+
"step": 1,
|
|
27
|
+
"unit": "dB",
|
|
28
|
+
"default": -43,
|
|
29
|
+
"defaultFrom": "desk"
|
|
30
|
+
},
|
|
31
|
+
"kneeEndDb": {
|
|
32
|
+
"min": -80,
|
|
33
|
+
"max": 0,
|
|
34
|
+
"step": 1,
|
|
35
|
+
"unit": "dB",
|
|
36
|
+
"default": -37,
|
|
37
|
+
"defaultFrom": "desk"
|
|
38
|
+
},
|
|
39
|
+
"attackMs": {
|
|
40
|
+
"min": 0,
|
|
41
|
+
"max": 500,
|
|
42
|
+
"step": 0.5,
|
|
43
|
+
"unit": "ms",
|
|
44
|
+
"default": 1,
|
|
45
|
+
"defaultFrom": "desk"
|
|
46
|
+
},
|
|
47
|
+
"holdMs": {
|
|
48
|
+
"min": 0,
|
|
49
|
+
"max": 2000,
|
|
50
|
+
"step": 5,
|
|
51
|
+
"unit": "ms",
|
|
52
|
+
"default": 10,
|
|
53
|
+
"defaultFrom": "desk"
|
|
54
|
+
},
|
|
55
|
+
"releaseMs": {
|
|
56
|
+
"min": 0,
|
|
57
|
+
"max": 5000,
|
|
58
|
+
"step": 10,
|
|
59
|
+
"unit": "ms",
|
|
60
|
+
"default": 100,
|
|
61
|
+
"defaultFrom": "desk"
|
|
62
|
+
},
|
|
63
|
+
"hysteresisDb": {
|
|
64
|
+
"min": 0,
|
|
65
|
+
"max": 24,
|
|
66
|
+
"step": 0.5,
|
|
67
|
+
"unit": "dB",
|
|
68
|
+
"default": 3,
|
|
69
|
+
"defaultFrom": "desk"
|
|
70
|
+
},
|
|
71
|
+
"ratio": {
|
|
72
|
+
"min": 1,
|
|
73
|
+
"max": 100,
|
|
74
|
+
"step": 1,
|
|
75
|
+
"unit": "",
|
|
76
|
+
"default": 16,
|
|
77
|
+
"defaultFrom": "desk"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"LIMITER_LIMITS": {
|
|
4
|
+
"kind": "travels",
|
|
5
|
+
"doc": "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.",
|
|
6
|
+
"fields": {
|
|
7
|
+
"ceilingDb": {
|
|
8
|
+
"min": -12,
|
|
9
|
+
"max": 0,
|
|
10
|
+
"step": 0.1,
|
|
11
|
+
"unit": "dBFS",
|
|
12
|
+
"default": -1,
|
|
13
|
+
"defaultFrom": "desk"
|
|
14
|
+
},
|
|
15
|
+
"lookaheadMs": {
|
|
16
|
+
"min": 0.5,
|
|
17
|
+
"max": 5,
|
|
18
|
+
"step": 0.1,
|
|
19
|
+
"unit": "ms",
|
|
20
|
+
"default": 1.5,
|
|
21
|
+
"defaultFrom": "desk"
|
|
22
|
+
},
|
|
23
|
+
"releaseMs": {
|
|
24
|
+
"min": 1,
|
|
25
|
+
"max": 1000,
|
|
26
|
+
"step": 1,
|
|
27
|
+
"unit": "ms",
|
|
28
|
+
"default": 50,
|
|
29
|
+
"defaultFrom": "desk"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"PITCH_LIMITS": {
|
|
4
|
+
"kind": "travels",
|
|
5
|
+
"doc": "PITCH_LIMITS, moved from openmixer.",
|
|
6
|
+
"fields": {
|
|
7
|
+
"semitones": {
|
|
8
|
+
"min": -12,
|
|
9
|
+
"max": 12,
|
|
10
|
+
"default": 0
|
|
11
|
+
},
|
|
12
|
+
"cents": {
|
|
13
|
+
"min": -50,
|
|
14
|
+
"max": 50,
|
|
15
|
+
"default": 0
|
|
16
|
+
},
|
|
17
|
+
"mix": {
|
|
18
|
+
"min": 0,
|
|
19
|
+
"max": 100,
|
|
20
|
+
"default": 100
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"PITCH_KERNEL": {
|
|
25
|
+
"kind": "sheet",
|
|
26
|
+
"doc": "PITCH_KERNEL, moved from openmixer.",
|
|
27
|
+
"value": {
|
|
28
|
+
"windowMs": 40,
|
|
29
|
+
"prefilterCeilingHz": 20000,
|
|
30
|
+
"prefilterQ": {
|
|
31
|
+
"ref": "BUTTERWORTH_Q"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"REVERB_PLATE_MOD_DEPTH_RANGE": {
|
|
4
|
+
"kind": "travels",
|
|
5
|
+
"doc": "PLATE's tank MODULATION DEPTH, in percent of Dattorro's own excursion (±8 samples at his 29 761 Hz tuning rate, scaled to the live rate the way the tank lengths are). 100 is the depth the plate has always run at, so the come-up is bit-identical to the plate before the field; 0 brings back the unmodulated tank's ring; 400 is the wide, chorused EMT-style swing. The rate stays 1 Hz. Only PLATE reads it (`2026-09-26-native-fx-catalogue.md` §2, Reverb).",
|
|
6
|
+
"travel": {
|
|
7
|
+
"min": 0,
|
|
8
|
+
"max": 400,
|
|
9
|
+
"step": 1,
|
|
10
|
+
"unit": "%",
|
|
11
|
+
"default": 100,
|
|
12
|
+
"defaultFrom": "desk"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|