@openmixer/omx-contract 2.2.0 → 2.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.
package/README.md CHANGED
@@ -17,6 +17,7 @@ declared here is declared nowhere else: the EQ band budget that 1.2.0 left in op
17
17
  2.2.0 declares the controls an instance has that were missing: the delay's ping-pong, the drive's auto-gain, stereo
18
18
  link and HF roll-off, the compressor's kind and detector oversampling, and an EQ instance's switches, slopes and
19
19
  per-band controls (a control's `count`, a use, `of` and `when`, and a default by reference).
20
+ 2.3.0 declares the input trim as a kernel, `trim`, whose one control is the console's TRIM_RANGE.
20
21
 
21
22
  ```
22
23
  data/ the declaration, one file per group, edited by hand
@@ -127,9 +128,9 @@ share/omx-contract` and `render --target ts --out test/golden/ts`; CI holds all
127
128
 
128
129
  ## Consuming it
129
130
 
130
- Pin one version (`omx-contract 2.2.0` in `.github/pins.txt`) and build against its renders, committing
131
+ Pin one version (`omx-contract 2.3.0` in `.github/pins.txt`) and build against its renders, committing
131
132
  none: the installed `omx-contract-devel` / `libomx-contract-dev` at exactly that version
132
- (`pkg-config --exact-version=2.2.0 omx-contract`), else the release's npm tarball, unpacked, and
133
+ (`pkg-config --exact-version=2.3.0 omx-contract`), else the release's npm tarball, unpacked, and
133
134
  `omx-contract render --target c --out build/omx-contract/include`. Include
134
135
  `<omxcontract/omx_contract_limits.h>`. A plugin's parameter header is rendered by omx-plugins from its
135
136
  declaration, by reference to the kernel travels here (since 1.1.0).
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "../../schema/omx-contract.schema.json",
3
+ "controls": [
4
+ {
5
+ "name": "trimDb",
6
+ "kind": "travel",
7
+ "global": "TRIM_RANGE",
8
+ "doc": "The digital input trim, in dB: the console's fine head gain, applied first in a channel's lane as a click-free ramp from the last block's gain to this one (openmixer's TRIM_RANGE, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there). It comes up at 0 dB, the trim a channel has when none is set. omx-dsp's trim face takes it as `trim_db`.",
9
+ "travel": {
10
+ "min": -24,
11
+ "max": 24,
12
+ "step": 0.1,
13
+ "unit": "dB",
14
+ "default": 0,
15
+ "defaultFrom": "desk"
16
+ }
17
+ }
18
+ ],
19
+ "aggregates": {
20
+ "TRIM_TRAVELS": {
21
+ "doc": "The trim as a table with the one field `trimDb`, the name the trim row and the omx-strip plugin store; generated from the trim kernel's control, so the travel has one home.",
22
+ "fields": [
23
+ "trimDb"
24
+ ]
25
+ }
26
+ }
27
+ }
@@ -104,20 +104,6 @@
104
104
  }
105
105
  }
106
106
  },
107
- "TRIM_TRAVELS": {
108
- "kind": "travels",
109
- "doc": "The digital input trim as a travel: openmixer's TRIM_RANGE (packages/declarations, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there and OMX_TRIM_RANGE_*_DB in omx-dsp's header), coming up at 0 dB, the trim a channel has when none is set. The omx-strip plugin's trim reads it. A table with the one field `trimDb`, the name the trim row and the plugin store; not rendered to C, which already spells TRIM_RANGE its own way.",
110
- "fields": {
111
- "trimDb": {
112
- "min": -24,
113
- "max": 24,
114
- "step": 0.1,
115
- "unit": "dB",
116
- "default": 0,
117
- "defaultFrom": "desk"
118
- }
119
- }
120
- },
121
107
  "PARAM_SCALES": {
122
108
  "kind": "set",
123
109
  "since": "1.3.0",
@@ -1860,6 +1860,34 @@ export declare const TREMOLO_TRAVELS: {
1860
1860
  };
1861
1861
  };
1862
1862
 
