@openmixer/omx-contract 2.5.0 → 2.6.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/README.md +1 -1
- package/data/kernels/generator.json +27 -0
- package/data/kernels/src.json +29 -0
- package/dist/ts/omx-contract.d.ts +36 -0
- package/dist/ts/omx-contract.js +45 -0
- package/include/omxcontract/omx_contract_limits.h +18 -0
- package/package.json +1 -1
- package/share/omx-contract/omx-contract.json +67 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ pkg-config --cflags omx-contract
|
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Pin one version and build against its renders instead of keeping a copy: the installed package at exactly
|
|
52
|
-
that version (`pkg-config --exact-version=2.
|
|
52
|
+
that version (`pkg-config --exact-version=2.6.0 omx-contract`), else the npm tarball, unpacked, and
|
|
53
53
|
`omx-contract render --target c --out build/omx-contract/include`. A kernel's controls and readouts, in their
|
|
54
54
|
order, are in `share/omx-contract/omx-contract.json`; how a declaration is written is in
|
|
55
55
|
[docs/kernel-files.md](docs/kernel-files.md), and what a readout is in [docs/readouts.md](docs/readouts.md).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"controls": [
|
|
4
|
+
{
|
|
5
|
+
"name": "kind",
|
|
6
|
+
"kind": "choice",
|
|
7
|
+
"doc": "The generator kinds, in surface order: its position is the integer omx-dsp's omx_gen_fill takes as its kind (OMX_GEN_OSC, OMX_GEN_WHITE, OMX_GEN_PINK).",
|
|
8
|
+
"ids": [
|
|
9
|
+
"oscillator",
|
|
10
|
+
"white",
|
|
11
|
+
"pink"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "waveform",
|
|
16
|
+
"kind": "choice",
|
|
17
|
+
"global": "WAVEFORMS",
|
|
18
|
+
"doc": "The selectable oscillator waveforms, in surface order: its position is the integer omx-dsp's omx_gen_osc takes (OMX_WAVE_SINE, OMX_WAVE_SQUARE, OMX_WAVE_SAW, OMX_WAVE_TRIANGLE).",
|
|
19
|
+
"ids": [
|
|
20
|
+
"sine",
|
|
21
|
+
"square",
|
|
22
|
+
"saw",
|
|
23
|
+
"triangle"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schema/omx-contract.schema.json",
|
|
3
|
+
"constants": {
|
|
4
|
+
"SRC_TAPS": {
|
|
5
|
+
"kind": "scalar",
|
|
6
|
+
"doc": "Taps per phase. 64 puts the design's transition band comfortably inside what a Kaiser of this beta can hold at every standard rate pair, and costs 64 multiply-adds per output sample — about 12 M flops per track-minute at 48 kHz, which is nothing offline.",
|
|
7
|
+
"unit": "",
|
|
8
|
+
"value": 64
|
|
9
|
+
},
|
|
10
|
+
"SRC_STOPBAND_DB": {
|
|
11
|
+
"kind": "scalar",
|
|
12
|
+
"doc": "Stopband attenuation the window is designed for, in dB. 96 dB is below the noise floor of any take this console can capture (float capture of a 24-bit converter), so the conversion is not what limits the file.",
|
|
13
|
+
"unit": "dB",
|
|
14
|
+
"value": 96
|
|
15
|
+
},
|
|
16
|
+
"SRC_ROLLOFF": {
|
|
17
|
+
"kind": "scalar",
|
|
18
|
+
"doc": "How much of the shared Nyquist the passband keeps. The remaining 8 % is the transition band the window needs to reach its stopband: at 48 kHz that puts the corner at 22.08 kHz and the stopband in place by 24 kHz.",
|
|
19
|
+
"unit": "",
|
|
20
|
+
"value": 0.92
|
|
21
|
+
},
|
|
22
|
+
"SRC_MAX_L": {
|
|
23
|
+
"kind": "scalar",
|
|
24
|
+
"doc": "The largest interpolation factor a plan may carry. 44.1 kHz -> 192 kHz is 640/147, the widest pair the console's standard rates produce; the cap refuses an exotic pair before it allocates a table nobody budgeted for, rather than discovering it as a bad_alloc.",
|
|
25
|
+
"unit": "",
|
|
26
|
+
"value": 1024
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1012,6 +1012,18 @@ export declare const GATE_LIMITS: {
|
|
|
1012
1012
|
};
|
|
1013
1013
|
};
|
|
1014
1014
|
|
|
1015
|
+
/**
|
|
1016
|
+
* The generator kinds, in surface order: its position is the integer omx-dsp's omx_gen_fill takes as its kind (OMX_GEN_OSC, OMX_GEN_WHITE, OMX_GEN_PINK).
|
|
1017
|
+
* @see data/kernels/generator.json
|
|
1018
|
+
*/
|
|
1019
|
+
export declare const GENERATOR_KINDS: readonly ["oscillator", "white", "pink"];
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* The selectable oscillator waveforms, in surface order: its position is the integer omx-dsp's omx_gen_osc takes (OMX_WAVE_SINE, OMX_WAVE_SQUARE, OMX_WAVE_SAW, OMX_WAVE_TRIANGLE).
|
|
1023
|
+
* @see data/kernels/generator.json
|
|
1024
|
+
*/
|
|
1025
|
+
export declare const WAVEFORMS: readonly ["sine", "square", "saw", "triangle"];
|
|
1026
|
+
|
|
1015
1027
|
/**
|
|
1016
1028
|
* 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).
|
|
1017
1029
|
* @see data/kernels/geq.json
|
|
@@ -1725,6 +1737,30 @@ export declare const RTA_TARGET_BIN_HZ: 5.9;
|
|
|
1725
1737
|
*/
|
|
1726
1738
|
export declare const RTA_FFT_SIZE_MAX: 32768;
|
|
1727
1739
|
|
|
1740
|
+
/**
|
|
1741
|
+
* Taps per phase. 64 puts the design's transition band comfortably inside what a Kaiser of this beta can hold at every standard rate pair, and costs 64 multiply-adds per output sample — about 12 M flops per track-minute at 48 kHz, which is nothing offline.
|
|
1742
|
+
* @see data/kernels/src.json
|
|
1743
|
+
*/
|
|
1744
|
+
export declare const SRC_TAPS: 64;
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* Stopband attenuation the window is designed for, in dB. 96 dB is below the noise floor of any take this console can capture (float capture of a 24-bit converter), so the conversion is not what limits the file.
|
|
1748
|
+
* @see data/kernels/src.json
|
|
1749
|
+
*/
|
|
1750
|
+
export declare const SRC_STOPBAND_DB: 96;
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* How much of the shared Nyquist the passband keeps. The remaining 8 % is the transition band the window needs to reach its stopband: at 48 kHz that puts the corner at 22.08 kHz and the stopband in place by 24 kHz.
|
|
1754
|
+
* @see data/kernels/src.json
|
|
1755
|
+
*/
|
|
1756
|
+
export declare const SRC_ROLLOFF: 0.92;
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* The largest interpolation factor a plan may carry. 44.1 kHz -> 192 kHz is 640/147, the widest pair the console's standard rates produce; the cap refuses an exotic pair before it allocates a table nobody budgeted for, rather than discovering it as a bad_alloc.
|
|
1760
|
+
* @see data/kernels/src.json
|
|
1761
|
+
*/
|
|
1762
|
+
export declare const SRC_MAX_L: 1024;
|
|
1763
|
+
|
|
1728
1764
|
/**
|
|
1729
1765
|
* 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).
|
|
1730
1766
|
* @see data/kernels/transient.json
|
package/dist/ts/omx-contract.js
CHANGED
|
@@ -1172,6 +1172,27 @@ export const GATE_LIMITS = {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
};
|
|
1174
1174
|
|
|
1175
|
+
/**
|
|
1176
|
+
* The generator kinds, in surface order: its position is the integer omx-dsp's omx_gen_fill takes as its kind (OMX_GEN_OSC, OMX_GEN_WHITE, OMX_GEN_PINK).
|
|
1177
|
+
* @see data/kernels/generator.json
|
|
1178
|
+
*/
|
|
1179
|
+
export const GENERATOR_KINDS = [
|
|
1180
|
+
"oscillator",
|
|
1181
|
+
"white",
|
|
1182
|
+
"pink"
|
|
1183
|
+
];
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* The selectable oscillator waveforms, in surface order: its position is the integer omx-dsp's omx_gen_osc takes (OMX_WAVE_SINE, OMX_WAVE_SQUARE, OMX_WAVE_SAW, OMX_WAVE_TRIANGLE).
|
|
1187
|
+
* @see data/kernels/generator.json
|
|
1188
|
+
*/
|
|
1189
|
+
export const WAVEFORMS = [
|
|
1190
|
+
"sine",
|
|
1191
|
+
"square",
|
|
1192
|
+
"saw",
|
|
1193
|
+
"triangle"
|
|
1194
|
+
];
|
|
1195
|
+
|
|
1175
1196
|
/**
|
|
1176
1197
|
* 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).
|
|
1177
1198
|
* @see data/kernels/geq.json
|
|
@@ -1902,6 +1923,30 @@ export const RTA_TARGET_BIN_HZ = 5.9;
|
|
|
1902
1923
|
*/
|
|
1903
1924
|
export const RTA_FFT_SIZE_MAX = 32768;
|
|
1904
1925
|
|
|
1926
|
+
/**
|
|
1927
|
+
* Taps per phase. 64 puts the design's transition band comfortably inside what a Kaiser of this beta can hold at every standard rate pair, and costs 64 multiply-adds per output sample — about 12 M flops per track-minute at 48 kHz, which is nothing offline.
|
|
1928
|
+
* @see data/kernels/src.json
|
|
1929
|
+
*/
|
|
1930
|
+
export const SRC_TAPS = 64;
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* Stopband attenuation the window is designed for, in dB. 96 dB is below the noise floor of any take this console can capture (float capture of a 24-bit converter), so the conversion is not what limits the file.
|
|
1934
|
+
* @see data/kernels/src.json
|
|
1935
|
+
*/
|
|
1936
|
+
export const SRC_STOPBAND_DB = 96;
|
|
1937
|
+
|
|
1938
|
+
/**
|
|
1939
|
+
* How much of the shared Nyquist the passband keeps. The remaining 8 % is the transition band the window needs to reach its stopband: at 48 kHz that puts the corner at 22.08 kHz and the stopband in place by 24 kHz.
|
|
1940
|
+
* @see data/kernels/src.json
|
|
1941
|
+
*/
|
|
1942
|
+
export const SRC_ROLLOFF = 0.92;
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* The largest interpolation factor a plan may carry. 44.1 kHz -> 192 kHz is 640/147, the widest pair the console's standard rates produce; the cap refuses an exotic pair before it allocates a table nobody budgeted for, rather than discovering it as a bad_alloc.
|
|
1946
|
+
* @see data/kernels/src.json
|
|
1947
|
+
*/
|
|
1948
|
+
export const SRC_MAX_L = 1024;
|
|
1949
|
+
|
|
1905
1950
|
/**
|
|
1906
1951
|
* 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).
|
|
1907
1952
|
* @see data/kernels/transient.json
|
|
@@ -570,6 +570,11 @@
|
|
|
570
570
|
#define OMX_RTA_TARGET_BIN_HZ_DOUBLE 5.9
|
|
571
571
|
#define OMX_RT_HARD_TARGET_QUANTUM 128
|
|
572
572
|
#define OMX_RT_HARD_TARGET_RATE 192000
|
|
573
|
+
#define OMX_SRC_MAX_L 1024
|
|
574
|
+
#define OMX_SRC_ROLLOFF 0.92f
|
|
575
|
+
#define OMX_SRC_ROLLOFF_DOUBLE 0.92
|
|
576
|
+
#define OMX_SRC_STOPBAND_DB 96
|
|
577
|
+
#define OMX_SRC_TAPS 64
|
|
573
578
|
#define OMX_SUBHARMONIC_RADIUS_BINS 2
|
|
574
579
|
#define OMX_TRANSIENT_FAST_ATTACK_MS 0.5f
|
|
575
580
|
#define OMX_TRANSIENT_FAST_ATTACK_MS_DOUBLE 0.5
|
|
@@ -730,6 +735,12 @@ enum omx_gate_key_sources {
|
|
|
730
735
|
OMX_GATE_KEY_SOURCES_SIDECHAIN = 1,
|
|
731
736
|
};
|
|
732
737
|
#define OMX_GATE_KEY_SOURCES_COUNT 2u
|
|
738
|
+
enum omx_generator_kinds {
|
|
739
|
+
OMX_GENERATOR_KINDS_OSCILLATOR = 0,
|
|
740
|
+
OMX_GENERATOR_KINDS_WHITE = 1,
|
|
741
|
+
OMX_GENERATOR_KINDS_PINK = 2,
|
|
742
|
+
};
|
|
743
|
+
#define OMX_GENERATOR_KINDS_COUNT 3u
|
|
733
744
|
enum omx_param_scales {
|
|
734
745
|
OMX_PARAM_SCALES_LINEAR = 0,
|
|
735
746
|
OMX_PARAM_SCALES_LOG = 1,
|
|
@@ -757,6 +768,13 @@ enum omx_tremolo_modes {
|
|
|
757
768
|
};
|
|
758
769
|
#define OMX_TREMOLO_MODES_COUNT 2u
|
|
759
770
|
#define OMX_TREMOLO_MODES_DEFAULT OMX_TREMOLO_MODES_TREMOLO
|
|
771
|
+
enum omx_waveforms {
|
|
772
|
+
OMX_WAVEFORMS_SINE = 0,
|
|
773
|
+
OMX_WAVEFORMS_SQUARE = 1,
|
|
774
|
+
OMX_WAVEFORMS_SAW = 2,
|
|
775
|
+
OMX_WAVEFORMS_TRIANGLE = 3,
|
|
776
|
+
};
|
|
777
|
+
#define OMX_WAVEFORMS_COUNT 4u
|
|
760
778
|
|
|
761
779
|
/* Every kernel's readouts, the meters a host draws (docs/readouts.md): an enum of the readouts at their position,
|
|
762
780
|
* `OMX_<KERNEL>_READOUT_COUNT`, and per readout its display range (_MIN, _MAX), _RATE_HZ, _SCALE (an OMX_PARAM_SCALES_*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmixer/omx-contract",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "The FreeMixer declarations as data: a JSON Schema, the data, and one CLI that renders them into C, TypeScript and JSON",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmixer/omx-contract",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"items": {
|
|
5
5
|
"PAN_RANGE": {
|
|
6
6
|
"rel": "data/kernels/balance.json",
|
|
@@ -1347,6 +1347,27 @@
|
|
|
1347
1347
|
}
|
|
1348
1348
|
}
|
|
1349
1349
|
},
|
|
1350
|
+
"GENERATOR_KINDS": {
|
|
1351
|
+
"rel": "data/kernels/generator.json",
|
|
1352
|
+
"kind": "set",
|
|
1353
|
+
"doc": "The generator kinds, in surface order: its position is the integer omx-dsp's omx_gen_fill takes as its kind (OMX_GEN_OSC, OMX_GEN_WHITE, OMX_GEN_PINK).",
|
|
1354
|
+
"value": [
|
|
1355
|
+
"oscillator",
|
|
1356
|
+
"white",
|
|
1357
|
+
"pink"
|
|
1358
|
+
]
|
|
1359
|
+
},
|
|
1360
|
+
"WAVEFORMS": {
|
|
1361
|
+
"rel": "data/kernels/generator.json",
|
|
1362
|
+
"kind": "set",
|
|
1363
|
+
"doc": "The selectable oscillator waveforms, in surface order: its position is the integer omx-dsp's omx_gen_osc takes (OMX_WAVE_SINE, OMX_WAVE_SQUARE, OMX_WAVE_SAW, OMX_WAVE_TRIANGLE).",
|
|
1364
|
+
"value": [
|
|
1365
|
+
"sine",
|
|
1366
|
+
"square",
|
|
1367
|
+
"saw",
|
|
1368
|
+
"triangle"
|
|
1369
|
+
]
|
|
1370
|
+
},
|
|
1350
1371
|
"GEQ_BAND_RANGE": {
|
|
1351
1372
|
"rel": "data/kernels/geq.json",
|
|
1352
1373
|
"kind": "travels",
|
|
@@ -2137,6 +2158,34 @@
|
|
|
2137
2158
|
"unit": "",
|
|
2138
2159
|
"value": 32768
|
|
2139
2160
|
},
|
|
2161
|
+
"SRC_TAPS": {
|
|
2162
|
+
"rel": "data/kernels/src.json",
|
|
2163
|
+
"kind": "scalar",
|
|
2164
|
+
"doc": "Taps per phase. 64 puts the design's transition band comfortably inside what a Kaiser of this beta can hold at every standard rate pair, and costs 64 multiply-adds per output sample — about 12 M flops per track-minute at 48 kHz, which is nothing offline.",
|
|
2165
|
+
"unit": "",
|
|
2166
|
+
"value": 64
|
|
2167
|
+
},
|
|
2168
|
+
"SRC_STOPBAND_DB": {
|
|
2169
|
+
"rel": "data/kernels/src.json",
|
|
2170
|
+
"kind": "scalar",
|
|
2171
|
+
"doc": "Stopband attenuation the window is designed for, in dB. 96 dB is below the noise floor of any take this console can capture (float capture of a 24-bit converter), so the conversion is not what limits the file.",
|
|
2172
|
+
"unit": "dB",
|
|
2173
|
+
"value": 96
|
|
2174
|
+
},
|
|
2175
|
+
"SRC_ROLLOFF": {
|
|
2176
|
+
"rel": "data/kernels/src.json",
|
|
2177
|
+
"kind": "scalar",
|
|
2178
|
+
"doc": "How much of the shared Nyquist the passband keeps. The remaining 8 % is the transition band the window needs to reach its stopband: at 48 kHz that puts the corner at 22.08 kHz and the stopband in place by 24 kHz.",
|
|
2179
|
+
"unit": "",
|
|
2180
|
+
"value": 0.92
|
|
2181
|
+
},
|
|
2182
|
+
"SRC_MAX_L": {
|
|
2183
|
+
"rel": "data/kernels/src.json",
|
|
2184
|
+
"kind": "scalar",
|
|
2185
|
+
"doc": "The largest interpolation factor a plan may carry. 44.1 kHz -> 192 kHz is 640/147, the widest pair the console's standard rates produce; the cap refuses an exotic pair before it allocates a table nobody budgeted for, rather than discovering it as a bad_alloc.",
|
|
2186
|
+
"unit": "",
|
|
2187
|
+
"value": 1024
|
|
2188
|
+
},
|
|
2140
2189
|
"TRANSIENT_LIMITS": {
|
|
2141
2190
|
"rel": "data/kernels/transient.json",
|
|
2142
2191
|
"kind": "travels",
|
|
@@ -2992,6 +3041,20 @@
|
|
|
2992
3041
|
}
|
|
2993
3042
|
]
|
|
2994
3043
|
},
|
|
3044
|
+
"generator": {
|
|
3045
|
+
"controls": [
|
|
3046
|
+
{
|
|
3047
|
+
"name": "kind",
|
|
3048
|
+
"kind": "choice",
|
|
3049
|
+
"global": "GENERATOR_KINDS"
|
|
3050
|
+
},
|
|
3051
|
+
{
|
|
3052
|
+
"name": "waveform",
|
|
3053
|
+
"kind": "choice",
|
|
3054
|
+
"global": "WAVEFORMS"
|
|
3055
|
+
}
|
|
3056
|
+
]
|
|
3057
|
+
},
|
|
2995
3058
|
"geq": {
|
|
2996
3059
|
"controls": [
|
|
2997
3060
|
{
|
|
@@ -3220,6 +3283,9 @@
|
|
|
3220
3283
|
"rta": {
|
|
3221
3284
|
"controls": []
|
|
3222
3285
|
},
|
|
3286
|
+
"src": {
|
|
3287
|
+
"controls": []
|
|
3288
|
+
},
|
|
3223
3289
|
"transient": {
|
|
3224
3290
|
"controls": [
|
|
3225
3291
|
{
|