@libraz/libsonare 1.7.2 → 1.8.1
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/NOTICE +178 -0
- package/README.md +26 -203
- package/dist/_chain_config.d.ts +14 -0
- package/dist/_chain_config.d.ts.map +1 -0
- package/dist/_effects_common.d.ts +7 -0
- package/dist/_effects_common.d.ts.map +1 -0
- package/dist/_feature_validation.d.ts +8 -0
- package/dist/_feature_validation.d.ts.map +1 -0
- package/dist/_fft_options.d.ts +24 -0
- package/dist/_fft_options.d.ts.map +1 -0
- package/dist/align_take.d.ts +50 -0
- package/dist/align_take.d.ts.map +1 -0
- package/dist/analysis.d.ts +29 -5840
- package/dist/analysis.d.ts.map +1 -0
- package/dist/analysis.js +874 -722
- package/dist/analysis.js.map +1 -1
- package/dist/analysis_helpers.d.ts +9 -0
- package/dist/analysis_helpers.d.ts.map +1 -0
- package/dist/audio.d.ts +163 -0
- package/dist/audio.d.ts.map +1 -0
- package/dist/clip_page_streamer.d.ts +133 -0
- package/dist/clip_page_streamer.d.ts.map +1 -0
- package/dist/codes.d.ts +44 -0
- package/dist/codes.d.ts.map +1 -0
- package/dist/effects_mastering.d.ts +23 -0
- package/dist/effects_mastering.d.ts.map +1 -0
- package/dist/effects_note_ops.d.ts +502 -0
- package/dist/effects_note_ops.d.ts.map +1 -0
- package/dist/effects_percussive.d.ts +185 -0
- package/dist/effects_percussive.d.ts.map +1 -0
- package/dist/effects_separation.d.ts +65 -0
- package/dist/effects_separation.d.ts.map +1 -0
- package/dist/effects_spectral.d.ts +28 -0
- package/dist/effects_spectral.d.ts.map +1 -0
- package/dist/effects_timepitch.d.ts +134 -0
- package/dist/effects_timepitch.d.ts.map +1 -0
- package/dist/effects_voice_change.d.ts +53 -0
- package/dist/effects_voice_change.d.ts.map +1 -0
- package/dist/errors.d.ts +51 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/feature_core.d.ts +341 -0
- package/dist/feature_core.d.ts.map +1 -0
- package/dist/feature_decompose.d.ts +278 -0
- package/dist/feature_decompose.d.ts.map +1 -0
- package/dist/feature_inverse.d.ts +128 -0
- package/dist/feature_inverse.d.ts.map +1 -0
- package/dist/feature_loudness.d.ts +66 -0
- package/dist/feature_loudness.d.ts.map +1 -0
- package/dist/feature_music.d.ts +307 -0
- package/dist/feature_music.d.ts.map +1 -0
- package/dist/feature_pitch.d.ts +108 -0
- package/dist/feature_pitch.d.ts.map +1 -0
- package/dist/feature_resample.d.ts +16 -0
- package/dist/feature_resample.d.ts.map +1 -0
- package/dist/feature_spectral.d.ts +137 -0
- package/dist/feature_spectral.d.ts.map +1 -0
- package/dist/feature_spectrogram.d.ts +198 -0
- package/dist/feature_spectrogram.d.ts.map +1 -0
- package/dist/features.d.ts +10 -0
- package/dist/features.d.ts.map +1 -0
- package/dist/hrtf/default.shrf +0 -0
- package/dist/index.d.ts +74 -7431
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4173 -1621
- package/dist/index.js.map +1 -1
- package/dist/instrument_types.d.ts +517 -0
- package/dist/instrument_types.d.ts.map +1 -0
- package/dist/live_audio.d.ts +35 -0
- package/dist/live_audio.d.ts.map +1 -0
- package/dist/mastering_chain.d.ts +213 -0
- package/dist/mastering_chain.d.ts.map +1 -0
- package/dist/mastering_core.d.ts +483 -0
- package/dist/mastering_core.d.ts.map +1 -0
- package/dist/mastering_dynamics.d.ts +80 -0
- package/dist/mastering_dynamics.d.ts.map +1 -0
- package/dist/metering.d.ts +287 -0
- package/dist/metering.d.ts.map +1 -0
- package/dist/mixer.d.ts +464 -0
- package/dist/mixer.d.ts.map +1 -0
- package/dist/mixing_assistant.d.ts +62 -0
- package/dist/mixing_assistant.d.ts.map +1 -0
- package/dist/mixing_oneshot.d.ts +40 -0
- package/dist/mixing_oneshot.d.ts.map +1 -0
- package/dist/module_state.d.ts +15 -0
- package/dist/module_state.d.ts.map +1 -0
- package/dist/opfs_clip_pages.d.ts +28 -0
- package/dist/opfs_clip_pages.d.ts.map +1 -0
- package/dist/playback_renderer.d.ts +128 -0
- package/dist/playback_renderer.d.ts.map +1 -0
- package/dist/polyphony.d.ts +202 -0
- package/dist/polyphony.d.ts.map +1 -0
- package/dist/project.d.ts +8 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project_class.d.ts +562 -0
- package/dist/project_class.d.ts.map +1 -0
- package/dist/project_internal.d.ts +194 -0
- package/dist/project_internal.d.ts.map +1 -0
- package/dist/project_synth.d.ts +74 -0
- package/dist/project_synth.d.ts.map +1 -0
- package/dist/project_types.d.ts +654 -0
- package/dist/project_types.d.ts.map +1 -0
- package/dist/public_types.d.ts +185 -0
- package/dist/public_types.d.ts.map +1 -0
- package/dist/public_types_acoustic.d.ts +215 -0
- package/dist/public_types_acoustic.d.ts.map +1 -0
- package/dist/public_types_mastering.d.ts +528 -0
- package/dist/public_types_mastering.d.ts.map +1 -0
- package/dist/public_types_mixing.d.ts +436 -0
- package/dist/public_types_mixing.d.ts.map +1 -0
- package/dist/public_types_music.d.ts +619 -0
- package/dist/public_types_music.d.ts.map +1 -0
- package/dist/public_types_playback.d.ts +165 -0
- package/dist/public_types_playback.d.ts.map +1 -0
- package/dist/public_types_realtime.d.ts +174 -0
- package/dist/public_types_realtime.d.ts.map +1 -0
- package/dist/public_types_repair.d.ts +424 -0
- package/dist/public_types_repair.d.ts.map +1 -0
- package/dist/public_types_spectral.d.ts +697 -0
- package/dist/public_types_spectral.d.ts.map +1 -0
- package/dist/quick_analysis.d.ts +445 -0
- package/dist/quick_analysis.d.ts.map +1 -0
- package/dist/realtime_engine.d.ts +893 -0
- package/dist/realtime_engine.d.ts.map +1 -0
- package/dist/realtime_voice_changer.d.ts +158 -0
- package/dist/realtime_voice_changer.d.ts.map +1 -0
- package/dist/repair_dereverb.d.ts +187 -0
- package/dist/repair_dereverb.d.ts.map +1 -0
- package/dist/repair_impulsive.d.ts +186 -0
- package/dist/repair_impulsive.d.ts.map +1 -0
- package/dist/repair_noise.d.ts +239 -0
- package/dist/repair_noise.d.ts.map +1 -0
- package/dist/repair_trim.d.ts +123 -0
- package/dist/repair_trim.d.ts.map +1 -0
- package/dist/sample_bank.d.ts +84 -0
- package/dist/sample_bank.d.ts.map +1 -0
- package/dist/scale.d.ts +10 -0
- package/dist/scale.d.ts.map +1 -0
- package/dist/schemas/mixer-scene.schema.json +393 -0
- package/dist/schemas/playback-renderer-config.schema.json +392 -0
- package/dist/sonare-analysis.d.ts +8 -0
- package/dist/sonare-analysis.js +2 -2
- package/dist/sonare-analysis.wasm +0 -0
- package/dist/sonare.d.ts +3945 -0
- package/dist/sonare.js +2 -2
- package/dist/sonare.wasm +0 -0
- package/dist/stream_analyzer.d.ts +163 -0
- package/dist/stream_analyzer.d.ts.map +1 -0
- package/dist/stream_types.d.ts +214 -0
- package/dist/stream_types.d.ts.map +1 -0
- package/dist/streaming_mixing.d.ts +6 -0
- package/dist/streaming_mixing.d.ts.map +1 -0
- package/dist/streaming_processors.d.ts +340 -0
- package/dist/streaming_processors.d.ts.map +1 -0
- package/dist/transcribe.d.ts +77 -0
- package/dist/transcribe.d.ts.map +1 -0
- package/dist/validation.d.ts +140 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/web_midi.d.ts +77 -0
- package/dist/web_midi.d.ts.map +1 -0
- package/dist/worker.d.ts +5 -48
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +94 -41
- package/dist/worker.js.map +1 -1
- package/dist/worker_client.d.ts +96 -0
- package/dist/worker_client.d.ts.map +1 -0
- package/dist/worker_protocol.d.ts +43 -0
- package/dist/worker_protocol.d.ts.map +1 -0
- package/dist/worklet/audio_types.d.ts +21 -0
- package/dist/worklet/audio_types.d.ts.map +1 -0
- package/dist/worklet/engine-automation.d.ts +29 -0
- package/dist/worklet/engine-automation.d.ts.map +1 -0
- package/dist/worklet/engine-capture-facade.d.ts +35 -0
- package/dist/worklet/engine-capture-facade.d.ts.map +1 -0
- package/dist/worklet/engine-clips.d.ts +23 -0
- package/dist/worklet/engine-clips.d.ts.map +1 -0
- package/dist/worklet/engine-markers.d.ts +40 -0
- package/dist/worklet/engine-markers.d.ts.map +1 -0
- package/dist/worklet/engine-mixer-facade.d.ts +164 -0
- package/dist/worklet/engine-mixer-facade.d.ts.map +1 -0
- package/dist/worklet/engine-node.d.ts +83 -0
- package/dist/worklet/engine-node.d.ts.map +1 -0
- package/dist/worklet/engine-offline.d.ts +81 -0
- package/dist/worklet/engine-offline.d.ts.map +1 -0
- package/dist/worklet/engine-options.d.ts +12 -0
- package/dist/worklet/engine-options.d.ts.map +1 -0
- package/dist/worklet/engine-parameter-facade.d.ts +106 -0
- package/dist/worklet/engine-parameter-facade.d.ts.map +1 -0
- package/dist/worklet/engine-processor.d.ts +72 -0
- package/dist/worklet/engine-processor.d.ts.map +1 -0
- package/dist/worklet/engine-register.d.ts +2 -0
- package/dist/worklet/engine-register.d.ts.map +1 -0
- package/dist/worklet/engine-strips.d.ts +75 -0
- package/dist/worklet/engine-strips.d.ts.map +1 -0
- package/dist/worklet/engine-sync.d.ts +39 -0
- package/dist/worklet/engine-sync.d.ts.map +1 -0
- package/dist/worklet/engine-tempo-facade.d.ts +48 -0
- package/dist/worklet/engine-tempo-facade.d.ts.map +1 -0
- package/dist/worklet/engine.d.ts +418 -0
- package/dist/worklet/engine.d.ts.map +1 -0
- package/dist/worklet/guards.d.ts +53 -0
- package/dist/worklet/guards.d.ts.map +1 -0
- package/dist/worklet/messages.d.ts +710 -0
- package/dist/worklet/messages.d.ts.map +1 -0
- package/dist/worklet/mixer-processor.d.ts +46 -0
- package/dist/worklet/mixer-processor.d.ts.map +1 -0
- package/dist/worklet/playback-processor.d.ts +62 -0
- package/dist/worklet/playback-processor.d.ts.map +1 -0
- package/dist/worklet/protocol.d.ts +331 -0
- package/dist/worklet/protocol.d.ts.map +1 -0
- package/dist/worklet/voice-changer-processor.d.ts +41 -0
- package/dist/worklet/voice-changer-processor.d.ts.map +1 -0
- package/dist/worklet.d.ts +16 -2515
- package/dist/worklet.d.ts.map +1 -0
- package/dist/worklet.js +3200 -541
- package/dist/worklet.js.map +1 -1
- package/package.json +23 -12
- package/src/_effects_common.ts +47 -0
- package/src/_feature_validation.ts +34 -0
- package/src/_fft_options.ts +39 -0
- package/src/align_take.ts +64 -0
- package/src/analysis.ts +56 -3
- package/src/analysis_helpers.ts +7 -0
- package/src/audio.ts +106 -3
- package/src/codes.ts +39 -2
- package/src/effects_mastering.ts +101 -22
- package/src/effects_note_ops.ts +683 -0
- package/src/effects_percussive.ts +217 -0
- package/src/effects_separation.ts +150 -0
- package/src/effects_spectral.ts +60 -0
- package/src/effects_timepitch.ts +388 -0
- package/src/errors.ts +23 -1
- package/src/feature_core.ts +127 -2
- package/src/feature_decompose.ts +633 -0
- package/src/feature_inverse.ts +454 -0
- package/src/feature_loudness.ts +125 -0
- package/src/feature_music.ts +107 -14
- package/src/feature_pitch.ts +96 -1
- package/src/feature_spectral.ts +16 -611
- package/src/feature_spectrogram.ts +63 -450
- package/src/features.ts +36 -22
- package/src/index.ts +288 -30
- package/src/instrument_types.ts +645 -0
- package/src/live_audio.ts +27 -1
- package/src/mastering_chain.ts +184 -0
- package/src/mastering_core.ts +441 -32
- package/src/mastering_dynamics.ts +22 -11
- package/src/metering.ts +67 -24
- package/src/mixer.ts +251 -22
- package/src/mixing_assistant.ts +138 -0
- package/src/mixing_oneshot.ts +10 -5
- package/src/module_state.ts +24 -2
- package/src/playback_renderer.ts +252 -0
- package/src/polyphony.ts +279 -0
- package/src/project.ts +61 -24
- package/src/project_class.ts +450 -27
- package/src/project_internal.ts +149 -42
- package/src/project_synth.ts +67 -1
- package/src/project_types.ts +271 -271
- package/src/public_types.ts +122 -3
- package/src/public_types_acoustic.ts +112 -3
- package/src/public_types_mastering.ts +275 -73
- package/src/public_types_mixing.ts +363 -1
- package/src/public_types_music.ts +312 -2
- package/src/public_types_playback.ts +196 -0
- package/src/public_types_realtime.ts +39 -7
- package/src/public_types_repair.ts +446 -0
- package/src/public_types_spectral.ts +491 -5
- package/src/quick_analysis.ts +203 -26
- package/src/realtime_engine.ts +773 -34
- package/src/realtime_voice_changer.ts +55 -1
- package/src/repair_dereverb.ts +299 -0
- package/src/repair_impulsive.ts +395 -0
- package/src/repair_noise.ts +425 -0
- package/src/repair_trim.ts +226 -0
- package/src/sample_bank.ts +113 -0
- package/src/sonare.js.d.ts +1158 -30
- package/src/stream_analyzer.ts +36 -4
- package/src/stream_types.ts +37 -0
- package/src/streaming_mixing.ts +1 -1
- package/src/streaming_processors.ts +202 -10
- package/src/transcribe.ts +89 -0
- package/src/validation.ts +285 -11
- package/src/web_midi.ts +1 -6
- package/src/worker.ts +18 -2
- package/src/worklet/audio_types.ts +37 -0
- package/src/worklet/engine-mixer-facade.ts +800 -32
- package/src/worklet/engine-node.ts +99 -29
- package/src/worklet/engine-offline.ts +14 -8
- package/src/worklet/engine-parameter-facade.ts +21 -0
- package/src/worklet/engine-processor.ts +332 -93
- package/src/worklet/engine-register.ts +32 -18
- package/src/worklet/engine-strips.ts +275 -9
- package/src/worklet/engine-sync.ts +20 -7
- package/src/worklet/engine.ts +394 -48
- package/src/worklet/guards.ts +195 -44
- package/src/worklet/messages.ts +229 -2
- package/src/worklet/mixer-processor.ts +117 -48
- package/src/worklet/playback-processor.ts +300 -0
- package/src/worklet/protocol.ts +82 -11
- package/src/worklet/voice-changer-processor.ts +17 -11
- package/src/worklet.ts +17 -0
- package/src/effects_transform.ts +0 -718
- package/src/mastering_repair.ts +0 -273
package/src/public_types.ts
CHANGED
|
@@ -2,7 +2,9 @@ export * from './public_types_acoustic';
|
|
|
2
2
|
export * from './public_types_mastering';
|
|
3
3
|
export * from './public_types_mixing';
|
|
4
4
|
export * from './public_types_music';
|
|
5
|
+
export * from './public_types_playback';
|
|
5
6
|
export * from './public_types_realtime';
|
|
7
|
+
export * from './public_types_repair';
|
|
6
8
|
export * from './public_types_spectral';
|
|
7
9
|
|
|
8
10
|
/** Runtime capabilities reported by the loaded libsonare build. */
|
|
@@ -16,8 +18,32 @@ export interface SonareCapabilities {
|
|
|
16
18
|
features: {
|
|
17
19
|
mastering: boolean;
|
|
18
20
|
mixing: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* True when the offline mixing assistant is compiled in. Separate from
|
|
23
|
+
* `mixing` because it can be dropped on its own — the analysis-only bundle
|
|
24
|
+
* has it off — and its entry points stay registered either way, throwing
|
|
25
|
+
* rather than disappearing, so probing for the function tells a host
|
|
26
|
+
* nothing.
|
|
27
|
+
*/
|
|
28
|
+
mixingAssistant: boolean;
|
|
19
29
|
fx: boolean;
|
|
20
30
|
ffmpeg: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* True when hosted instruments expose continuously automatable
|
|
33
|
+
* parameters (`RealtimeEngine.resolveInstrumentAutomationId`).
|
|
34
|
+
*/
|
|
35
|
+
instrumentParamAutomation: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The four below name the remaining build options that change which
|
|
38
|
+
* commands and entry points a binary answers. Without them a caller can
|
|
39
|
+
* observe that a capability is missing but not that it was never built.
|
|
40
|
+
*/
|
|
41
|
+
arrangement: boolean;
|
|
42
|
+
acousticSim: boolean;
|
|
43
|
+
pitchEditor: boolean;
|
|
44
|
+
voiceChanger: boolean;
|
|
45
|
+
/** True when the playback renderer (upmix, binaural, speaker output) is compiled in. */
|
|
46
|
+
playback: boolean;
|
|
21
47
|
};
|
|
22
48
|
decode: {
|
|
23
49
|
builtin: string[];
|
|
@@ -27,16 +53,89 @@ export interface SonareCapabilities {
|
|
|
27
53
|
hardwareConcurrency: number;
|
|
28
54
|
}
|
|
29
55
|
|
|
30
|
-
/** One
|
|
56
|
+
/** One named value an enum- or closed-integer-typed insert param accepts. */
|
|
57
|
+
export interface MasteringInsertParamChoice {
|
|
58
|
+
/** Display/identification name (lowerCamelCase); never accepted as input. */
|
|
59
|
+
name: string;
|
|
60
|
+
/** The numeric wire value construction reads for this choice. */
|
|
61
|
+
value: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A group of an insert's keys that exists only under a condition: an EQ band,
|
|
66
|
+
* a multiband crossover band, or a dynamic sub-band inside one. A parameter
|
|
67
|
+
* belongs to the slot its `slot` field names.
|
|
68
|
+
*/
|
|
69
|
+
export interface MasteringInsertSlot {
|
|
70
|
+
/** Key prefix without the trailing dot, e.g. `midBand3` or `band1.dyn2`. */
|
|
71
|
+
name: string;
|
|
72
|
+
/**
|
|
73
|
+
* Enclosing slot, which has to exist for this one to; null for a top-level
|
|
74
|
+
* slot. A parent is always listed before the slots naming it.
|
|
75
|
+
*/
|
|
76
|
+
parent: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* `anyKey`: the slot exists once any one of its keys is supplied, so an EQ
|
|
79
|
+
* band is built as soon as a host sends any of its keys. `always`: it exists
|
|
80
|
+
* without any of its keys, subject to `minCrossoverCutoffs`.
|
|
81
|
+
*/
|
|
82
|
+
activation: 'anyKey' | 'always';
|
|
83
|
+
/**
|
|
84
|
+
* Crossover cutoffs (`cutoff<i>Hz` keys) the insert needs in effect for the
|
|
85
|
+
* slot to exist; 0 when it needs none. With no cutoff key supplied, the
|
|
86
|
+
* default split applies: the cutoffs that publish a non-null default.
|
|
87
|
+
*/
|
|
88
|
+
minCrossoverCutoffs: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* One parameter descriptor in the cross-surface capability catalog, covering
|
|
93
|
+
* every key a processor's construction reads. Entries come in two runs: first
|
|
94
|
+
* the processor's realtime automation targets in id order (`id` non-null),
|
|
95
|
+
* then, sorted by name, every other construction key with `id` null and
|
|
96
|
+
* `rtSafe` false.
|
|
97
|
+
*
|
|
98
|
+
* `type` is `"enum"` when `choices` names every declared enumerator
|
|
99
|
+
* construction accepts (sent as the number in its `choices` entry), or
|
|
100
|
+
* `"string"` / `"array"` for a construction-only key (an embedded impulse
|
|
101
|
+
* response, a per-band list) that reports null for `min`, `max`, `default`
|
|
102
|
+
* and `choices`.
|
|
103
|
+
*
|
|
104
|
+
* `default` is the value the processor uses when the key is absent, read from
|
|
105
|
+
* the config struct's own field initializer, an enum as its number; it is
|
|
106
|
+
* null for a param id with no construction key, a `"string"` / `"array"` key,
|
|
107
|
+
* or a construction key with no fallback.
|
|
108
|
+
*
|
|
109
|
+
* `min` and `max` are the range construction ACCEPTS, measured by handing
|
|
110
|
+
* candidate values to the same code path a caller would use. They are a hard
|
|
111
|
+
* constraint, not a recommended UI range — a value outside them is an error,
|
|
112
|
+
* while an unvalidated control (most gains) reports null on both, meaning
|
|
113
|
+
* "this catalog states no limit" rather than "unknown". Non-null only when
|
|
114
|
+
* `choices` is null: `choices` non-null names the closed accepted set instead
|
|
115
|
+
* (every declared enumerator, or a `"number"` key whose accepted integers
|
|
116
|
+
* have holes), and then both bounds are null. Three properties to plan for: a
|
|
117
|
+
* bound is measured with every other parameter at its default, so two
|
|
118
|
+
* parameters that constrain each other each report the other's default; a
|
|
119
|
+
* sample-rate-derived bound reflects the un-prepared processor and rises once
|
|
120
|
+
* the insert is prepared at a higher rate; and an exclusive bound is reported
|
|
121
|
+
* as its limit value, so a control requiring `> 0` reports `min` 0 and still
|
|
122
|
+
* rejects 0.
|
|
123
|
+
*/
|
|
31
124
|
export interface CapabilityCatalogParameter {
|
|
32
125
|
name: string;
|
|
33
|
-
id: number;
|
|
126
|
+
id: number | null;
|
|
34
127
|
rtSafe: boolean;
|
|
35
|
-
type: 'boolean' | 'number';
|
|
128
|
+
type: 'boolean' | 'number' | 'enum' | 'string' | 'array';
|
|
36
129
|
min: number | null;
|
|
37
130
|
max: number | null;
|
|
38
131
|
default: boolean | number | null;
|
|
39
132
|
unit: string | null;
|
|
133
|
+
choices: MasteringInsertParamChoice[] | null;
|
|
134
|
+
/**
|
|
135
|
+
* The {@link MasteringInsertSlot} this key belongs to, or null for a key that
|
|
136
|
+
* always exists.
|
|
137
|
+
*/
|
|
138
|
+
slot: string | null;
|
|
40
139
|
}
|
|
41
140
|
|
|
42
141
|
/** One named mastering processor and its host-facing capabilities. */
|
|
@@ -52,6 +151,11 @@ export interface CapabilityCatalogProcessor {
|
|
|
52
151
|
channelPolicy: 'multichannel' | 'stereoPairOnly' | 'perChannel' | 'passthrough';
|
|
53
152
|
category: string;
|
|
54
153
|
params: CapabilityCatalogParameter[];
|
|
154
|
+
/**
|
|
155
|
+
* The insert's conditional key groups in declaration order, named by each
|
|
156
|
+
* parameter's `slot`. Empty for entries that are not realtime-insertable.
|
|
157
|
+
*/
|
|
158
|
+
slots: MasteringInsertSlot[];
|
|
55
159
|
}
|
|
56
160
|
|
|
57
161
|
/** Built-in preset names grouped by feature family. */
|
|
@@ -60,6 +164,20 @@ export interface CapabilityCatalogPresets {
|
|
|
60
164
|
synth: string[];
|
|
61
165
|
mixingScene: string[];
|
|
62
166
|
voiceChanger: string[];
|
|
167
|
+
playbackRoom: string[];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* One entry of {@link CapabilityCatalog.masteringPresets}. The restoration
|
|
172
|
+
* kind's three loudness values are null: its repair stages leave level alone,
|
|
173
|
+
* so it carries no loudness target, ceiling or limiter allowance.
|
|
174
|
+
*/
|
|
175
|
+
export interface CapabilityCatalogMasteringPreset {
|
|
176
|
+
name: string;
|
|
177
|
+
kind: 'mastering' | 'restoration';
|
|
178
|
+
targetLufs: number | null;
|
|
179
|
+
truePeakCeilingDb: number | null;
|
|
180
|
+
maxLimiterGainReductionDb: number | null;
|
|
63
181
|
}
|
|
64
182
|
|
|
65
183
|
/** Complete runtime catalog exposed by {@link capabilityCatalog}. */
|
|
@@ -68,6 +186,7 @@ export interface CapabilityCatalog {
|
|
|
68
186
|
abi: SonareCapabilities['abi'];
|
|
69
187
|
processors: CapabilityCatalogProcessor[];
|
|
70
188
|
presets: CapabilityCatalogPresets;
|
|
189
|
+
masteringPresets: CapabilityCatalogMasteringPreset[];
|
|
71
190
|
}
|
|
72
191
|
|
|
73
192
|
/** Synchronous progress callback for offline operations. Its return value is ignored. */
|
|
@@ -13,7 +13,20 @@ export interface AcousticOptions extends ValidateOptions {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Room acoustic parameters from
|
|
16
|
+
* Room acoustic parameters from a blind recording or a measured impulse
|
|
17
|
+
* response (`isBlind` distinguishes the two).
|
|
18
|
+
*
|
|
19
|
+
* Only `rt60` (and `rt60Bands`) is estimated in both modes. `c50`/`c80`/`d50`
|
|
20
|
+
* and `edt` require a known direct-sound arrival time, which only a measured
|
|
21
|
+
* impulse response provides, so they are NaN when `isBlind` is true -- `edt`
|
|
22
|
+
* measures the 0 to -10 dB decay and the blind estimator only fits the late
|
|
23
|
+
* decay `rt60` comes from.
|
|
24
|
+
*
|
|
25
|
+
* A band array that was not computed is EMPTY, never zero-filled: a zero-filled
|
|
26
|
+
* clarity array is indistinguishable from a genuine 0 dB measurement. So
|
|
27
|
+
* `c50Bands` and `c80Bands` have length 0 when `isBlind` is true. `edtBands` is
|
|
28
|
+
* the exception -- it keeps its full length and is all NaN, so it can be indexed
|
|
29
|
+
* by the same band index as `rt60Bands`.
|
|
17
30
|
*/
|
|
18
31
|
export interface AcousticResult {
|
|
19
32
|
rt60: number;
|
|
@@ -34,14 +47,29 @@ export interface RoomGeometryOptions {
|
|
|
34
47
|
lengthM?: number;
|
|
35
48
|
widthM?: number;
|
|
36
49
|
heightM?: number;
|
|
37
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Uniform wall absorption, clamped to [0, 0.999] (the back-compat scalar).
|
|
52
|
+
* Defaults to 0.2. Higher absorption shortens RT60, so it changes both the
|
|
53
|
+
* rendered content and the tail length rather than only the timbre.
|
|
54
|
+
*/
|
|
38
55
|
absorption?: number;
|
|
39
56
|
/**
|
|
40
57
|
* Optional per-octave-band wall absorption (125/250/500/1k/2k/4k.. Hz). When
|
|
41
58
|
* provided it overrides `absorption` unless `materialPreset` is set.
|
|
59
|
+
*
|
|
60
|
+
* The late tail's decay time runs continuously between octave centres, so
|
|
61
|
+
* where absorption (a preset's included) changes steeply from one octave to
|
|
62
|
+
* the next, the octave-band RT60 measured back from the result leans toward
|
|
63
|
+
* the slower neighbour, as it does for a real room. The design value holds
|
|
64
|
+
* at the octave centre.
|
|
42
65
|
*/
|
|
43
66
|
bandAbsorption?: Float32Array | number[];
|
|
44
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Optional per-band wall scattering; missing bands default to 0. Independent
|
|
69
|
+
* of `bandAbsorption` and `materialPreset` — it applies to whichever material
|
|
70
|
+
* the absorption precedence selected, so a preset or a scalar-absorption room
|
|
71
|
+
* can still be given rough walls.
|
|
72
|
+
*/
|
|
45
73
|
bandScattering?: Float32Array | number[];
|
|
46
74
|
/**
|
|
47
75
|
* Named wall-material preset (0 none; 1 concrete, 2 wood, 3 curtain,
|
|
@@ -57,6 +85,25 @@ export interface RoomGeometryOptions {
|
|
|
57
85
|
ismOrder?: number;
|
|
58
86
|
seed?: number;
|
|
59
87
|
maxSeconds?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Add the ISO 9613-1 atmospheric-absorption term to the late tail's per-band
|
|
90
|
+
* RT60. Off by default so the RIR is unchanged; it mainly shortens the high
|
|
91
|
+
* bands of a large room.
|
|
92
|
+
*/
|
|
93
|
+
airAbsorptionEnabled?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Air temperature in degrees Celsius; 0 (or omitted) selects the ISO
|
|
96
|
+
* reference climate's 20 degC. A literal 0 degC is therefore not
|
|
97
|
+
* distinguishable from unset -- use 0.01 for a freezing room, which absorbs
|
|
98
|
+
* identically.
|
|
99
|
+
*/
|
|
100
|
+
airTemperatureC?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Relative humidity in percent; 0 (or omitted) selects the ISO reference
|
|
103
|
+
* climate's 50 %. Both climate values are read only while
|
|
104
|
+
* `airAbsorptionEnabled` is set.
|
|
105
|
+
*/
|
|
106
|
+
airHumidityPercent?: number;
|
|
60
107
|
}
|
|
61
108
|
|
|
62
109
|
export interface RirSynthOptions extends RoomGeometryOptions {
|
|
@@ -69,15 +116,41 @@ export interface RirSynthOptions extends RoomGeometryOptions {
|
|
|
69
116
|
crossfadeMs?: number;
|
|
70
117
|
}
|
|
71
118
|
|
|
119
|
+
/** One diagnostic reported by the RIR synthesizer. */
|
|
120
|
+
export interface RirDiagnostic {
|
|
121
|
+
/** Stable machine-readable id, e.g. `acoustic.source_outside_room`. */
|
|
122
|
+
code: string;
|
|
123
|
+
message: string;
|
|
124
|
+
severity: 'info' | 'warning' | 'error';
|
|
125
|
+
}
|
|
126
|
+
|
|
72
127
|
export interface RirResult {
|
|
73
128
|
rir: Float32Array;
|
|
74
129
|
sampleRate: number;
|
|
75
130
|
hasError: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* First error diagnostic as `code: message`, empty when `hasError` is false.
|
|
133
|
+
* Matches the string the C ABI leaves in `sonare_last_error_message()`.
|
|
134
|
+
*/
|
|
135
|
+
errorMessage: string;
|
|
136
|
+
/**
|
|
137
|
+
* Every diagnostic the synthesizer reported, in order. Warnings appear here on
|
|
138
|
+
* successful calls too — a `maxSeconds` clamp that cut the tail is a warning,
|
|
139
|
+
* not an error, and is otherwise indistinguishable from an untruncated RIR.
|
|
140
|
+
*/
|
|
141
|
+
diagnostics: RirDiagnostic[];
|
|
76
142
|
}
|
|
77
143
|
|
|
78
144
|
export interface RoomEstimateOptions {
|
|
79
145
|
aspectHintLw?: number;
|
|
80
146
|
aspectHintLh?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Mean-absorption prior anchoring the volume scale (0 = library default,
|
|
149
|
+
* 0.15). Clamped into `[0.01, 0.99]` rather than refused: a value outside that
|
|
150
|
+
* range still returns a successful estimate, computed from the clamped prior.
|
|
151
|
+
* The reported volume scales with the cube of the prior, so the substitution
|
|
152
|
+
* is worth three orders of magnitude at the low end.
|
|
153
|
+
*/
|
|
81
154
|
referenceAbsorption?: number;
|
|
82
155
|
preferEyring?: boolean;
|
|
83
156
|
nOctaveBands?: number;
|
|
@@ -90,6 +163,12 @@ export interface RoomEstimateOptions {
|
|
|
90
163
|
}
|
|
91
164
|
|
|
92
165
|
export interface RoomEstimateResult {
|
|
166
|
+
/**
|
|
167
|
+
* Equivalent volume (m^3) and representative dimensions (m). NaN, with
|
|
168
|
+
* `confidence` 0, when the recording has no measurable broadband decay
|
|
169
|
+
* (silence, or an RT60 the analyzer could not fit) — the acoustic family's
|
|
170
|
+
* "not measurable", as in `rt60Bands`.
|
|
171
|
+
*/
|
|
93
172
|
volume: number;
|
|
94
173
|
length: number;
|
|
95
174
|
width: number;
|
|
@@ -113,3 +192,33 @@ export interface RoomMorphOptions extends RoomGeometryOptions {
|
|
|
113
192
|
/** Equal-power crossfade width around the mixing time in ms (0 = default). */
|
|
114
193
|
crossfadeMs?: number;
|
|
115
194
|
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Morphed audio and what the target-room synthesis had to change to make it.
|
|
198
|
+
*
|
|
199
|
+
* Shaped like {@link RirResult} because the same synthesis runs underneath.
|
|
200
|
+
* There is no `hasError` / `errorMessage` counterpart: an unusable morph throws,
|
|
201
|
+
* so every entry in {@link RoomMorphResult.diagnostics} is a warning.
|
|
202
|
+
*/
|
|
203
|
+
export interface RoomMorphResult {
|
|
204
|
+
/** Morphed samples: input length plus the target room's reverb tail. */
|
|
205
|
+
audio: Float32Array;
|
|
206
|
+
sampleRate: number;
|
|
207
|
+
/**
|
|
208
|
+
* Every diagnostic the target-room synthesis reported, in order. Each says the
|
|
209
|
+
* morph went through a room other than the one requested — an image-source
|
|
210
|
+
* order reduced to the safe maximum (`acoustic.ism_order_clamped`), a tail cut
|
|
211
|
+
* against `maxSeconds` (`acoustic.rir_length_clamped`), a `maxSeconds` shorter
|
|
212
|
+
* than the direct sound's flight time and extended to fit it
|
|
213
|
+
* (`acoustic.rir_length_floored`), a `maxSeconds` shorter than the longest
|
|
214
|
+
* band's RT60, which cuts that band before it decays by 60 dB so its
|
|
215
|
+
* reverberation time cannot be measured from the RIR
|
|
216
|
+
* (`acoustic.rir_tail_truncated`), a request that produced no diffuse tail
|
|
217
|
+
* (`acoustic.no_late_tail`) — and is otherwise invisible.
|
|
218
|
+
*
|
|
219
|
+
* These are the five codes the synthesis can emit here, so a `switch` over
|
|
220
|
+
* them needs no fall-through case. `roomMorph` forwards `maxSeconds`
|
|
221
|
+
* unchanged, which is why the floored one reaches a morph at all.
|
|
222
|
+
*/
|
|
223
|
+
diagnostics: RirDiagnostic[];
|
|
224
|
+
}
|