@libraz/libsonare 1.7.0 → 1.7.2

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/dist/index.d.ts CHANGED
@@ -366,6 +366,15 @@ interface MasteringChainConfig {
366
366
  releaseMs?: number;
367
367
  applyGainAtInputRate?: boolean;
368
368
  };
369
+ /**
370
+ * Dot-notation spelling of any leaf above, e.g. `'loudness.targetLufs': -20`
371
+ * beside or instead of `loudness: { targetLufs: -20 }`. It is the form the C
372
+ * ABI carries parameters in, so a caller assembling overrides dynamically can
373
+ * emit it directly; the core validates the key and rejects an unknown one.
374
+ * The nested spelling is canonical — prefer it in hand-written code, where it
375
+ * is checked field by field while a dotted key is only checked at run time.
376
+ */
377
+ [flatKey: `${string}.${string}`]: number | boolean | undefined;
369
378
  }
370
379
  /**
371
380
  * Configuration for the block-by-block {@link StreamingMasteringChain}.
@@ -1027,6 +1036,14 @@ interface RealtimeVoiceChangerPodConfig {
1027
1036
  limiterIspCeilingDbtp: number;
1028
1037
  }
1029
1038
 
1039
+ /**
1040
+ * Per-frame voicing decision, one entry per `f0Hz` frame. A truthy or non-zero
1041
+ * entry marks the frame voiced. The union covers what the analysis side hands
1042
+ * back — `PitchResult.voicedFlag` is a `boolean[]` — as well as the typed and
1043
+ * plain numeric arrays a caller may build directly, so a pitch track can be fed
1044
+ * straight into pitch correction without a conversion step.
1045
+ */
1046
+ type VoicedFlags = Int32Array | Uint8Array | Float32Array | readonly number[] | readonly boolean[];
1030
1047
  /** Options for `pitchCorrectTimevarying`. All fields are optional. */