1863
+ /**
1864
+ * The digital input trim, in dB: the console's fine head gain, applied first in a channel's lane as a click-free ramp from the last block's gain to this one (openmixer's TRIM_RANGE, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there). It comes up at 0 dB, the trim a channel has when none is set. omx-dsp's trim face takes it as `trim_db`.
1865
+ * @see data/kernels/trim.json
1866
+ */
1867
+ export declare const TRIM_RANGE: {
1868
+ readonly min: -24;
1869
+ readonly max: 24;
1870
+ readonly step: 0.1;
1871
+ readonly unit: "dB";
1872
+ readonly default: 0;
1873
+ readonly defaultFrom: "desk";
1874
+ };
1875
+
1876
+ /**
1877
+ * The trim as a table with the one field `trimDb`, the name the trim row and the omx-strip plugin store; generated from the trim kernel's control, so the travel has one home.
1878
+ * @see data/kernels/trim.json
1879
+ */
1880
+ export declare const TRIM_TRAVELS: {
1881
+ readonly trimDb: {
1882
+ readonly min: -24;
1883
+ readonly max: 24;
1884
+ readonly step: 0.1;
1885
+ readonly unit: "dB";
1886
+ readonly default: 0;
1887
+ readonly defaultFrom: "desk";
1888
+ };
1889
+ };
1890
+
1863
1891
  /**
1864
1892
  * 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).
1865
1893
  * @see data/primitives.json
@@ -1958,21 +1986,6 @@ export declare const COMP_CONTINUOUS_TRAVELS: {
1958
1986
  };
1959
1987
  };
1960
1988
 
1961
- /**
1962
- * The digital input trim as a travel: openmixer's TRIM_RANGE (packages/declarations, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there and OMX_TRIM_RANGE_*_DB in omx-dsp's header), coming up at 0 dB, the trim a channel has when none is set. The omx-strip plugin's trim reads it. A table with the one field `trimDb`, the name the trim row and the plugin store; not rendered to C, which already spells TRIM_RANGE its own way.
1963
- * @see data/primitives.json
1964
- */
1965
- export declare const TRIM_TRAVELS: {
1966
- readonly trimDb: {
1967
- readonly min: -24;
1968
- readonly max: 24;
1969
- readonly step: 0.1;
1970
- readonly unit: "dB";
1971
- readonly default: 0;
1972
- readonly defaultFrom: "desk";
1973
- };
1974
- };
1975
-
1976
1989
  /**
1977
1990
  * 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`.
1978
1991
  * @see data/primitives.json
@@ -2037,6 +2037,34 @@ export const TREMOLO_TRAVELS = {
2037
2037
  }
2038
2038
  };
2039
2039
 
2040
+ /**
2041
+ * The digital input trim, in dB: the console's fine head gain, applied first in a channel's lane as a click-free ramp from the last block's gain to this one (openmixer's TRIM_RANGE, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there). It comes up at 0 dB, the trim a channel has when none is set. omx-dsp's trim face takes it as `trim_db`.
2042
+ * @see data/kernels/trim.json
2043
+ */
2044
+ export const TRIM_RANGE = {
2045
+ "min": -24,
2046
+ "max": 24,
2047
+ "step": 0.1,
2048
+ "unit": "dB",
2049
+ "default": 0,
2050
+ "defaultFrom": "desk"
2051
+ };
2052
+
2053
+ /**
2054
+ * The trim as a table with the one field `trimDb`, the name the trim row and the omx-strip plugin store; generated from the trim kernel's control, so the travel has one home.
2055
+ * @see data/kernels/trim.json
2056
+ */
2057
+ export const TRIM_TRAVELS = {
2058
+ "trimDb": {
2059
+ "min": -24,
2060
+ "max": 24,
2061
+ "step": 0.1,
2062
+ "unit": "dB",
2063
+ "default": 0,
2064
+ "defaultFrom": "desk"
2065
+ }
2066
+ };
2067
+
2040
2068
  /**
2041
2069
  * 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).
2042
2070
  * @see data/primitives.json
@@ -2135,21 +2163,6 @@ export const COMP_CONTINUOUS_TRAVELS = {
2135
2163
  }
2136
2164
  };
2137
2165
 
2138
- /**
2139
- * The digital input trim as a travel: openmixer's TRIM_RANGE (packages/declarations, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there and OMX_TRIM_RANGE_*_DB in omx-dsp's header), coming up at 0 dB, the trim a channel has when none is set. The omx-strip plugin's trim reads it. A table with the one field `trimDb`, the name the trim row and the plugin store; not rendered to C, which already spells TRIM_RANGE its own way.
2140
- * @see data/primitives.json
2141
- */
2142
- export const TRIM_TRAVELS = {
2143
- "trimDb": {
2144
- "min": -24,
2145
- "max": 24,
2146
- "step": 0.1,
2147
- "unit": "dB",
2148
- "default": 0,
2149
- "defaultFrom": "desk"
2150
- }
2151
- };
2152
-
2153
2166
  /**
2154
2167
  * 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`.
2155
2168
  * @see data/primitives.json
@@ -591,6 +591,11 @@
591
591
  #define OMX_TREMOLO_RATE_RANGE_MIN_DOUBLE 0.1
592
592
  #define OMX_TREMOLO_RATE_RANGE_STEP 0.01f
593
593
  #define OMX_TREMOLO_RATE_RANGE_STEP_DOUBLE 0.01
594
+ #define OMX_TRIM_RANGE_DEFAULT 0
595
+ #define OMX_TRIM_RANGE_MAX 24
596
+ #define OMX_TRIM_RANGE_MIN -24
597
+ #define OMX_TRIM_RANGE_STEP 0.1f
598
+ #define OMX_TRIM_RANGE_STEP_DOUBLE 0.1
594
599
  #define OMX_XOVER_LR2_SECTION_Q 0.5f
595
600
  #define OMX_XOVER_LR2_SECTION_Q_DOUBLE 0.5
596
601
  #define OMX_XOVER_LR4_SECTION_Q 0.7071067811865476f
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmixer/omx-contract",
3
- "version": "2.2.0",
3
+ "version": "2.3.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.2.0",
3
+ "version": "2.3.0",
4
4
  "items": {
5
5
  "PAN_RANGE": {
6
6
  "rel": "data/kernels/balance.json",
@@ -2280,6 +2280,36 @@
2280
2280
  }
2281
2281
  }
2282
2282
  },
2283
+ "TRIM_RANGE": {
2284
+ "rel": "data/kernels/trim.json",
2285
+ "kind": "travels",
2286
+ "doc": "The digital input trim, in dB: the console's fine head gain, applied first in a channel's lane as a click-free ramp from the last block's gain to this one (openmixer's TRIM_RANGE, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there). It comes up at 0 dB, the trim a channel has when none is set. omx-dsp's trim face takes it as `trim_db`.",
2287
+ "shape": "travel",
2288
+ "value": {
2289
+ "min": -24,
2290
+ "max": 24,
2291
+ "step": 0.1,
2292
+ "unit": "dB",
2293
+ "default": 0,
2294
+ "defaultFrom": "desk"
2295
+ }
2296
+ },
2297
+ "TRIM_TRAVELS": {
2298
+ "rel": "data/kernels/trim.json",
2299
+ "kind": "travels",
2300
+ "doc": "The trim as a table with the one field `trimDb`, the name the trim row and the omx-strip plugin store; generated from the trim kernel's control, so the travel has one home.",
2301
+ "shape": "table",
2302
+ "value": {
2303
+ "trimDb": {
2304
+ "min": -24,
2305
+ "max": 24,
2306
+ "step": 0.1,
2307
+ "unit": "dB",
2308
+ "default": 0,
2309
+ "defaultFrom": "desk"
2310
+ }
2311
+ }
2312
+ },
2283
2313
  "BUTTERWORTH_Q": {
2284
2314
  "rel": "data/primitives.json",
2285
2315
  "kind": "scalar",
@@ -2383,22 +2413,6 @@
2383
2413
  }
2384
2414
  }
2385
2415
  },
2386
- "TRIM_TRAVELS": {
2387
- "rel": "data/primitives.json",
2388
- "kind": "travels",
2389
- "doc": "The digital input trim as a travel: openmixer's TRIM_RANGE (packages/declarations, -24..+24 dB in 0.1 dB steps, spelled minDb/maxDb/stepDb there and OMX_TRIM_RANGE_*_DB in omx-dsp's header), coming up at 0 dB, the trim a channel has when none is set. The omx-strip plugin's trim reads it. A table with the one field `trimDb`, the name the trim row and the plugin store; not rendered to C, which already spells TRIM_RANGE its own way.",
2390
- "shape": "table",
2391
- "value": {
2392
- "trimDb": {
2393
- "min": -24,
2394
- "max": 24,
2395
- "step": 0.1,
2396
- "unit": "dB",
2397
- "default": 0,
2398
- "defaultFrom": "desk"
2399
- }
2400
- }
2401
- },
2402
2416
  "PARAM_SCALES": {
2403
2417
  "rel": "data/primitives.json",
2404
2418
  "kind": "set",
@@ -3190,6 +3204,15 @@
3190
3204
  "global": "TREMOLO_MODES"
3191
3205
  }
3192
3206
  ]
3207
+ },
3208
+ "trim": {
3209
+ "controls": [
3210
+ {
3211
+ "name": "trimDb",
3212
+ "kind": "travel",
3213
+ "global": "TRIM_RANGE"
3214
+ }
3215
+ ]
3193
3216
  }
3194
3217
  }
3195
3218
  }