1031
1048
  interface PitchCorrectOptions extends ValidateOptions {
1032
1049
  /** `'midi'` retunes toward `targetMidi`; `'scale'` snaps to the key. Default `'midi'`. */
@@ -1047,8 +1064,8 @@ interface PitchCorrectOptions extends ValidateOptions {
1047
1064
  retuneSpeedMs?: number;
1048
1065
  /** Corrections below this are bypassed to preserve vibrato (cents). Default 20. */
1049
1066
  vibratoThresholdCents?: number;
1050
- /** Per-frame voiced flags (non-zero = voiced); omit to treat all frames as voiced. */
1051
- voiced?: Int32Array;
1067
+ /** Per-frame voiced flags (truthy = voiced); omit to treat all frames as voiced. */
1068
+ voiced?: VoicedFlags;
1052
1069
  /** Per-frame voicing probability in `[0, 1]`; omit to derive from `voiced`. */
1053
1070
  voicedProb?: Float32Array;
1054
1071
  }
@@ -1352,7 +1369,7 @@ interface PitchCorrectToMidiTimevaryingRequest extends ValidateOptions {
1352
1369
  targetMidi: number;
1353
1370
  sampleRate?: number;
1354
1371
  hopLength?: number;
1355
- voiced?: Int32Array;
1372
+ voiced?: VoicedFlags;
1356
1373
  voicedProb?: Float32Array;
1357
1374
  }
1358
1375
  interface PitchCorrectTimevaryingRequest extends PitchCorrectOptions {
@@ -1452,21 +1469,23 @@ declare function pitchCorrectToMidi(samples: Float32Array, sampleRate?: number,
1452
1469
  * Unlike {@link pitchCorrectToMidi} (a single constant transpose), this follows
1453
1470
  * the caller-supplied per-frame `f0Hz` contour and retunes every voiced frame
1454
1471
  * toward `targetMidi`, so vibrato/drift in the source is tracked rather than
1455
- * flattened. `voiced` (non-zero = voiced) and `voicedProb` ([0,1]) are optional;
1472
+ * flattened. `voiced` (truthy = voiced) and `voicedProb` ([0,1]) are optional;
1456
1473
  * omitting them treats every frame as voiced. An `f0Hz` NaN is accepted only
1457
- * when the corresponding `voiced` entry is zero, matching pYIN output.
1474
+ * when the corresponding `voiced` entry is falsy, matching pYIN output. The
1475
+ * `voicedFlag` / `voicedProb` arrays of a {@link PitchResult} can be passed
1476
+ * through directly.
1458
1477
  *
1459
1478
  * @param samples - Audio samples (mono, float32)
1460
1479
  * @param f0Hz - Per-frame measured F0 in Hz (one entry per analysis frame)
1461
1480
  * @param targetMidi - Desired MIDI note number
1462
1481
  * @param sampleRate - Sample rate in Hz
1463
1482
  * @param hopLength - F0 hop in samples (frame i covers sample i*hopLength)
1464
- * @param voiced - Optional per-frame voiced flags (non-zero = voiced)
1483
+ * @param voiced - Optional per-frame voiced flags (truthy = voiced)
1465
1484
  * @param voicedProb - Optional per-frame voicing probability in [0, 1]
1466
1485
  * @returns Pitch-corrected audio
1467
1486
  */
1468
1487
  declare function pitchCorrectToMidiTimevarying(request: PitchCorrectToMidiTimevaryingRequest): Float32Array;
1469
- declare function pitchCorrectToMidiTimevarying(samples: Float32Array, f0Hz: Float32Array, targetMidi: number, sampleRate?: number, hopLength?: number, voiced?: Int32Array, voicedProb?: Float32Array, options?: ValidateOptions): Float32Array;
1488
+ declare function pitchCorrectToMidiTimevarying(samples: Float32Array, f0Hz: Float32Array, targetMidi: number, sampleRate?: number, hopLength?: number, voiced?: VoicedFlags, voicedProb?: Float32Array, options?: ValidateOptions): Float32Array;
1470
1489
  /**
1471
1490
  * Contour-following pitch correction toward a fixed MIDI note OR a musical
1472
1491
  * scale, with tunable retune strength and vibrato preservation.
@@ -1757,6 +1776,20 @@ interface MasteringStreamingPreviewRequest {
1757
1776
  sampleRate?: number;
1758
1777
  platforms?: StreamingPlatform[];
1759
1778
  }
1779
+ /** Canonical request form for the stereo analysis entry points. */
1780
+ interface MasteringStereoParamsRequest {
1781
+ left: Float32Array;
1782
+ right: Float32Array;
1783
+ sampleRate?: number;
1784
+ params?: MasteringProcessorParams;
1785
+ }
1786
+ /** Canonical request form for the stereo streaming-platform preview. */
1787
+ interface MasteringStreamingPreviewStereoRequest {
1788
+ left: Float32Array;
1789
+ right: Float32Array;
1790
+ sampleRate?: number;
1791
+ platforms?: StreamingPlatform[];
1792
+ }
1760
1793
  /**
1761
1794
  * Apply mastering loudness normalization with a true-peak ceiling.
1762
1795
  *
@@ -1885,6 +1918,34 @@ declare function masteringAudioProfile(request: MasteringSamplesParamsRequest):
1885
1918
  declare function masteringAudioProfile(samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
1886
1919
  declare function masteringStreamingPreview(request: MasteringStreamingPreviewRequest): string;
1887
1920
  declare function masteringStreamingPreview(samples: Float32Array, sampleRate?: number, platforms?: StreamingPlatform[]): string;
1921
+ /**
1922
+ * Suggest a mastering chain for a stereo pair, as shared JSON.
1923
+ *
1924
+ * Profiles through {@link masteringAudioProfileStereo}, so the loudness stage
1925
+ * of the suggestion is built on the channel-summed program rather than a
1926
+ * downmix that reads roughly 6 dB low.
1927
+ */
1928
+ declare function masteringAssistantSuggestStereo(request: MasteringStereoParamsRequest): string;
1929
+ /**
1930
+ * Mastering assistant profile of a stereo pair, as shared JSON.
1931
+ *
1932
+ * Only the `loudness` block is measured from the two channels: integrated LUFS
1933
+ * and LRA come from the channel-summed program and the true peak is the larger
1934
+ * of the two. The spectral, dynamics and tempo fields describe shape and timing
1935
+ * rather than absolute level and are measured on the downmix, which keeps them
1936
+ * comparable with {@link masteringAudioProfile}.
1937
+ */
1938
+ declare function masteringAudioProfileStereo(request: MasteringStereoParamsRequest): string;
1939
+ /**
1940
+ * Preview streaming-platform normalization for a stereo pair, as shared JSON.
1941
+ *
1942
+ * Measures the integrated loudness with BS.1770 channel summing and reports the
1943
+ * larger of the two channel true peaks. Passing a `0.5 * (left + right)` downmix
1944
+ * to {@link masteringStreamingPreview} instead reads roughly 6 dB low on
1945
+ * decorrelated material, and both the normalization gain and the ceiling-risk
1946
+ * flag follow from that measurement.
1947
+ */
1948
+ declare function masteringStreamingPreviewStereo(request: MasteringStreamingPreviewStereoRequest): string;
1888
1949
 
1889
1950
  /** Compressor sidechain detector mode. */
1890
1951
  type CompressorDetector = 'peak' | 'rms' | 'log_rms';
@@ -2455,12 +2516,11 @@ interface SynthModRouting {
2455
2516
  *
2456
2517
  * The patch starts from a BASE — the named `preset` (see
2457
2518
  * {@link synthPresetNames}; a `"va:"` routing prefix is accepted) or, when
2458
- * `preset` is omitted, the default subtractive patch. Every numeric field then
2459
- * uses "0 / omit => keep the base value" (non-zero values override, clamped to
2460
- * their audible ranges) and the enum fields reserve `'default'` as keep. The
2461
- * frozen C ABI has no per-field presence bits, so explicit zero numeric
2462
- * overrides (for example `ampSustain: 0`) cannot be represented; they keep the
2463
- * base value. A non-empty `modRoutings` REPLACES the base mod matrix.
2519
+ * `preset` is omitted, the default subtractive patch. Omitting a numeric field
2520
+ * keeps the base value; supplying one overrides it (clamped to its audible
2521
+ * range), including an explicit `0` such as `stereoSpread: 0`. The enum fields
2522
+ * reserve `'default'` as keep. A `modRoutings` array REPLACES the base mod
2523
+ * matrix, and an empty array clears it, while omitting the key keeps it.
2464
2524
  *
2465
2525
  * Mode-specific deep parameters (FM operator stacks, modal mode tables,
2466
2526
  * drawbar registrations, kit pieces, piano strings) travel inside the named
@@ -2496,12 +2556,10 @@ interface SynthPatch {
2496
2556
  velToCutoffCents?: number;
2497
2557
  ampAttackMs?: number;
2498
2558
  ampDecayMs?: number;
2499
- /** 0 / omit keeps the base value; explicit zero sustain is not representable. */
2500
2559
  ampSustain?: number;
2501
2560
  ampReleaseMs?: number;
2502
2561
  filterAttackMs?: number;
2503
2562
  filterDecayMs?: number;
2504
- /** 0 / omit keeps the base value; explicit zero sustain is not representable. */
2505
2563
  filterSustain?: number;
2506
2564
  filterReleaseMs?: number;
2507
2565
  lfoRateHz?: number;
@@ -2767,6 +2825,37 @@ interface ProjectNotePairValidation {
2767
2825
  /** Count of note-offs with no preceding matching note-on. */
2768
2826
  unmatchedNoteOffs: number;
2769
2827
  }
2828
+ /**
2829
+ * Request form of {@link Project.bakeMidiFx}. The positional
2830
+ * `(clipId, configJson)` call stays supported and normalizes to this shape.
2831
+ */
2832
+ interface ProjectMidiFxBakeRequest {
2833
+ /** Target MIDI clip id. */
2834
+ clipId: number;
2835
+ /** MIDI-FX chain configuration as JSON. */
2836
+ configJson: string;
2837
+ /** Return per-event provenance in the result. Default false. */
2838
+ withSourceIndex?: boolean;
2839
+ }
2840
+ /** Result of the request form of {@link Project.bakeMidiFx}. */
2841
+ interface ProjectMidiFxBakeResult {
2842
+ /**
2843
+ * One entry per transformed event in canonical order: the index of the input
2844
+ * event it derives from, or -1 for an event with no originating input. Chord
2845
+ * and arpeggiator fan-out makes several outputs share one source index, so a
2846
+ * caller that treats the first output per index as the same event and the
2847
+ * rest as newly generated can carry a selection across the bake. Present only
2848
+ * when the request set `withSourceIndex`.
2849
+ */
2850
+ sourceIndex?: Int32Array;
2851
+ }
2852
+ /** Request form of {@link Project.previewMidiFxCount}. */
2853
+ interface ProjectMidiFxPreviewRequest {
2854
+ /** Target MIDI clip id. */
2855
+ clipId: number;
2856
+ /** MIDI-FX chain configuration as JSON. */
2857
+ configJson: string;
2858
+ }
2770
2859
  /** One compile diagnostic (mirrors SonareProjectDiagnostic). */
2771
2860
  interface ProjectDiagnostic {
2772
2861
  code: number;
@@ -2976,6 +3065,17 @@ declare class Project {
2976
3065
  * drained without truncation; failure leaves the original clip unchanged.
2977
3066
  */
2978
3067
  bakeMidiFx(clipId: number, configJson: string): void;
3068
+ /**
3069
+ * Request form. Setting `withSourceIndex` also returns per-event provenance,
3070
+ * so a selection or an editorial annotation can be carried across the bake.
3071
+ */
3072
+ bakeMidiFx(request: ProjectMidiFxBakeRequest): ProjectMidiFxBakeResult;
3073
+ /**
3074
+ * Count the events {@link bakeMidiFx} would produce for this clip and
3075
+ * configuration, without mutating the project. The transform is
3076
+ * deterministic, so the count matches what the bake goes on to produce.
3077
+ */
3078
+ previewMidiFxCount(request: ProjectMidiFxPreviewRequest): number;
2979
3079
  /** Backward alias for {@link bakeMidiFx}. */
2980
3080
  setMidiFx(clipId: number, configJson: string): void;
2981
3081
  /**
@@ -3534,6 +3634,15 @@ declare class RealtimeEngine {
3534
3634
  * Returns `-1` when the track, insert, or name is unknown. (The Python binding
3535
3635
  * raises a `SonareError` for an unknown id where Node/WASM return the `-1`
3536
3636
  * sentinel.)
3637
+ *
3638
+ * This trio is how a mastering processor gets time-varying automation: the
3639
+ * `eq.*`, `dynamics.*`, `saturation.*`, `spectral.*`, `stereo.*`,
3640
+ * `maximizer.*` and `multiband.*` processors are all available as strip
3641
+ * inserts, so placing one on a strip and resolving its parameter here drives
3642
+ * it at audio-block precision, live and offline alike. The whole-signal
3643
+ * stages of the offline mastering chain (`repair.*`, `loudness`, and the
3644
+ * match stages) have no insert form and no automation id: they buffer the
3645
+ * entire signal by construction and do not run on the realtime path.
3537
3646
  */
3538
3647
  resolveTrackInsertAutomationId(trackId: number, insertIndex: number, paramName: string): number;
3539
3648
  resolveMasterInsertAutomationId(insertIndex: number, paramName: string): number;
@@ -3600,6 +3709,27 @@ declare class RealtimeEngine {
3600
3709
  * `prepareChannels`.
3601
3710
  */
3602
3711
  processPrepared(numFrames: number): void;
3712
+ /**
3713
+ * Allocates the cue-bus counterpart of {@link prepareChannels}. Needed only
3714
+ * when PFL/AFL monitoring must reach a separate output: `processPrepared`
3715
+ * folds the cue bus into the program output, while
3716
+ * {@link processPreparedWithMonitor} keeps the two apart. Call once, off the
3717
+ * audio thread, with at least as many channels as `prepareChannels` got.
3718
+ */
3719
+ prepareMonitorChannels(numChannels: number, maxFrames: number): void;
3720
+ /**
3721
+ * Returns a Float32Array view onto the persistent cue-bus scratch for one
3722
+ * channel (valid for up to `numFrames`). Read it after
3723
+ * {@link processPreparedWithMonitor}. Re-acquire after WASM memory growth.
3724
+ */
3725
+ getMonitorChannelBuffer(channel: number, numFrames: number): Float32Array;
3726
+ /**
3727
+ * Runs the engine in place over the prepared scratch, writing the cue bus to
3728
+ * the monitor scratch instead of folding it into the program output.
3729
+ * Allocation-free: safe on the AudioWorklet render thread after
3730
+ * `prepareChannels` and `prepareMonitorChannels`.
3731
+ */
3732
+ processPreparedWithMonitor(numFrames: number): void;
3603
3733
  processWithMonitor(channels: Float32Array[]): WasmEngineProcessWithMonitorResult;
3604
3734
  renderOffline(channels: Float32Array[], blockSize?: number): Float32Array[];
3605
3735
  bounceOffline(options: EngineBounceOptions): EngineBounceResult;
@@ -5036,6 +5166,207 @@ declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFra
5036
5166
  declare function chroma(request: SpectrogramRequest): ChromaResult;
5037
5167
  declare function chroma(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): ChromaResult;
5038
5168
 
5169
+ type EqPhaseMode = 'zero' | 'zero-latency' | 'zero_latency' | 'natural' | 'natural-phase' | 'natural_phase' | 'linear' | 'linear-phase' | 'linear_phase' | number;
5170
+ /**
5171
+ * Block-by-block streaming variant of {@link masteringChain}.
5172
+ *
5173
+ * Maintains processor state across {@link processMono}/{@link processStereo}
5174
+ * calls. Only ProcessorBase-backed stages are supported. Configurations that
5175
+ * enable `repair.denoise` throw at construction. An enabled `loudness` stage
5176
+ * also throws unless {@link StreamingMasteringChainConfig.loudnessStaticGainDb}
5177
+ * supplies a precomputed normalization gain.
5178
+ *
5179
+ * Call {@link delete} (or use a `try/finally`) to release the underlying WASM
5180
+ * object — the embind handle is not garbage-collected automatically.
5181
+ *
5182
+ * Reachable from the AudioWorklet realm through the `sonare/worklet` entry, but
5183
+ * the realtime contract is the caller's to keep:
5184
+ *
5185
+ * - {@link prepare} builds the processors and allocates. Call it once from a
5186
+ * message handler, never from `AudioWorkletProcessor.process()`.
5187
+ * - {@link processMono}/{@link processStereo} return fresh arrays. On the render
5188
+ * thread, reuse the returned reference for the block rather than retaining it.
5189
+ * - An enabled `loudness` stage needs `loudnessStaticGainDb` measured offline,
5190
+ * because whole-signal integrated LUFS cannot be measured block by block. Pass
5191
+ * `loudnessStaticGainPeakDb` too and the static gain is clamped exactly as the
5192
+ * offline chain clamps it, so the live preview matches the render.
5193
+ * - {@link flush} output starts {@link latencySamples} samples early; discard
5194
+ * that many leading samples when time alignment matters.
5195
+ *
5196
+ * The chain is a host-side stage, not an engine insert: it does not participate
5197
+ * in the engine's PDC or bypass, so latency compensation against other engine
5198
+ * outputs is also the caller's.
5199
+ *
5200
+ * @example
5201
+ * ```typescript
5202
+ * const chain = new StreamingMasteringChain({ eq: { tiltDb: 1.0 } });
5203
+ * try {
5204
+ * chain.prepare(44100, 512, 1);
5205
+ * const out = chain.processMono(blockSamples);
5206
+ * } finally {
5207
+ * chain.delete();
5208
+ * }
5209
+ * ```
5210
+ */
5211
+ declare class StreamingMasteringChain {
5212
+ private chain;
5213
+ constructor(config: StreamingMasteringChainConfig);
5214
+ /**
5215
+ * Initialize processors for the given sample rate and block layout.
5216
+ *
5217
+ * @param sampleRate - Sample rate in Hz
5218
+ * @param maxBlockSize - Maximum block size per process call
5219
+ * @param numChannels - 1 (mono) or 2 (stereo)
5220
+ */
5221
+ prepare(sampleRate: number, maxBlockSize: number, numChannels: number): void;
5222
+ /**
5223
+ * Process one mono block, returning the processed samples (same length).
5224
+ */
5225
+ processMono(samples: Float32Array): Float32Array;
5226
+ /**
5227
+ * Process one stereo block, returning the processed channels.
5228
+ */
5229
+ processStereo(left: Float32Array, right: Float32Array): {
5230
+ left: Float32Array;
5231
+ right: Float32Array;
5232
+ };
5233
+ /**
5234
+ * Emit delayed audio and finite processor tails after the final mono block.
5235
+ * Call until this returns an empty array. The initial `latencySamples()`
5236
+ * samples of the concatenated stream are delayed and should be discarded for
5237
+ * time-aligned output.
5238
+ */
5239
+ flushMono(): Float32Array;
5240
+ /** Stereo counterpart of {@link flushMono}. */
5241
+ flushStereo(): {
5242
+ left: Float32Array;
5243
+ right: Float32Array;
5244
+ };
5245
+ /** Reset all processor state without rebuilding. */
5246
+ reset(): void;
5247
+ /** Total reported latency in samples across all active processors. */
5248
+ latencySamples(): number;
5249
+ /** Ordered stage names that will run (e.g. `"eq.tilt"`). */
5250
+ stageNames(): string[];
5251
+ /** Release the underlying WASM object. Safe to call only once. */
5252
+ delete(): void;
5253
+ }
5254
+ /**
5255
+ * Block-by-block streaming equalizer wrapping the unified C++
5256
+ * `EqualizerProcessor` (up to 24 bands, RBJ/Vicanek biquads, dynamic EQ,
5257
+ * linear-phase FIR, mid/side processing, and auto-gain).
5258
+ *
5259
+ * State is maintained across {@link processMono}/{@link processStereo} calls.
5260
+ * Call {@link delete} (or use `try/finally`) to release the underlying WASM
5261
+ * object — the embind handle is not garbage-collected automatically.
5262
+ *
5263
+ * @example
5264
+ * ```typescript
5265
+ * const eq = new StreamingEqualizer({ sampleRate: 48000, maxBlockSize: 512 });
5266
+ * try {
5267
+ * eq.setBand(0, { type: 'HighShelf', frequencyHz: 8000, gainDb: 6, enabled: true });
5268
+ * const out = eq.processStereo(left, right);
5269
+ * const snapshot = eq.spectrum();
5270
+ * } finally {
5271
+ * eq.delete();
5272
+ * }
5273
+ * ```
5274
+ */
5275
+ declare class StreamingEqualizer {
5276
+ private eq;
5277
+ constructor(config?: StreamingEqualizerConfig);
5278
+ /**
5279
+ * Configure the band at `index` (0..23). Omitted fields use C++ defaults.
5280
+ */
5281
+ setBand(index: number, band: EqBand): void;
5282
+ /** Disable and reset every band. */
5283
+ clear(): void;
5284
+ /**
5285
+ * Set the global phase mode: `'zero'` | `'natural'` | `'linear'` or 1/2/3.
5286
+ */
5287
+ setPhaseMode(mode: EqPhaseMode): void;
5288
+ /** Enable or disable output auto-gain compensation. */
5289
+ setAutoGain(enabled: boolean): void;
5290
+ /** Set all-band EQ gain scale as a 0.0..2.0 multiplier. */
5291
+ setGainScale(scale: number): void;
5292
+ /** Set post-EQ output gain in dB. */
5293
+ setOutputGainDb(gainDb: number): void;
5294
+ /** Set post-EQ stereo balance in -1.0..1.0; mono input ignores pan. */
5295
+ setOutputPan(pan: number): void;
5296
+ /**
5297
+ * Provide a mono external sidechain key for dynamic bands that opt into
5298
+ * `external_sidechain`. The samples are copied into an owned buffer.
5299
+ */
5300
+ setSidechainMono(samples: Float32Array): void;
5301
+ /**
5302
+ * Provide a stereo external sidechain key. Both channels must match length.
5303
+ */
5304
+ setSidechainStereo(left: Float32Array, right: Float32Array): void;
5305
+ /** Release any borrowed external sidechain buffers. */
5306
+ clearSidechain(): void;
5307
+ /** Auto-gain applied on the most recent block, in dB. */
5308
+ lastAutoGainDb(): number;
5309
+ /** Reported processing latency in samples (non-zero for linear-phase bands). */
5310
+ latencySamples(): number;
5311
+ /**
5312
+ * Process one mono block, returning the equalized samples (same length).
5313
+ */
5314
+ processMono(samples: Float32Array): Float32Array;
5315
+ /**
5316
+ * Process one stereo block, returning the equalized channels.
5317
+ */
5318
+ processStereo(left: Float32Array, right: Float32Array): {
5319
+ left: Float32Array;
5320
+ right: Float32Array;
5321
+ };
5322
+ /**
5323
+ * Read the latest pre/post spectrum snapshot for metering. `seq` increments
5324
+ * each time a new snapshot is published.
5325
+ */
5326
+ spectrum(): EqSpectrumSnapshot;
5327
+ /**
5328
+ * Configure bands so the source spectrum matches the reference spectrum.
5329
+ *
5330
+ * @param source - Source audio (mono samples)
5331
+ * @param reference - Reference audio (mono samples)
5332
+ * @param options - `sampleRate` (default 48000) and `maxBands` (default 8)
5333
+ */
5334
+ match(source: Float32Array, reference: Float32Array, options?: EqMatchOptions): void;
5335
+ /** Release the underlying WASM object. Safe to call only once. */
5336
+ delete(): void;
5337
+ }
5338
+ /**
5339
+ * Block-by-block mono voice retune / pitch shifter.
5340
+ *
5341
+ * State is maintained across {@link processMono} calls. Call {@link prepare}
5342
+ * before processing, and call {@link delete} (or use `try/finally`) to release
5343
+ * the underlying WASM object.
5344
+ */
5345
+ declare class StreamingRetune {
5346
+ private retune;
5347
+ constructor(config?: StreamingRetuneConfig);
5348
+ /**
5349
+ * Allocate and initialize native state for the given sample rate and maximum
5350
+ * process block size.
5351
+ */
5352
+ prepare(sampleRate: number, maxBlockSize: number): void;
5353
+ /** Reset delay, grain, and overlap-add state without changing config. */
5354
+ reset(): void;
5355
+ /**
5356
+ * Update retune settings. Changing `grainSize` takes effect after the next
5357
+ * {@link prepare} call.
5358
+ */
5359
+ setConfig(config: StreamingRetuneConfig): void;
5360
+ /** Current native config. */
5361
+ config(): Required<StreamingRetuneConfig>;
5362
+ /** Resolved grain size in samples after {@link prepare}. */
5363
+ grainSize(): number;
5364
+ /** Process one mono block, returning the shifted samples (same length). */
5365
+ processMono(samples: Float32Array): Float32Array;
5366
+ /** Release the underlying WASM object. Safe to call only once. */
5367
+ delete(): void;
5368
+ }
5369
+
5039
5370
  interface SonareWorkletMeterSnapshot {
5040
5371
  type: 'meter';
5041
5372
  targetId: number;
@@ -5199,6 +5530,13 @@ interface SonareRealtimeEngineWorkletProcessorOptions {
5199
5530
  /** Lock-free worklet-to-main-thread MIDI-1 output ring. */
5200
5531
  externalMidiSharedBuffer?: SharedArrayBuffer;
5201
5532
  externalMidiRingCapacity?: number;
5533
+ /**
5534
+ * Route the PFL/AFL cue bus to the processor's SECOND output instead of
5535
+ * folding it into the program output. Off by default, so an existing
5536
+ * single-output host keeps its current mix sample for sample. The node must
5537
+ * be constructed with two outputs for the cue to be audible.
5538
+ */
5539
+ cueOutput?: boolean;
5202
5540
  }
5203
5541
  interface SonareRealtimeEngineNodeCapabilities {
5204
5542
  mode: 'sab' | 'postMessage';
@@ -5210,6 +5548,11 @@ interface SonareRealtimeEngineNodeCapabilities {
5210
5548
  clipPageRequestsRealtimeSafe: boolean;
5211
5549
  /** True when external MIDI uses the SAB output ring rather than postMessage. */
5212
5550
  externalMidiRealtimeSafe: boolean;
5551
+ /**
5552
+ * True when the node carries a second output fed by the PFL/AFL cue bus. When
5553
+ * false the cue is folded into the program output, as it always was.
5554
+ */
5555
+ cueOutput: boolean;
5213
5556
  engineAbiVersion?: number;
5214
5557
  expectedEngineAbiVersion?: number;
5215
5558
  abiCompatible?: boolean;
@@ -5697,6 +6040,15 @@ declare function meteringSilenceRatio(request: MeteringSilenceRatioRequest): num
5697
6040
  declare function meteringSilenceRatio(samples: Float32Array, sampleRate?: number, thresholdDb?: number, frameLength?: number, hopLength?: number, options?: ValidateOptions): number;
5698
6041
  declare function meteringCrestFactorDb(request: MeteringSamplesRequest): number;
5699
6042
  declare function meteringCrestFactorDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
6043
+ /**
6044
+ * Crest factor in dB across both channels of a stereo pair.
6045
+ *
6046
+ * Takes the peak across both channels and the RMS over both together. An
6047
+ * out-of-phase pair cancels in the `0.5 * (left + right)` downmix
6048
+ * {@link meteringCrestFactorDb} would need, which understates its RMS and so
6049
+ * overstates the crest factor.
6050
+ */
6051
+ declare function meteringCrestFactorDbStereo(request: MeteringStereoRequest): number;
5700
6052
  declare function meteringDcOffset(request: MeteringSamplesRequest): number;
5701
6053
  declare function meteringDcOffset(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
5702
6054
  /**
@@ -6894,189 +7246,6 @@ declare function validateRealtimeVoiceChangerPresetJson(json: string): {
6894
7246
  error?: string;
6895
7247
  };
6896
7248
 
6897
- type EqPhaseMode = 'zero' | 'zero-latency' | 'zero_latency' | 'natural' | 'natural-phase' | 'natural_phase' | 'linear' | 'linear-phase' | 'linear_phase' | number;
6898
- /**
6899
- * Block-by-block streaming variant of {@link masteringChain}.
6900
- *
6901
- * Maintains processor state across {@link processMono}/{@link processStereo}
6902
- * calls. Only ProcessorBase-backed stages are supported. Configurations that
6903
- * enable `repair.denoise` throw at construction. An enabled `loudness` stage
6904
- * also throws unless {@link StreamingMasteringChainConfig.loudnessStaticGainDb}
6905
- * supplies a precomputed normalization gain.
6906
- *
6907
- * Call {@link delete} (or use a `try/finally`) to release the underlying WASM
6908
- * object — the embind handle is not garbage-collected automatically.
6909
- *
6910
- * @example
6911
- * ```typescript
6912
- * const chain = new StreamingMasteringChain({ eq: { tiltDb: 1.0 } });
6913
- * try {
6914
- * chain.prepare(44100, 512, 1);
6915
- * const out = chain.processMono(blockSamples);
6916
- * } finally {
6917
- * chain.delete();
6918
- * }
6919
- * ```
6920
- */
6921
- declare class StreamingMasteringChain {
6922
- private chain;
6923
- constructor(config: StreamingMasteringChainConfig);
6924
- /**
6925
- * Initialize processors for the given sample rate and block layout.
6926
- *
6927
- * @param sampleRate - Sample rate in Hz
6928
- * @param maxBlockSize - Maximum block size per process call
6929
- * @param numChannels - 1 (mono) or 2 (stereo)
6930
- */
6931
- prepare(sampleRate: number, maxBlockSize: number, numChannels: number): void;
6932
- /**
6933
- * Process one mono block, returning the processed samples (same length).
6934
- */
6935
- processMono(samples: Float32Array): Float32Array;
6936
- /**
6937
- * Process one stereo block, returning the processed channels.
6938
- */
6939
- processStereo(left: Float32Array, right: Float32Array): {
6940
- left: Float32Array;
6941
- right: Float32Array;
6942
- };
6943
- /**
6944
- * Emit delayed audio and finite processor tails after the final mono block.
6945
- * Call until this returns an empty array. The initial `latencySamples()`
6946
- * samples of the concatenated stream are delayed and should be discarded for
6947
- * time-aligned output.
6948
- */
6949
- flushMono(): Float32Array;
6950
- /** Stereo counterpart of {@link flushMono}. */
6951
- flushStereo(): {
6952
- left: Float32Array;
6953
- right: Float32Array;
6954
- };
6955
- /** Reset all processor state without rebuilding. */
6956
- reset(): void;
6957
- /** Total reported latency in samples across all active processors. */
6958
- latencySamples(): number;
6959
- /** Ordered stage names that will run (e.g. `"eq.tilt"`). */
6960
- stageNames(): string[];
6961
- /** Release the underlying WASM object. Safe to call only once. */
6962
- delete(): void;
6963
- }
6964
- /**
6965
- * Block-by-block streaming equalizer wrapping the unified C++
6966
- * `EqualizerProcessor` (up to 24 bands, RBJ/Vicanek biquads, dynamic EQ,
6967
- * linear-phase FIR, mid/side processing, and auto-gain).
6968
- *
6969
- * State is maintained across {@link processMono}/{@link processStereo} calls.
6970
- * Call {@link delete} (or use `try/finally`) to release the underlying WASM
6971
- * object — the embind handle is not garbage-collected automatically.
6972
- *
6973
- * @example
6974
- * ```typescript
6975
- * const eq = new StreamingEqualizer({ sampleRate: 48000, maxBlockSize: 512 });
6976
- * try {
6977
- * eq.setBand(0, { type: 'HighShelf', frequencyHz: 8000, gainDb: 6, enabled: true });
6978
- * const out = eq.processStereo(left, right);
6979
- * const snapshot = eq.spectrum();
6980
- * } finally {
6981
- * eq.delete();
6982
- * }
6983
- * ```
6984
- */
6985
- declare class StreamingEqualizer {
6986
- private eq;
6987
- constructor(config?: StreamingEqualizerConfig);
6988
- /**
6989
- * Configure the band at `index` (0..23). Omitted fields use C++ defaults.
6990
- */
6991
- setBand(index: number, band: EqBand): void;
6992
- /** Disable and reset every band. */
6993
- clear(): void;
6994
- /**
6995
- * Set the global phase mode: `'zero'` | `'natural'` | `'linear'` or 1/2/3.
6996
- */
6997
- setPhaseMode(mode: EqPhaseMode): void;
6998
- /** Enable or disable output auto-gain compensation. */
6999
- setAutoGain(enabled: boolean): void;
7000
- /** Set all-band EQ gain scale as a 0.0..2.0 multiplier. */
7001
- setGainScale(scale: number): void;
7002
- /** Set post-EQ output gain in dB. */
7003
- setOutputGainDb(gainDb: number): void;
7004
- /** Set post-EQ stereo balance in -1.0..1.0; mono input ignores pan. */
7005
- setOutputPan(pan: number): void;
7006
- /**
7007
- * Provide a mono external sidechain key for dynamic bands that opt into
7008
- * `external_sidechain`. The samples are copied into an owned buffer.
7009
- */
7010
- setSidechainMono(samples: Float32Array): void;
7011
- /**
7012
- * Provide a stereo external sidechain key. Both channels must match length.
7013
- */
7014
- setSidechainStereo(left: Float32Array, right: Float32Array): void;
7015
- /** Release any borrowed external sidechain buffers. */
7016
- clearSidechain(): void;
7017
- /** Auto-gain applied on the most recent block, in dB. */
7018
- lastAutoGainDb(): number;
7019
- /** Reported processing latency in samples (non-zero for linear-phase bands). */
7020
- latencySamples(): number;
7021
- /**
7022
- * Process one mono block, returning the equalized samples (same length).
7023
- */
7024
- processMono(samples: Float32Array): Float32Array;
7025
- /**
7026
- * Process one stereo block, returning the equalized channels.
7027
- */
7028
- processStereo(left: Float32Array, right: Float32Array): {
7029
- left: Float32Array;
7030
- right: Float32Array;
7031
- };
7032
- /**
7033
- * Read the latest pre/post spectrum snapshot for metering. `seq` increments
7034
- * each time a new snapshot is published.
7035
- */
7036
- spectrum(): EqSpectrumSnapshot;
7037
- /**
7038
- * Configure bands so the source spectrum matches the reference spectrum.
7039
- *
7040
- * @param source - Source audio (mono samples)
7041
- * @param reference - Reference audio (mono samples)
7042
- * @param options - `sampleRate` (default 48000) and `maxBands` (default 8)
7043
- */
7044
- match(source: Float32Array, reference: Float32Array, options?: EqMatchOptions): void;
7045
- /** Release the underlying WASM object. Safe to call only once. */
7046
- delete(): void;
7047
- }
7048
- /**
7049
- * Block-by-block mono voice retune / pitch shifter.
7050
- *
7051
- * State is maintained across {@link processMono} calls. Call {@link prepare}
7052
- * before processing, and call {@link delete} (or use `try/finally`) to release
7053
- * the underlying WASM object.
7054
- */
7055
- declare class StreamingRetune {
7056
- private retune;
7057
- constructor(config?: StreamingRetuneConfig);
7058
- /**
7059
- * Allocate and initialize native state for the given sample rate and maximum
7060
- * process block size.
7061
- */
7062
- prepare(sampleRate: number, maxBlockSize: number): void;
7063
- /** Reset delay, grain, and overlap-add state without changing config. */
7064
- reset(): void;
7065
- /**
7066
- * Update retune settings. Changing `grainSize` takes effect after the next
7067
- * {@link prepare} call.
7068
- */
7069
- setConfig(config: StreamingRetuneConfig): void;
7070
- /** Current native config. */
7071
- config(): Required<StreamingRetuneConfig>;
7072
- /** Resolved grain size in samples after {@link prepare}. */
7073
- grainSize(): number;
7074
- /** Process one mono block, returning the shifted samples (same length). */
7075
- processMono(samples: Float32Array): Float32Array;
7076
- /** Release the underlying WASM object. Safe to call only once. */
7077
- delete(): void;
7078
- }
7079
-
7080
7249
  interface WebMidiEngine {
7081
7250
  bindMidiCc(channel: number, controller: number, paramId: number, options?: MidiCcBindOptions): void;
7082
7251
  setMidiInputSource(destinationId?: number): void;
@@ -7322,4 +7491,4 @@ declare function voiceCharacterPresetId(preset: VoicePresetId | number): VoicePr
7322
7491
  */
7323
7492
  declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig;
7324
7493
 
7325
- export { type AcousticOptions, type AcousticResult, type AnalysisResult, type AnalyzeBpmOptions, type AnalyzeBpmRequest, type AnalyzeDynamicsOptions, type AnalyzeDynamicsRequest, type AnalyzeImpulseResponseRequest, type AnalyzeMelodyRequest, type AnalyzeRhythmOptions, type AnalyzeRhythmRequest, type AnalyzeSectionsOptions, type AnalyzeSectionsRequest, type AnalyzeTimbreOptions, type AnalyzeTimbreRequest, type AnalyzeWithProgressRequest, type AnalyzerStats, Audio, type AutomationCurve, AutomationTargetKind, BUILTIN_SYNTH_WAVEFORMS, type BarChord, type Beat, type BindMicrophoneInputOptions, type BindWebMidiOptions, type BpmAnalysisResult, type BpmCandidate, type BpmHypothesis, type BrowserAudioDecodeOptions, type BuiltinSynthBinding, type BuiltinSynthConfig, type BuiltinSynthWaveform, type ChirpRequest, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, type ChordFunctionalAnalysisRequest, ChordQuality, type ChromaResult, type ChromaSpectrogramRequest, type ClicksRequest, ClipPageProvider, type ClipPageRequest, type ClipPageStreamSource, ClipPageStreamer, type ClipPageStreamerEngine, type ClipPageStreamerOptions, type ClipPageStreamerRequest, type ClippingRegion, type ClippingReport, type CompressorDetector, type CompressorOptions, type CqtRequest, type CqtResult, type CqtToAudioRequest, type CyclicTempogramRequest, type DbConversionRequest, type DeclickOptions, type DeclipOptions, type DecomposeRequest, type DecomposeResult, type DecomposeWithInitRequest, type DecrackleMode, type DecrackleOptions, type DehumOptions, type DenoiseClassicalMode, type DenoiseClassicalNoiseEstimator, type DenoiseClassicalOptions, type DereverbClassicalOptions, type DetectAcousticRequest, type DetectChordsRequest, type DetectKeyRequest, type DetectOnsetsRequest, type DynamicRangeReport, type Dynamics, type DynamicsAnalysisResult, type DynamicsResult, EXPECTED_ENGINE_ABI_VERSION, EXPECTED_PROJECT_ABI_VERSION, type Ebur128LoudnessRangeRequest, type EmphasisRequest, type EngineAutomationPoint, type EngineBounceOptions, type EngineBounceResult, type EngineBus, type EngineCapabilities, type EngineCaptureSource, type EngineCaptureStatus, type EngineClip, type EngineFreezeOptions, type EngineFreezeResult, type EngineGraphSpec, type EngineMarker, type EngineMeterTelemetry, type EngineMeterTelemetryWide, type EngineMetronomeConfig, type EngineMidiClipSchedule, type EngineMidiEvent, type EngineParameterInfo, type EngineScopeTelemetry, type EngineTelemetry, type EngineTempoSegment, type EngineTimeSignatureSegment, type EngineTrackLane, type EngineTrackMonitorMode, type EngineTrackSend, type EngineTransportState, type EqBand, type EqBandPhase, type EqBandType, type EqCoeffMode, type EqMatchOptions, type EqSpectrumSnapshot, type EqStereoPlacement, ErrorCode, type EstimateRoomRequest, type EstimateTuningRequest, type ExternalMidiEvent, type ExternalSeparatedStem, type ExternalSeparatedStemImportRequest, type ExternalSeparatedStemImportResult, type FixFramesRequest, type FixLengthRequest, type FourierTempogramRequest, type FrameBuffer, type FrameSignalRequest, type GateOptions, type GoniometerPoint, type GriffinLimRequest, type HarmonicRequest, type HpssRequest, type HpssResult, type HpssWithResidualRequest, type HpssWithResidualResult, type Key, type KeyCandidate, type KeyDetectionOptions, KeyProfile, type KeyProfileName, type LufsInterleavedRequest, type LufsRequest, type LufsResult, MarkerKind, type MasterAudioRequest, type MasterAudioStereoRequest, type MasteringChainConfig, type MasteringChainRequest, type MasteringChainResult, type MasteringChainStereoRequest, type MasteringChainStereoResult, type MasteringChannelPolicy, type MasteringDynamicsCompressorRequest, type MasteringDynamicsGateRequest, type MasteringDynamicsTransientShaperRequest, type MasteringInsertParamInfo, type MasteringLoudnessSummary, type MasteringOptions, type MasteringPairAnalyzeRequest, type MasteringPairProcessRequest, type MasteringPreset, type MasteringProcessRequest, type MasteringProcessStereoRequest, type MasteringProcessorCatalogEntry, type MasteringProcessorParams, type MasteringRealtimeCost, type MasteringRepairDeclickRequest, type MasteringRepairDeclipRequest, type MasteringRepairDecrackleRequest, type MasteringRepairDehumRequest, type MasteringRepairDenoiseClassicalRequest, type MasteringRepairDereverbClassicalRequest, type MasteringRepairTrimSilenceRequest, type MasteringReport, type MasteringRequest, type MasteringResult, type MasteringSamplesParamsRequest, type MasteringStereoAnalyzeRequest, type MasteringStereoChainResult, type MasteringStereoResult, type MasteringStreamingPreviewRequest, type Matrix2dResult, type MelDeltaRequest, type MelPowerResult, type MelSpectrogramRequest, type MelSpectrogramResult, type MelToAudioRequest, type MelToStftRequest, type MelodyOptions, type MelodyPoint, type MelodyResult, type MeterTap, type MeteringDetectClippingOptions, type MeteringDetectClippingRequest, type MeteringDynamicRangeOptions, type MeteringDynamicRangeRequest, type MeteringSamplesRequest, type MeteringSilenceRatioRequest, type MeteringSpectrumFrameRequest, type MeteringSpectrumRequest, type MeteringStereoDecimatedRequest, type MeteringStereoRequest, type MeteringTruePeakRequest, type MfccRequest, type MfccResult, type MfccToAudioRequest, type MfccToMelRequest, type MicrophoneInputBinding, type MidiCcBindOptions, type MidiCcLearnOptions, type MixMeterSnapshot, type MixOptions, type MixResult, type MixStereoRequest, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type MusicAnalyzeRequest, type NnFilterRequest, type NnlsChromaRequest, type NormalizeMode, type NormalizeRequest, type NoteMoveRequest, type NoteSegment, type NoteSegmentsRequest, type NoteStretchOptions, type NoteStretchRequest, type OfflineWorker, type OfflineWorkerCallOptions, OfflineWorkerClient, type OfflineWorkerClientOptions, type OfflineWorkerProgress, OfflineWorkerTask, type OnsetBacktrackRequest, type OnsetEnvelopeRequest, type OnsetStrengthMultiRequest, type OpfsClipPageProviderBinding, type OpfsClipPageProviderOptions, type OpfsClipStream, type OpfsClipStreamOptions, PROJECT_AUTOMATION_TARGET_OPAQUE, PROJECT_AUTOMATION_TARGET_TRACK_FADER_DB, PROJECT_AUTOMATION_TARGET_TRACK_PAN, type PadCenterRequest, type PairAnalysis, type PairProcessor, type PanLaw, type PanLawInput, type PanLawName, type PanMode, type PatternScore, type PcenRequest, type PeakPickRequest, type PercussiveRequest, type PhaseScopeReport, type PhaseVocoderRequest, type PiptrackRequest, PitchClass as Pitch, PitchClass, type PitchCorrectOptions, type PitchCorrectTimevaryingRequest, type PitchCorrectToMidiRequest, type PitchCorrectToMidiTimevaryingRequest, type PitchPyinRequest, type PitchResult, type PitchShiftRequest, type PitchTuningRequest, type PitchYinRequest, type PlpRequest, type PolyFeaturesRequest, type ProgressiveEstimate, Project, type ProjectAssistSidecar, type ProjectAssistSidecarInput, type ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, type ProjectAutomationTargetKind, type ProjectBounceOptions, type ProjectChordSymbol, type ProjectClip, type ProjectClipCompSegment, type ProjectClipDesc, type ProjectClipFade, type ProjectClipTake, type ProjectCompileResult, type ProjectFadeCurve, type ProjectKeySegment, type ProjectLoopMode, type ProjectLoopRecordingDesc, type ProjectLoopRecordingResult, type ProjectMarker, type ProjectMidiClipResult, type ProjectMidiEvent, type ProjectNotePairValidation, type ProjectSource, type ProjectTrack, type ProjectTrackDesc, type ProjectTrackKind, type ProjectWarpAnchor, type ProjectWarpMapDesc, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, type ReassignedSpectrogramRequest, type RemixRequest, type ResampleRequest, type RhythmAnalysisResult, type RhythmFeatures, type RirResult, type RirSynthOptions, type RoomEstimateOptions, type RoomEstimateResult, type RoomGeometryOptions, type RoomMorphOptions, type RoomMorphRequest, SYNTH_BODY_TYPES, SYNTH_ENGINE_MODES, SYNTH_FILTER_MODELS, SYNTH_FILTER_OUTPUTS, SYNTH_MOD_DESTINATIONS, SYNTH_MOD_SOURCES, SYNTH_OSC_WAVEFORMS, type SamplesRequest, type Section, SectionType, type SegmentAgglomerativeRequest, type SegmentCrossSimilarityRequest, type SegmentLagToRecurrenceRequest, type SegmentMatrix, type SegmentPathEnhanceRequest, type SegmentRecurrenceMatrixRequest, type SegmentRecurrenceToLagRequest, type SegmentSubsegmentRequest, type SendTiming, type Sf2InstrumentConfig, type Sf2ProgramStatus, type SilenceRequest, type SoloProcessor, type SonareCapabilities, SonareError, type SourceBackend, type SpectralContrastRequest, type SpectralEditMode, type SpectralEditOptions, type SpectralEditRequest, type SpectralEditWindow, type SpectralFrameRequest, type SpectralRegionOp, type SpectralRolloffRequest, type SpectrogramRequest, type SpectrumOptions, type SpectrumReport, type StageGainReduction, type StereoAnalysis, type StftPowerResult, type StftResult, StreamAnalyzer, type StreamConfig, type StreamConfigDefaults, type StreamFramesI16, type StreamFramesU8, type StreamQuantizeConfig, StreamingEqualizer, type StreamingEqualizerConfig, StreamingMasteringChain, type StreamingMasteringChainConfig, type StreamingPlatform, StreamingRetune, type StreamingRetuneConfig, type SynthBodyType, type SynthEngineMode, type SynthEnumTables, type SynthFilterModel, type SynthFilterOutput, type SynthModDestination, type SynthModRouting, type SynthModSource, type SynthOscWaveform, type SynthPatch, type TempogramMode, type TempogramRatioRequest, type TempogramRequest, type Timbre, type TimbreAnalysisResult, type TimbreFrame, type TimeSignature, type TimeStretchRequest, type ToneRequest, type TonnetzRequest, type TrackMonitorMode, type TransientShaperOptions, type TrimRequest, type TrimSilenceMode, type TrimSilenceOptions, type ValidateOptions, type VectorNormalizeRequest, type VectorscopeReport, type VoiceChangeOptions, type VoiceChangeRealtimeOptions, type VoiceChangeRealtimeRequest, type VoiceChangeRequest, type VoicePresetId, type VqtRequest, type VqtToAudioRequest, type WaveformPeakPyramidOptions, type WaveformPeakPyramidRequest, type WaveformPeaksOptions, type WaveformPeaksReport, type WaveformPeaksRequest, type WebMidiBinding, type WebMidiCcBinding, type WebMidiInputInfo, type WorkletOpfsClipStreamHost, type ZeroCrossingRateRequest, type ZeroCrossingsRequest, abiVersion, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, attachOpfsClipStream, bassChroma, bindMicrophoneInput, bindWebMidi, capabilities, capabilityCatalog, chirp, chordFunctionalAnalysis, chroma, chromaCens, chromaCqt, clicks, cqt, cqtToAudio, createOpfsClipPageProvider, createOpfsClipPageWorker, cyclicTempogram, dbToAmplitude, dbToPower, decompose, decomposeWithInit, deemphasis, detectAcoustic, detectBeats, detectBpm, detectChords, detectDownbeats, detectKey, detectKeyCandidates, detectOnsets, ebur128LoudnessRange, engineAbiVersion, engineCapabilities, estimateRoom, estimateTuning, fixFrames, fixLength, fourierTempogram, frameSignal, framesToSamples, framesToTime, griffinLim, harmonic, hasFfmpegSupport, hpss, hpssWithResidual, hybridCqt, hzToMel, hzToMidi, hzToNote, init, isInitialized, isSonareError, isWebMidiAvailable, lufs, lufsInterleaved, masterAudio, masterAudioStereo, masterAudioStereoWithProgress, masterAudioWithProgress, mastering, masteringAssistantSuggest, masteringAudioProfile, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringDynamicsCompressor, masteringDynamicsGate, masteringDynamicsTransientShaper, masteringInsertNames, masteringInsertParamInfo, masteringInsertParamNames, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorCatalog, masteringProcessorNames, masteringRepairDeclick, masteringRepairDeclip, masteringRepairDecrackle, masteringRepairDehum, masteringRepairDenoiseClassical, masteringRepairDereverbClassical, masteringRepairTrimSilence, masteringStereoAnalysisNames, masteringStereoAnalyze, masteringStreamingPreview, melDelta, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringPhaseScopeDecimated, meteringRmsDb, meteringSilenceRatio, meteringSpectrum, meteringSpectrumFrame, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, meteringVectorscopeDecimated, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteMove, noteSegments, noteStretch, noteToHz, onsetBacktrack, onsetEnvelope, onsetStrengthMulti, opfsClipPageWorkerSource, padCenter, pcen, peakPick, percussive, phaseVocoder, piptrack, pitchCorrectTimevarying, pitchCorrectToMidi, pitchCorrectToMidiTimevarying, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, projectAbiVersion, pseudoCqt, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, reassignedSpectrogram, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, segmentAgglomerative, segmentCrossSimilarity, segmentLagToRecurrence, segmentPathEnhance, segmentRecurrenceMatrix, segmentRecurrenceToLag, segmentSubsegment, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralEdit, spectralFlatness, spectralFlux, spectralRolloff, splitSilence, stft, stftDb, streamAnalyzerConfigDefaults, synthEnumTables, synthPresetNames, synthPresetPatch, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tone, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, vqtToAudio, waveformPeakPyramid, waveformPeaks, zeroCrossingRate, zeroCrossings };
7494
+ export { type AcousticOptions, type AcousticResult, type AnalysisResult, type AnalyzeBpmOptions, type AnalyzeBpmRequest, type AnalyzeDynamicsOptions, type AnalyzeDynamicsRequest, type AnalyzeImpulseResponseRequest, type AnalyzeMelodyRequest, type AnalyzeRhythmOptions, type AnalyzeRhythmRequest, type AnalyzeSectionsOptions, type AnalyzeSectionsRequest, type AnalyzeTimbreOptions, type AnalyzeTimbreRequest, type AnalyzeWithProgressRequest, type AnalyzerStats, Audio, type AutomationCurve, AutomationTargetKind, BUILTIN_SYNTH_WAVEFORMS, type BarChord, type Beat, type BindMicrophoneInputOptions, type BindWebMidiOptions, type BpmAnalysisResult, type BpmCandidate, type BpmHypothesis, type BrowserAudioDecodeOptions, type BuiltinSynthBinding, type BuiltinSynthConfig, type BuiltinSynthWaveform, type ChirpRequest, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, type ChordFunctionalAnalysisRequest, ChordQuality, type ChromaResult, type ChromaSpectrogramRequest, type ClicksRequest, ClipPageProvider, type ClipPageRequest, type ClipPageStreamSource, ClipPageStreamer, type ClipPageStreamerEngine, type ClipPageStreamerOptions, type ClipPageStreamerRequest, type ClippingRegion, type ClippingReport, type CompressorDetector, type CompressorOptions, type CqtRequest, type CqtResult, type CqtToAudioRequest, type CyclicTempogramRequest, type DbConversionRequest, type DeclickOptions, type DeclipOptions, type DecomposeRequest, type DecomposeResult, type DecomposeWithInitRequest, type DecrackleMode, type DecrackleOptions, type DehumOptions, type DenoiseClassicalMode, type DenoiseClassicalNoiseEstimator, type DenoiseClassicalOptions, type DereverbClassicalOptions, type DetectAcousticRequest, type DetectChordsRequest, type DetectKeyRequest, type DetectOnsetsRequest, type DynamicRangeReport, type Dynamics, type DynamicsAnalysisResult, type DynamicsResult, EXPECTED_ENGINE_ABI_VERSION, EXPECTED_PROJECT_ABI_VERSION, type Ebur128LoudnessRangeRequest, type EmphasisRequest, type EngineAutomationPoint, type EngineBounceOptions, type EngineBounceResult, type EngineBus, type EngineCapabilities, type EngineCaptureSource, type EngineCaptureStatus, type EngineClip, type EngineFreezeOptions, type EngineFreezeResult, type EngineGraphSpec, type EngineMarker, type EngineMeterTelemetry, type EngineMeterTelemetryWide, type EngineMetronomeConfig, type EngineMidiClipSchedule, type EngineMidiEvent, type EngineParameterInfo, type EngineScopeTelemetry, type EngineTelemetry, type EngineTempoSegment, type EngineTimeSignatureSegment, type EngineTrackLane, type EngineTrackMonitorMode, type EngineTrackSend, type EngineTransportState, type EqBand, type EqBandPhase, type EqBandType, type EqCoeffMode, type EqMatchOptions, type EqSpectrumSnapshot, type EqStereoPlacement, ErrorCode, type EstimateRoomRequest, type EstimateTuningRequest, type ExternalMidiEvent, type ExternalSeparatedStem, type ExternalSeparatedStemImportRequest, type ExternalSeparatedStemImportResult, type FixFramesRequest, type FixLengthRequest, type FourierTempogramRequest, type FrameBuffer, type FrameSignalRequest, type GateOptions, type GoniometerPoint, type GriffinLimRequest, type HarmonicRequest, type HpssRequest, type HpssResult, type HpssWithResidualRequest, type HpssWithResidualResult, type Key, type KeyCandidate, type KeyDetectionOptions, KeyProfile, type KeyProfileName, type LufsInterleavedRequest, type LufsRequest, type LufsResult, MarkerKind, type MasterAudioRequest, type MasterAudioStereoRequest, type MasteringChainConfig, type MasteringChainRequest, type MasteringChainResult, type MasteringChainStereoRequest, type MasteringChainStereoResult, type MasteringChannelPolicy, type MasteringDynamicsCompressorRequest, type MasteringDynamicsGateRequest, type MasteringDynamicsTransientShaperRequest, type MasteringInsertParamInfo, type MasteringLoudnessSummary, type MasteringOptions, type MasteringPairAnalyzeRequest, type MasteringPairProcessRequest, type MasteringPreset, type MasteringProcessRequest, type MasteringProcessStereoRequest, type MasteringProcessorCatalogEntry, type MasteringProcessorParams, type MasteringRealtimeCost, type MasteringRepairDeclickRequest, type MasteringRepairDeclipRequest, type MasteringRepairDecrackleRequest, type MasteringRepairDehumRequest, type MasteringRepairDenoiseClassicalRequest, type MasteringRepairDereverbClassicalRequest, type MasteringRepairTrimSilenceRequest, type MasteringReport, type MasteringRequest, type MasteringResult, type MasteringSamplesParamsRequest, type MasteringStereoAnalyzeRequest, type MasteringStereoChainResult, type MasteringStereoParamsRequest, type MasteringStereoResult, type MasteringStreamingPreviewRequest, type MasteringStreamingPreviewStereoRequest, type Matrix2dResult, type MelDeltaRequest, type MelPowerResult, type MelSpectrogramRequest, type MelSpectrogramResult, type MelToAudioRequest, type MelToStftRequest, type MelodyOptions, type MelodyPoint, type MelodyResult, type MeterTap, type MeteringDetectClippingOptions, type MeteringDetectClippingRequest, type MeteringDynamicRangeOptions, type MeteringDynamicRangeRequest, type MeteringSamplesRequest, type MeteringSilenceRatioRequest, type MeteringSpectrumFrameRequest, type MeteringSpectrumRequest, type MeteringStereoDecimatedRequest, type MeteringStereoRequest, type MeteringTruePeakRequest, type MfccRequest, type MfccResult, type MfccToAudioRequest, type MfccToMelRequest, type MicrophoneInputBinding, type MidiCcBindOptions, type MidiCcLearnOptions, type MixMeterSnapshot, type MixOptions, type MixResult, type MixStereoRequest, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type MusicAnalyzeRequest, type NnFilterRequest, type NnlsChromaRequest, type NormalizeMode, type NormalizeRequest, type NoteMoveRequest, type NoteSegment, type NoteSegmentsRequest, type NoteStretchOptions, type NoteStretchRequest, type OfflineWorker, type OfflineWorkerCallOptions, OfflineWorkerClient, type OfflineWorkerClientOptions, type OfflineWorkerProgress, OfflineWorkerTask, type OnsetBacktrackRequest, type OnsetEnvelopeRequest, type OnsetStrengthMultiRequest, type OpfsClipPageProviderBinding, type OpfsClipPageProviderOptions, type OpfsClipStream, type OpfsClipStreamOptions, PROJECT_AUTOMATION_TARGET_OPAQUE, PROJECT_AUTOMATION_TARGET_TRACK_FADER_DB, PROJECT_AUTOMATION_TARGET_TRACK_PAN, type PadCenterRequest, type PairAnalysis, type PairProcessor, type PanLaw, type PanLawInput, type PanLawName, type PanMode, type PatternScore, type PcenRequest, type PeakPickRequest, type PercussiveRequest, type PhaseScopeReport, type PhaseVocoderRequest, type PiptrackRequest, PitchClass as Pitch, PitchClass, type PitchCorrectOptions, type PitchCorrectTimevaryingRequest, type PitchCorrectToMidiRequest, type PitchCorrectToMidiTimevaryingRequest, type PitchPyinRequest, type PitchResult, type PitchShiftRequest, type PitchTuningRequest, type PitchYinRequest, type PlpRequest, type PolyFeaturesRequest, type ProgressiveEstimate, Project, type ProjectAssistSidecar, type ProjectAssistSidecarInput, type ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, type ProjectAutomationTargetKind, type ProjectBounceOptions, type ProjectChordSymbol, type ProjectClip, type ProjectClipCompSegment, type ProjectClipDesc, type ProjectClipFade, type ProjectClipTake, type ProjectCompileResult, type ProjectFadeCurve, type ProjectKeySegment, type ProjectLoopMode, type ProjectLoopRecordingDesc, type ProjectLoopRecordingResult, type ProjectMarker, type ProjectMidiClipResult, type ProjectMidiEvent, type ProjectMidiFxBakeRequest, type ProjectMidiFxBakeResult, type ProjectMidiFxPreviewRequest, type ProjectNotePairValidation, type ProjectSource, type ProjectTrack, type ProjectTrackDesc, type ProjectTrackKind, type ProjectWarpAnchor, type ProjectWarpMapDesc, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, type ReassignedSpectrogramRequest, type RemixRequest, type ResampleRequest, type RhythmAnalysisResult, type RhythmFeatures, type RirResult, type RirSynthOptions, type RoomEstimateOptions, type RoomEstimateResult, type RoomGeometryOptions, type RoomMorphOptions, type RoomMorphRequest, SYNTH_BODY_TYPES, SYNTH_ENGINE_MODES, SYNTH_FILTER_MODELS, SYNTH_FILTER_OUTPUTS, SYNTH_MOD_DESTINATIONS, SYNTH_MOD_SOURCES, SYNTH_OSC_WAVEFORMS, type SamplesRequest, type Section, SectionType, type SegmentAgglomerativeRequest, type SegmentCrossSimilarityRequest, type SegmentLagToRecurrenceRequest, type SegmentMatrix, type SegmentPathEnhanceRequest, type SegmentRecurrenceMatrixRequest, type SegmentRecurrenceToLagRequest, type SegmentSubsegmentRequest, type SendTiming, type Sf2InstrumentConfig, type Sf2ProgramStatus, type SilenceRequest, type SoloProcessor, type SonareCapabilities, SonareError, type SourceBackend, type SpectralContrastRequest, type SpectralEditMode, type SpectralEditOptions, type SpectralEditRequest, type SpectralEditWindow, type SpectralFrameRequest, type SpectralRegionOp, type SpectralRolloffRequest, type SpectrogramRequest, type SpectrumOptions, type SpectrumReport, type StageGainReduction, type StereoAnalysis, type StftPowerResult, type StftResult, StreamAnalyzer, type StreamConfig, type StreamConfigDefaults, type StreamFramesI16, type StreamFramesU8, type StreamQuantizeConfig, StreamingEqualizer, type StreamingEqualizerConfig, StreamingMasteringChain, type StreamingMasteringChainConfig, type StreamingPlatform, StreamingRetune, type StreamingRetuneConfig, type SynthBodyType, type SynthEngineMode, type SynthEnumTables, type SynthFilterModel, type SynthFilterOutput, type SynthModDestination, type SynthModRouting, type SynthModSource, type SynthOscWaveform, type SynthPatch, type TempogramMode, type TempogramRatioRequest, type TempogramRequest, type Timbre, type TimbreAnalysisResult, type TimbreFrame, type TimeSignature, type TimeStretchRequest, type ToneRequest, type TonnetzRequest, type TrackMonitorMode, type TransientShaperOptions, type TrimRequest, type TrimSilenceMode, type TrimSilenceOptions, type ValidateOptions, type VectorNormalizeRequest, type VectorscopeReport, type VoiceChangeOptions, type VoiceChangeRealtimeOptions, type VoiceChangeRealtimeRequest, type VoiceChangeRequest, type VoicePresetId, type VoicedFlags, type VqtRequest, type VqtToAudioRequest, type WaveformPeakPyramidOptions, type WaveformPeakPyramidRequest, type WaveformPeaksOptions, type WaveformPeaksReport, type WaveformPeaksRequest, type WebMidiBinding, type WebMidiCcBinding, type WebMidiInputInfo, type WorkletOpfsClipStreamHost, type ZeroCrossingRateRequest, type ZeroCrossingsRequest, abiVersion, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, attachOpfsClipStream, bassChroma, bindMicrophoneInput, bindWebMidi, capabilities, capabilityCatalog, chirp, chordFunctionalAnalysis, chroma, chromaCens, chromaCqt, clicks, cqt, cqtToAudio, createOpfsClipPageProvider, createOpfsClipPageWorker, cyclicTempogram, dbToAmplitude, dbToPower, decompose, decomposeWithInit, deemphasis, detectAcoustic, detectBeats, detectBpm, detectChords, detectDownbeats, detectKey, detectKeyCandidates, detectOnsets, ebur128LoudnessRange, engineAbiVersion, engineCapabilities, estimateRoom, estimateTuning, fixFrames, fixLength, fourierTempogram, frameSignal, framesToSamples, framesToTime, griffinLim, harmonic, hasFfmpegSupport, hpss, hpssWithResidual, hybridCqt, hzToMel, hzToMidi, hzToNote, init, isInitialized, isSonareError, isWebMidiAvailable, lufs, lufsInterleaved, masterAudio, masterAudioStereo, masterAudioStereoWithProgress, masterAudioWithProgress, mastering, masteringAssistantSuggest, masteringAssistantSuggestStereo, masteringAudioProfile, masteringAudioProfileStereo, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringDynamicsCompressor, masteringDynamicsGate, masteringDynamicsTransientShaper, masteringInsertNames, masteringInsertParamInfo, masteringInsertParamNames, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorCatalog, masteringProcessorNames, masteringRepairDeclick, masteringRepairDeclip, masteringRepairDecrackle, masteringRepairDehum, masteringRepairDenoiseClassical, masteringRepairDereverbClassical, masteringRepairTrimSilence, masteringStereoAnalysisNames, masteringStereoAnalyze, masteringStreamingPreview, masteringStreamingPreviewStereo, melDelta, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringCrestFactorDbStereo, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringPhaseScopeDecimated, meteringRmsDb, meteringSilenceRatio, meteringSpectrum, meteringSpectrumFrame, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, meteringVectorscopeDecimated, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteMove, noteSegments, noteStretch, noteToHz, onsetBacktrack, onsetEnvelope, onsetStrengthMulti, opfsClipPageWorkerSource, padCenter, pcen, peakPick, percussive, phaseVocoder, piptrack, pitchCorrectTimevarying, pitchCorrectToMidi, pitchCorrectToMidiTimevarying, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, projectAbiVersion, pseudoCqt, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, reassignedSpectrogram, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, segmentAgglomerative, segmentCrossSimilarity, segmentLagToRecurrence, segmentPathEnhance, segmentRecurrenceMatrix, segmentRecurrenceToLag, segmentSubsegment, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralEdit, spectralFlatness, spectralFlux, spectralRolloff, splitSilence, stft, stftDb, streamAnalyzerConfigDefaults, synthEnumTables, synthPresetNames, synthPresetPatch, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tone, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, vqtToAudio, waveformPeakPyramid, waveformPeaks, zeroCrossingRate, zeroCrossings };