@libraz/libsonare 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -3
- package/dist/index.d.ts +1165 -178
- package/dist/index.js +4830 -3871
- package/dist/index.js.map +1 -1
- package/dist/sonare.js +1 -1
- package/dist/sonare.wasm +0 -0
- package/dist/worklet.d.ts +29 -1
- package/dist/worklet.js +1068 -974
- package/dist/worklet.js.map +1 -1
- package/package.json +2 -1
- package/src/_chain_config.ts +46 -0
- package/src/audio.ts +24 -4
- package/src/effects_mastering.ts +25 -1
- package/src/effects_transform.ts +283 -43
- package/src/effects_voice_change.ts +46 -53
- package/src/feature_core.ts +316 -12
- package/src/feature_music.ts +462 -0
- package/src/feature_pitch.ts +61 -0
- package/src/feature_resample.ts +17 -2
- package/src/feature_spectral.ts +349 -2
- package/src/feature_spectrogram.ts +336 -0
- package/src/features.ts +2 -0
- package/src/index.ts +133 -1
- package/src/mastering_chain.ts +305 -50
- package/src/mastering_core.ts +242 -16
- package/src/mastering_dynamics.ts +66 -10
- package/src/mastering_repair.ts +119 -7
- package/src/metering.ts +366 -81
- package/src/mixer.ts +10 -3
- package/src/mixing_oneshot.ts +25 -5
- package/src/module_state.ts +1 -1
- package/src/project_class.ts +17 -6
- package/src/project_internal.ts +10 -2
- package/src/project_types.ts +25 -2
- package/src/public_types_mastering.ts +114 -4
- package/src/public_types_music.ts +1 -0
- package/src/public_types_spectral.ts +7 -0
- package/src/quick_analysis.ts +325 -117
- package/src/realtime_engine.ts +8 -0
- package/src/sonare.js.d.ts +56 -0
- package/src/stream_analyzer.ts +25 -2
- package/src/stream_types.ts +16 -1
- package/src/validation.ts +17 -2
- package/src/worklet/engine-clips.ts +67 -2
- package/src/worklet/engine-processor.ts +33 -5
- package/src/worklet/engine.ts +7 -3
- package/src/worklet/guards.ts +3 -0
- package/src/worklet/messages.ts +27 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProgressCallback, WasmNnlsChromaResult, WasmExternalMidiEvent, WasmEngineTransportState, WasmEngineTempoSegment, WasmEngineTimeSignatureSegment, WasmEngineParameterInfo, WasmEngineAutomationPoint, WasmEngineMarker, WasmEngineMetronomeConfig, WasmEngineGraphSpec, WasmEngineClip,
|
|
1
|
+
import { ProgressCallback, WasmNnlsChromaResult, WasmClipPageRequest, WasmExternalMidiEvent, WasmEngineTransportState, WasmEngineTempoSegment, WasmEngineTimeSignatureSegment, WasmEngineParameterInfo, WasmEngineAutomationPoint, WasmEngineMarker, WasmEngineMetronomeConfig, WasmEngineGraphSpec, WasmEngineClip, WasmEngineCaptureStatus, WasmEngineProcessWithMonitorResult, WasmEngineBounceOptions, WasmEngineBounceResult, WasmEngineFreezeOptions, WasmEngineFreezeResult, WasmEngineTelemetry, WasmEngineMeterTelemetry, WasmEngineMeterTelemetryWide, WasmEngineScopeTelemetry, WasmCyclicTempogramResult, WasmFrameResult, WasmTempogramResult, WasmTrimResult, WasmFourierTempogramResult, WasmDecomposeResult, WasmHpssWithResidualResult, WasmLufsResult, WasmMatrix2dResult, SonareModule } from './sonare.js';
|
|
2
2
|
export { ProgressCallback } from './sonare.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -159,14 +159,63 @@ interface MasteringResult {
|
|
|
159
159
|
latencySamples?: number;
|
|
160
160
|
}
|
|
161
161
|
type MasteringProcessorParams = Record<string, number | boolean>;
|
|
162
|
+
/**
|
|
163
|
+
* Nested mastering-chain configuration. A boolean toggles a module/processor's
|
|
164
|
+
* `enabled` flag; setting any field implicitly enables its module unless
|
|
165
|
+
* `enabled: false` is also given.
|
|
166
|
+
*
|
|
167
|
+
* Exception — color stages as `masterAudio` overrides: the `saturation.tape`
|
|
168
|
+
* and `saturation.exciter` stages are engaged from an override only when you
|
|
169
|
+
* pass `enabled: true` explicitly. On a preset where they are off, adjusting a
|
|
170
|
+
* parameter alone (e.g. `saturation: { tape: { driveDb: 6 } }`) has no audible
|
|
171
|
+
* effect; use `saturation: { tape: { enabled: true, driveDb: 6 } }`.
|
|
172
|
+
*/
|
|
162
173
|
interface MasteringChainConfig {
|
|
163
174
|
repair?: {
|
|
164
|
-
|
|
175
|
+
/** `boolean` is retained as a deprecated shorthand for `{ enabled }`. */
|
|
176
|
+
denoise?: boolean | {
|
|
177
|
+
enabled?: boolean;
|
|
178
|
+
nFft?: number;
|
|
179
|
+
hopLength?: number;
|
|
180
|
+
ddAlpha?: number;
|
|
181
|
+
gainFloor?: number;
|
|
182
|
+
overSubtraction?: number;
|
|
183
|
+
spectralFloor?: number;
|
|
184
|
+
noiseEstimationQuantile?: number;
|
|
185
|
+
speechPresenceGain?: boolean;
|
|
186
|
+
gainSmoothing?: boolean;
|
|
187
|
+
};
|
|
165
188
|
nFft?: number;
|
|
166
189
|
hopLength?: number;
|
|
167
190
|
ddAlpha?: number;
|
|
168
191
|
gainFloor?: number;
|
|
192
|
+
declip?: {
|
|
193
|
+
enabled?: boolean;
|
|
194
|
+
clipThreshold?: number;
|
|
195
|
+
lpcOrder?: number;
|
|
196
|
+
iterations?: number;
|
|
197
|
+
lpcBlend?: number;
|
|
198
|
+
};
|
|
199
|
+
decrackle?: {
|
|
200
|
+
enabled?: boolean;
|
|
201
|
+
threshold?: number;
|
|
202
|
+
/** 0 = median, 1 = wavelet shrinkage. */
|
|
203
|
+
mode?: number;
|
|
204
|
+
levels?: number;
|
|
205
|
+
};
|
|
206
|
+
dehum?: {
|
|
207
|
+
enabled?: boolean;
|
|
208
|
+
fundamentalHz?: number;
|
|
209
|
+
harmonics?: number;
|
|
210
|
+
q?: number;
|
|
211
|
+
adaptive?: boolean;
|
|
212
|
+
searchRangeHz?: number;
|
|
213
|
+
adaptation?: number;
|
|
214
|
+
frameSize?: number;
|
|
215
|
+
pllBandwidth?: number;
|
|
216
|
+
};
|
|
169
217
|
declick?: {
|
|
218
|
+
enabled?: boolean;
|
|
170
219
|
threshold?: number;
|
|
171
220
|
neighborRatio?: number;
|
|
172
221
|
maxClickSamples?: number;
|
|
@@ -174,6 +223,7 @@ interface MasteringChainConfig {
|
|
|
174
223
|
residualRatio?: number;
|
|
175
224
|
};
|
|
176
225
|
dereverb?: {
|
|
226
|
+
enabled?: boolean;
|
|
177
227
|
threshold?: number;
|
|
178
228
|
attenuation?: number;
|
|
179
229
|
nFft?: number;
|
|
@@ -189,11 +239,20 @@ interface MasteringChainConfig {
|
|
|
189
239
|
};
|
|
190
240
|
};
|
|
191
241
|
eq?: {
|
|
242
|
+
/** Canonical nested tilt stage. */
|
|
243
|
+
tilt?: {
|
|
244
|
+
enabled?: boolean;
|
|
245
|
+
tiltDb?: number;
|
|
246
|
+
pivotHz?: number;
|
|
247
|
+
};
|
|
248
|
+
/** @deprecated Use `eq.tilt.tiltDb`. */
|
|
192
249
|
tiltDb?: number;
|
|
250
|
+
/** @deprecated Use `eq.tilt.pivotHz`. */
|
|
193
251
|
pivotHz?: number;
|
|
194
252
|
};
|
|
195
253
|
dynamics?: {
|
|
196
254
|
compressor?: {
|
|
255
|
+
enabled?: boolean;
|
|
197
256
|
thresholdDb?: number;
|
|
198
257
|
ratio?: number;
|
|
199
258
|
attackMs?: number;
|
|
@@ -203,6 +262,7 @@ interface MasteringChainConfig {
|
|
|
203
262
|
autoMakeup?: boolean;
|
|
204
263
|
};
|
|
205
264
|
deesser?: {
|
|
265
|
+
enabled?: boolean;
|
|
206
266
|
frequencyHz?: number;
|
|
207
267
|
thresholdDb?: number;
|
|
208
268
|
ratio?: number;
|
|
@@ -212,6 +272,7 @@ interface MasteringChainConfig {
|
|
|
212
272
|
bandpassQ?: number;
|
|
213
273
|
};
|
|
214
274
|
transientShaper?: {
|
|
275
|
+
enabled?: boolean;
|
|
215
276
|
attackGainDb?: number;
|
|
216
277
|
sustainGainDb?: number;
|
|
217
278
|
fastAttackMs?: number;
|
|
@@ -224,6 +285,7 @@ interface MasteringChainConfig {
|
|
|
224
285
|
lookaheadMs?: number;
|
|
225
286
|
};
|
|
226
287
|
multibandComp?: {
|
|
288
|
+
enabled?: boolean;
|
|
227
289
|
lowCutoffHz?: number;
|
|
228
290
|
highCutoffHz?: number;
|
|
229
291
|
lowThresholdDb?: number;
|
|
@@ -242,6 +304,7 @@ interface MasteringChainConfig {
|
|
|
242
304
|
};
|
|
243
305
|
saturation?: {
|
|
244
306
|
tape?: {
|
|
307
|
+
enabled?: boolean;
|
|
245
308
|
driveDb?: number;
|
|
246
309
|
saturation?: number;
|
|
247
310
|
hysteresis?: number;
|
|
@@ -252,6 +315,7 @@ interface MasteringChainConfig {
|
|
|
252
315
|
gapLoss?: number;
|
|
253
316
|
};
|
|
254
317
|
exciter?: {
|
|
318
|
+
enabled?: boolean;
|
|
255
319
|
frequencyHz?: number;
|
|
256
320
|
driveDb?: number;
|
|
257
321
|
amount?: number;
|
|
@@ -261,6 +325,7 @@ interface MasteringChainConfig {
|
|
|
261
325
|
};
|
|
262
326
|
spectral?: {
|
|
263
327
|
airBand?: {
|
|
328
|
+
enabled?: boolean;
|
|
264
329
|
amount?: number;
|
|
265
330
|
shelfFrequencyHz?: number;
|
|
266
331
|
dynamicThresholdDb?: number;
|
|
@@ -269,17 +334,20 @@ interface MasteringChainConfig {
|
|
|
269
334
|
};
|
|
270
335
|
stereo?: {
|
|
271
336
|
imager?: {
|
|
337
|
+
enabled?: boolean;
|
|
272
338
|
width?: number;
|
|
273
339
|
outputGainDb?: number;
|
|
274
340
|
decorrelationAmount?: number;
|
|
275
341
|
preserveEnergy?: boolean;
|
|
276
342
|
};
|
|
277
343
|
monoMaker?: {
|
|
344
|
+
enabled?: boolean;
|
|
278
345
|
amount?: number;
|
|
279
346
|
};
|
|
280
347
|
};
|
|
281
348
|
maximizer?: {
|
|
282
349
|
truePeakLimiter?: {
|
|
350
|
+
enabled?: boolean;
|
|
283
351
|
ceilingDb?: number;
|
|
284
352
|
lookaheadMs?: number;
|
|
285
353
|
releaseMs?: number;
|
|
@@ -288,9 +356,12 @@ interface MasteringChainConfig {
|
|
|
288
356
|
};
|
|
289
357
|
};
|
|
290
358
|
loudness?: {
|
|
359
|
+
enabled?: boolean;
|
|
291
360
|
targetLufs?: number;
|
|
292
361
|
ceilingDb?: number;
|
|
293
362
|
truePeakOversample?: number;
|
|
363
|
+
releaseMs?: number;
|
|
364
|
+
applyGainAtInputRate?: boolean;
|
|
294
365
|
};
|
|
295
366
|
}
|
|
296
367
|
/**
|
|
@@ -320,10 +391,36 @@ interface StreamingMasteringChainConfig extends MasteringChainConfig {
|
|
|
320
391
|
*/
|
|
321
392
|
loudnessStaticGainPeakDb?: number;
|
|
322
393
|
}
|
|
323
|
-
|
|
394
|
+
/** Gain reduction reported by a single dynamics/maximizer chain stage. */
|
|
395
|
+
interface StageGainReduction {
|
|
396
|
+
/** Stage identifier, e.g. `"dynamics.compressor"`. */
|
|
397
|
+
stage: string;
|
|
398
|
+
/**
|
|
399
|
+
* Most recent (typically last-block) gain reduction in dB (negative or
|
|
400
|
+
* zero); for multiband stages it is the most-reduced band.
|
|
401
|
+
*/
|
|
402
|
+
gainReductionDb: number;
|
|
403
|
+
}
|
|
404
|
+
interface MasteringChainResult {
|
|
405
|
+
/** Latency-compensated offline output; no separate latency field is reported. */
|
|
406
|
+
samples: Float32Array;
|
|
407
|
+
sampleRate: number;
|
|
408
|
+
inputLufs: number;
|
|
409
|
+
outputLufs: number;
|
|
410
|
+
appliedGainDb: number;
|
|
324
411
|
stages: string[];
|
|
412
|
+
/**
|
|
413
|
+
* ITU-R BS.1770-4 true peak of the output (dBTP), measured with the chain's
|
|
414
|
+
* configured loudness true-peak oversample factor (default 4x). Lets callers
|
|
415
|
+
* verify a preset ceiling was met without a second oversampled scan.
|
|
416
|
+
*/
|
|
417
|
+
outputTruePeakDbtp: number;
|
|
418
|
+
/** EBU Tech 3342 Loudness Range of the output (LU). */
|
|
419
|
+
outputLra: number;
|
|
420
|
+
/** Per-stage gain reductions for the dynamics/maximizer stages (a subset of `stages`). */
|
|
421
|
+
stageGainReductions: StageGainReduction[];
|
|
325
422
|
}
|
|
326
|
-
interface
|
|
423
|
+
interface MasteringChainStereoResult {
|
|
327
424
|
left: Float32Array;
|
|
328
425
|
right: Float32Array;
|
|
329
426
|
sampleRate: number;
|
|
@@ -331,8 +428,17 @@ interface MasteringStereoChainResult {
|
|
|
331
428
|
outputLufs: number;
|
|
332
429
|
appliedGainDb: number;
|
|
333
430
|
stages: string[];
|
|
334
|
-
|
|
431
|
+
/** See {@link MasteringChainResult} for field semantics. */
|
|
432
|
+
outputTruePeakDbtp: number;
|
|
433
|
+
outputLra: number;
|
|
434
|
+
stageGainReductions: StageGainReduction[];
|
|
335
435
|
}
|
|
436
|
+
/**
|
|
437
|
+
* @deprecated Use {@link MasteringChainStereoResult}. Retained as an alias for
|
|
438
|
+
* source compatibility; the canonical name matches the Node and Python
|
|
439
|
+
* bindings (`MasteringChainStereoResult`).
|
|
440
|
+
*/
|
|
441
|
+
type MasteringStereoChainResult = MasteringChainStereoResult;
|
|
336
442
|
interface MasteringStereoResult {
|
|
337
443
|
left: Float32Array;
|
|
338
444
|
right: Float32Array;
|
|
@@ -538,6 +644,7 @@ interface KeyCandidate {
|
|
|
538
644
|
interface ChordDetectionOptions extends ValidateOptions {
|
|
539
645
|
minDuration?: number;
|
|
540
646
|
smoothingWindow?: number;
|
|
647
|
+
/** Final-template correlation threshold in [0, 1]; below it emits Unknown / N.C. */
|
|
541
648
|
threshold?: number;
|
|
542
649
|
useTriadsOnly?: boolean;
|
|
543
650
|
nFft?: number;
|
|
@@ -903,6 +1010,12 @@ interface NoteStretchOptions {
|
|
|
903
1010
|
/** Stretch ratio (0.5 = double duration, 2.0 = half duration). Default 1. */
|
|
904
1011
|
stretchRatio?: number;
|
|
905
1012
|
}
|
|
1013
|
+
/** Options for `noteMove`. */
|
|
1014
|
+
interface NoteMoveOptions {
|
|
1015
|
+
onsetSample?: number;
|
|
1016
|
+
offsetSample?: number;
|
|
1017
|
+
targetOnsetSample?: number;
|
|
1018
|
+
}
|
|
906
1019
|
/** How a `spectralEdit` region op modifies the masked bins. */
|
|
907
1020
|
type SpectralEditMode = 'gain' | 'attenuate' | 'mute' | 'heal';
|
|
908
1021
|
/** Analysis/synthesis window used by `spectralEdit`. */
|
|
@@ -1046,6 +1159,70 @@ interface HpssResult {
|
|
|
1046
1159
|
sampleRate: number;
|
|
1047
1160
|
}
|
|
1048
1161
|
|
|
1162
|
+
/** Canonical request form for HPSS. */
|
|
1163
|
+
interface HpssRequest {
|
|
1164
|
+
samples: Float32Array;
|
|
1165
|
+
sampleRate?: number;
|
|
1166
|
+
kernelHarmonic?: number;
|
|
1167
|
+
kernelPercussive?: number;
|
|
1168
|
+
}
|
|
1169
|
+
interface HarmonicRequest extends ValidateOptions {
|
|
1170
|
+
samples: Float32Array;
|
|
1171
|
+
sampleRate?: number;
|
|
1172
|
+
}
|
|
1173
|
+
interface PercussiveRequest extends ValidateOptions {
|
|
1174
|
+
samples: Float32Array;
|
|
1175
|
+
sampleRate?: number;
|
|
1176
|
+
}
|
|
1177
|
+
interface TimeStretchRequest extends ValidateOptions {
|
|
1178
|
+
samples: Float32Array;
|
|
1179
|
+
sampleRate: number;
|
|
1180
|
+
rate: number;
|
|
1181
|
+
}
|
|
1182
|
+
interface PitchShiftRequest extends ValidateOptions {
|
|
1183
|
+
samples: Float32Array;
|
|
1184
|
+
sampleRate: number;
|
|
1185
|
+
semitones: number;
|
|
1186
|
+
}
|
|
1187
|
+
interface PitchCorrectToMidiRequest extends ValidateOptions {
|
|
1188
|
+
samples: Float32Array;
|
|
1189
|
+
sampleRate?: number;
|
|
1190
|
+
currentMidi?: number;
|
|
1191
|
+
targetMidi?: number;
|
|
1192
|
+
}
|
|
1193
|
+
interface PitchCorrectToMidiTimevaryingRequest extends ValidateOptions {
|
|
1194
|
+
samples: Float32Array;
|
|
1195
|
+
f0Hz: Float32Array;
|
|
1196
|
+
targetMidi: number;
|
|
1197
|
+
sampleRate?: number;
|
|
1198
|
+
hopLength?: number;
|
|
1199
|
+
voiced?: Int32Array;
|
|
1200
|
+
voicedProb?: Float32Array;
|
|
1201
|
+
}
|
|
1202
|
+
interface PitchCorrectTimevaryingRequest extends PitchCorrectOptions {
|
|
1203
|
+
samples: Float32Array;
|
|
1204
|
+
f0Hz: Float32Array;
|
|
1205
|
+
sampleRate?: number;
|
|
1206
|
+
hopLength?: number;
|
|
1207
|
+
}
|
|
1208
|
+
interface NoteStretchRequest extends NoteStretchOptions, ValidateOptions {
|
|
1209
|
+
samples: Float32Array;
|
|
1210
|
+
sampleRate?: number;
|
|
1211
|
+
}
|
|
1212
|
+
interface NoteMoveRequest extends NoteMoveOptions, ValidateOptions {
|
|
1213
|
+
samples: Float32Array;
|
|
1214
|
+
sampleRate?: number;
|
|
1215
|
+
}
|
|
1216
|
+
interface NormalizeRequest extends ValidateOptions {
|
|
1217
|
+
samples: Float32Array;
|
|
1218
|
+
sampleRate: number;
|
|
1219
|
+
targetDb?: number;
|
|
1220
|
+
}
|
|
1221
|
+
interface SpectralEditRequest extends SpectralEditOptions, ValidateOptions {
|
|
1222
|
+
samples: Float32Array;
|
|
1223
|
+
sampleRate: number;
|
|
1224
|
+
ops?: SpectralRegionOp[];
|
|
1225
|
+
}
|
|
1049
1226
|
/**
|
|
1050
1227
|
* Perform Harmonic-Percussive Source Separation (HPSS).
|
|
1051
1228
|
*
|
|
@@ -1055,6 +1232,7 @@ interface HpssResult {
|
|
|
1055
1232
|
* @param kernelPercussive - Vertical median filter size for percussive (default: 31)
|
|
1056
1233
|
* @returns Separated harmonic and percussive components
|
|
1057
1234
|
*/
|
|
1235
|
+
declare function hpss(request: HpssRequest): HpssResult;
|
|
1058
1236
|
declare function hpss(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): HpssResult;
|
|
1059
1237
|
/**
|
|
1060
1238
|
* Extract harmonic component from audio.
|
|
@@ -1063,7 +1241,8 @@ declare function hpss(samples: Float32Array, sampleRate?: number, kernelHarmonic
|
|
|
1063
1241
|
* @param sampleRate - Sample rate in Hz
|
|
1064
1242
|
* @returns Harmonic component
|
|
1065
1243
|
*/
|
|
1066
|
-
declare function harmonic(
|
|
1244
|
+
declare function harmonic(request: HarmonicRequest): Float32Array;
|
|
1245
|
+
declare function harmonic(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
1067
1246
|
/**
|
|
1068
1247
|
* Extract percussive component from audio.
|
|
1069
1248
|
*
|
|
@@ -1071,7 +1250,8 @@ declare function harmonic(samples: Float32Array, sampleRate: number, options?: V
|
|
|
1071
1250
|
* @param sampleRate - Sample rate in Hz
|
|
1072
1251
|
* @returns Percussive component
|
|
1073
1252
|
*/
|
|
1074
|
-
declare function percussive(
|
|
1253
|
+
declare function percussive(request: PercussiveRequest): Float32Array;
|
|
1254
|
+
declare function percussive(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
1075
1255
|
/**
|
|
1076
1256
|
* Time-stretch audio without changing pitch.
|
|
1077
1257
|
*
|
|
@@ -1080,6 +1260,7 @@ declare function percussive(samples: Float32Array, sampleRate: number, options?:
|
|
|
1080
1260
|
* @param rate - Time stretch rate (0.5 = double duration, 2.0 = half duration)
|
|
1081
1261
|
* @returns Time-stretched audio
|
|
1082
1262
|
*/
|
|
1263
|
+
declare function timeStretch(request: TimeStretchRequest): Float32Array;
|
|
1083
1264
|
declare function timeStretch(samples: Float32Array, sampleRate: number, rate: number, options?: ValidateOptions): Float32Array;
|
|
1084
1265
|
/**
|
|
1085
1266
|
* Pitch-shift audio without changing duration.
|
|
@@ -1089,6 +1270,7 @@ declare function timeStretch(samples: Float32Array, sampleRate: number, rate: nu
|
|
|
1089
1270
|
* @param semitones - Pitch shift in semitones (+12 = one octave up, -12 = one octave down)
|
|
1090
1271
|
* @returns Pitch-shifted audio
|
|
1091
1272
|
*/
|
|
1273
|
+
declare function pitchShift(request: PitchShiftRequest): Float32Array;
|
|
1092
1274
|
declare function pitchShift(samples: Float32Array, sampleRate: number, semitones: number, options?: ValidateOptions): Float32Array;
|
|
1093
1275
|
/**
|
|
1094
1276
|
* Pitch-correct audio from a current MIDI note to a target MIDI note.
|
|
@@ -1099,6 +1281,7 @@ declare function pitchShift(samples: Float32Array, sampleRate: number, semitones
|
|
|
1099
1281
|
* @param targetMidi - Desired MIDI note number
|
|
1100
1282
|
* @returns Pitch-corrected audio
|
|
1101
1283
|
*/
|
|
1284
|
+
declare function pitchCorrectToMidi(request: PitchCorrectToMidiRequest): Float32Array;
|
|
1102
1285
|
declare function pitchCorrectToMidi(samples: Float32Array, sampleRate?: number, currentMidi?: number, targetMidi?: number, options?: ValidateOptions): Float32Array;
|
|
1103
1286
|
/**
|
|
1104
1287
|
* Contour-following ("time-varying") pitch correction toward a MIDI target.
|
|
@@ -1118,6 +1301,7 @@ declare function pitchCorrectToMidi(samples: Float32Array, sampleRate?: number,
|
|
|
1118
1301
|
* @param voicedProb - Optional per-frame voicing probability in [0, 1]
|
|
1119
1302
|
* @returns Pitch-corrected audio
|
|
1120
1303
|
*/
|
|
1304
|
+
declare function pitchCorrectToMidiTimevarying(request: PitchCorrectToMidiTimevaryingRequest): Float32Array;
|
|
1121
1305
|
declare function pitchCorrectToMidiTimevarying(samples: Float32Array, f0Hz: Float32Array, targetMidi: number, sampleRate?: number, hopLength?: number, voiced?: Int32Array, voicedProb?: Float32Array, options?: ValidateOptions): Float32Array;
|
|
1122
1306
|
/**
|
|
1123
1307
|
* Contour-following pitch correction toward a fixed MIDI note OR a musical
|
|
@@ -1135,6 +1319,7 @@ declare function pitchCorrectToMidiTimevarying(samples: Float32Array, f0Hz: Floa
|
|
|
1135
1319
|
* @param options - Target mode + retune knobs + optional voiced/voicedProb arrays
|
|
1136
1320
|
* @returns Pitch-corrected audio
|
|
1137
1321
|
*/
|
|
1322
|
+
declare function pitchCorrectTimevarying(request: PitchCorrectTimevaryingRequest): Float32Array;
|
|
1138
1323
|
declare function pitchCorrectTimevarying(samples: Float32Array, f0Hz: Float32Array, sampleRate?: number, hopLength?: number, options?: PitchCorrectOptions): Float32Array;
|
|
1139
1324
|
/**
|
|
1140
1325
|
* Time-stretch a note region between two sample offsets without changing pitch.
|
|
@@ -1146,7 +1331,11 @@ declare function pitchCorrectTimevarying(samples: Float32Array, f0Hz: Float32Arr
|
|
|
1146
1331
|
* @param stretchRatio - Stretch ratio (0.5 = double duration, 2.0 = half duration)
|
|
1147
1332
|
* @returns Audio with the note region stretched
|
|
1148
1333
|
*/
|
|
1334
|
+
declare function noteStretch(request: NoteStretchRequest): Float32Array;
|
|
1149
1335
|
declare function noteStretch(samples: Float32Array, sampleRate?: number, options?: NoteStretchOptions & ValidateOptions): Float32Array;
|
|
1336
|
+
/** Move a note region to a new onset without changing its duration. */
|
|
1337
|
+
declare function noteMove(request: NoteMoveRequest): Float32Array;
|
|
1338
|
+
declare function noteMove(samples: Float32Array, sampleRate?: number, options?: NoteMoveOptions & ValidateOptions): Float32Array;
|
|
1150
1339
|
/**
|
|
1151
1340
|
* Normalize audio to target peak level.
|
|
1152
1341
|
*
|
|
@@ -1155,6 +1344,7 @@ declare function noteStretch(samples: Float32Array, sampleRate?: number, options
|
|
|
1155
1344
|
* @param targetDb - Target peak level in dB (default: 0 dB = full scale)
|
|
1156
1345
|
* @returns Normalized audio
|
|
1157
1346
|
*/
|
|
1347
|
+
declare function normalize(request: NormalizeRequest): Float32Array;
|
|
1158
1348
|
declare function normalize(samples: Float32Array, sampleRate: number, targetDb?: number, options?: ValidateOptions): Float32Array;
|
|
1159
1349
|
/**
|
|
1160
1350
|
* Apply region-based spectral edits (gain/attenuate/mute/heal) to mono audio.
|
|
@@ -1170,6 +1360,7 @@ declare function normalize(samples: Float32Array, sampleRate: number, targetDb?:
|
|
|
1170
1360
|
* @param options - STFT + heal configuration ({@link SpectralEditOptions})
|
|
1171
1361
|
* @returns Edited audio
|
|
1172
1362
|
*/
|
|
1363
|
+
declare function spectralEdit(request: SpectralEditRequest): Float32Array;
|
|
1173
1364
|
declare function spectralEdit(samples: Float32Array, sampleRate: number, ops?: SpectralRegionOp[], options?: SpectralEditOptions & ValidateOptions): Float32Array;
|
|
1174
1365
|
|
|
1175
1366
|
/** Options for {@link voiceChange}. All fields are optional. */
|
|
@@ -1179,6 +1370,11 @@ interface VoiceChangeOptions extends ValidateOptions {
|
|
|
1179
1370
|
/** Formant scale factor (>1 brightens, <1 darkens). Default 1. */
|
|
1180
1371
|
formantFactor?: number;
|
|
1181
1372
|
}
|
|
1373
|
+
/** Canonical request form for one-shot voice changing. */
|
|
1374
|
+
interface VoiceChangeRequest extends VoiceChangeOptions {
|
|
1375
|
+
samples: Float32Array;
|
|
1376
|
+
sampleRate?: number;
|
|
1377
|
+
}
|
|
1182
1378
|
/**
|
|
1183
1379
|
* Apply a voice change by shifting pitch and formants independently.
|
|
1184
1380
|
*
|
|
@@ -1187,21 +1383,27 @@ interface VoiceChangeOptions extends ValidateOptions {
|
|
|
1187
1383
|
* @param options - Pitch/formant settings ({@link VoiceChangeOptions})
|
|
1188
1384
|
* @returns Voice-changed audio
|
|
1189
1385
|
*/
|
|
1386
|
+
declare function voiceChange(request: VoiceChangeRequest): Float32Array;
|
|
1190
1387
|
declare function voiceChange(samples: Float32Array, sampleRate?: number, options?: VoiceChangeOptions): Float32Array;
|
|
1191
1388
|
/** Options for the offline {@link voiceChangeRealtime} convenience wrapper. */
|
|
1192
1389
|
interface VoiceChangeRealtimeOptions extends ValidateOptions {
|
|
1193
1390
|
/** Channel count (1 = mono, 2 = interleaved stereo). */
|
|
1194
1391
|
channels?: 1 | 2;
|
|
1195
|
-
/**
|
|
1392
|
+
/** @deprecated The shared C-ABI renderer uses a fixed cross-surface block size. */
|
|
1196
1393
|
blockSize?: number;
|
|
1197
1394
|
}
|
|
1395
|
+
/** Canonical request form for offline realtime voice changing. */
|
|
1396
|
+
interface VoiceChangeRealtimeRequest extends VoiceChangeRealtimeOptions {
|
|
1397
|
+
samples: Float32Array;
|
|
1398
|
+
sampleRate?: number;
|
|
1399
|
+
preset?: RealtimeVoiceChangerConfigInput;
|
|
1400
|
+
}
|
|
1198
1401
|
/**
|
|
1199
1402
|
* Applies the realtime voice-changer chain to a whole buffer in one call.
|
|
1200
1403
|
*
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
* plain mono buffer; for stereo, `samples` is interleaved (L0,R0,L1,R1,...).
|
|
1404
|
+
* Uses the shared C-ABI renderer, so Python, Node, and WASM use the same
|
|
1405
|
+
* fixed block size and latency compensation. For mono, `samples` is a plain
|
|
1406
|
+
* buffer; for stereo, it is interleaved (L0,R0,L1,R1,...).
|
|
1205
1407
|
*
|
|
1206
1408
|
* @param samples - Audio samples (mono, or interleaved stereo when channels=2)
|
|
1207
1409
|
* @param sampleRate - Sample rate in Hz (default 48000, matching Python/Node)
|
|
@@ -1209,8 +1411,39 @@ interface VoiceChangeRealtimeOptions extends ValidateOptions {
|
|
|
1209
1411
|
* @param options - Channel count and block size ({@link VoiceChangeRealtimeOptions})
|
|
1210
1412
|
* @returns The processed buffer (same layout/length as the input).
|
|
1211
1413
|
*/
|
|
1414
|
+
declare function voiceChangeRealtime(request: VoiceChangeRealtimeRequest): Float32Array;
|
|
1212
1415
|
declare function voiceChangeRealtime(samples: Float32Array, sampleRate?: number, preset?: RealtimeVoiceChangerConfigInput, options?: VoiceChangeRealtimeOptions): Float32Array;
|
|
1213
1416
|
|
|
1417
|
+
interface MasteringChainRequest {
|
|
1418
|
+
samples: Float32Array;
|
|
1419
|
+
sampleRate?: number;
|
|
1420
|
+
config?: MasteringChainConfig;
|
|
1421
|
+
onProgress?: ProgressCallback;
|
|
1422
|
+
}
|
|
1423
|
+
interface MasteringChainStereoRequest {
|
|
1424
|
+
left: Float32Array;
|
|
1425
|
+
right: Float32Array;
|
|
1426
|
+
sampleRate?: number;
|
|
1427
|
+
config?: MasteringChainConfig;
|
|
1428
|
+
onProgress?: ProgressCallback;
|
|
1429
|
+
}
|
|
1430
|
+
/** Canonical request form for one-shot preset mastering. */
|
|
1431
|
+
interface MasterAudioRequest {
|
|
1432
|
+
samples: Float32Array;
|
|
1433
|
+
sampleRate?: number;
|
|
1434
|
+
preset?: MasteringPreset;
|
|
1435
|
+
overrides?: MasteringChainConfig;
|
|
1436
|
+
onProgress?: ProgressCallback;
|
|
1437
|
+
}
|
|
1438
|
+
/** Canonical request form for one-shot stereo preset mastering. */
|
|
1439
|
+
interface MasterAudioStereoRequest {
|
|
1440
|
+
left: Float32Array;
|
|
1441
|
+
right: Float32Array;
|
|
1442
|
+
sampleRate?: number;
|
|
1443
|
+
preset?: MasteringPreset;
|
|
1444
|
+
overrides?: MasteringChainConfig;
|
|
1445
|
+
onProgress?: ProgressCallback;
|
|
1446
|
+
}
|
|
1214
1447
|
/**
|
|
1215
1448
|
* Apply a configurable mastering chain in WASM.
|
|
1216
1449
|
*
|
|
@@ -1219,7 +1452,8 @@ declare function voiceChangeRealtime(samples: Float32Array, sampleRate?: number,
|
|
|
1219
1452
|
* @param config - Chain stage configuration
|
|
1220
1453
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1221
1454
|
*/
|
|
1222
|
-
declare function masteringChain(
|
|
1455
|
+
declare function masteringChain(request: MasteringChainRequest): MasteringChainResult;
|
|
1456
|
+
declare function masteringChain(samples: Float32Array, sampleRate?: number, config?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainResult;
|
|
1223
1457
|
/**
|
|
1224
1458
|
* Apply a configurable stereo mastering chain in WASM.
|
|
1225
1459
|
*
|
|
@@ -1229,7 +1463,8 @@ declare function masteringChain(samples: Float32Array, sampleRate: number | unde
|
|
|
1229
1463
|
* @param config - Chain stage configuration
|
|
1230
1464
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1231
1465
|
*/
|
|
1232
|
-
declare function masteringChainStereo(
|
|
1466
|
+
declare function masteringChainStereo(request: MasteringChainStereoRequest): MasteringChainStereoResult;
|
|
1467
|
+
declare function masteringChainStereo(left: Float32Array, right: Float32Array, sampleRate?: number, config?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainStereoResult;
|
|
1233
1468
|
/**
|
|
1234
1469
|
* Apply a configurable mastering chain in WASM with progress reporting.
|
|
1235
1470
|
*
|
|
@@ -1239,7 +1474,8 @@ declare function masteringChainStereo(left: Float32Array, right: Float32Array, s
|
|
|
1239
1474
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
1240
1475
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1241
1476
|
*/
|
|
1242
|
-
declare function masteringChainWithProgress(
|
|
1477
|
+
declare function masteringChainWithProgress(request: MasteringChainRequest & Required<Pick<MasteringChainRequest, 'onProgress'>>): MasteringChainResult;
|
|
1478
|
+
declare function masteringChainWithProgress(samples: Float32Array, sampleRate?: number, config?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainResult;
|
|
1243
1479
|
/**
|
|
1244
1480
|
* Apply a configurable stereo mastering chain in WASM with progress reporting.
|
|
1245
1481
|
*
|
|
@@ -1250,7 +1486,8 @@ declare function masteringChainWithProgress(samples: Float32Array, sampleRate: n
|
|
|
1250
1486
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
1251
1487
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1252
1488
|
*/
|
|
1253
|
-
declare function masteringChainStereoWithProgress(
|
|
1489
|
+
declare function masteringChainStereoWithProgress(request: MasteringChainStereoRequest & Required<Pick<MasteringChainStereoRequest, 'onProgress'>>): MasteringChainStereoResult;
|
|
1490
|
+
declare function masteringChainStereoWithProgress(left: Float32Array, right: Float32Array, sampleRate?: number, config?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainStereoResult;
|
|
1254
1491
|
/**
|
|
1255
1492
|
* List built-in mastering preset identifiers.
|
|
1256
1493
|
*
|
|
@@ -1263,10 +1500,12 @@ declare function masteringPresetNames(): MasteringPreset[];
|
|
|
1263
1500
|
* @param samples - Audio samples (mono, float32)
|
|
1264
1501
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1265
1502
|
* @param presetName - Preset identifier from {@link masteringPresetNames}
|
|
1266
|
-
* @param overrides - Optional
|
|
1503
|
+
* @param overrides - Optional nested {@link MasteringChainConfig} applied on top of the preset (e.g. `{ loudness: { targetLufs: -14 } }`). Pass `null` for preset defaults.
|
|
1504
|
+
* @param onProgress - Optional per-stage progress callback (progress: 0-1, stage: string).
|
|
1267
1505
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1268
1506
|
*/
|
|
1269
|
-
declare function masterAudio(
|
|
1507
|
+
declare function masterAudio(request: MasterAudioRequest): MasteringChainResult;
|
|
1508
|
+
declare function masterAudio(samples: Float32Array, sampleRate?: number, presetName?: MasteringPreset, overrides?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainResult;
|
|
1270
1509
|
/**
|
|
1271
1510
|
* Apply a named mastering preset chain to stereo audio.
|
|
1272
1511
|
*
|
|
@@ -1274,20 +1513,78 @@ declare function masterAudio(samples: Float32Array, sampleRate?: number, presetN
|
|
|
1274
1513
|
* @param right - Right channel samples
|
|
1275
1514
|
* @param sampleRate - Sample rate in Hz
|
|
1276
1515
|
* @param presetName - Preset identifier from {@link masteringPresetNames}
|
|
1277
|
-
* @param overrides - Optional
|
|
1516
|
+
* @param overrides - Optional nested {@link MasteringChainConfig} applied on top of the preset (e.g. `{ loudness: { targetLufs: -14 } }`). Pass `null` for preset defaults.
|
|
1517
|
+
* @param onProgress - Optional per-stage progress callback (progress: 0-1, stage: string).
|
|
1278
1518
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1279
1519
|
*/
|
|
1280
|
-
declare function masterAudioStereo(
|
|
1520
|
+
declare function masterAudioStereo(request: MasterAudioStereoRequest): MasteringChainStereoResult;
|
|
1521
|
+
declare function masterAudioStereo(left: Float32Array, right: Float32Array, sampleRate?: number, presetName?: MasteringPreset, overrides?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainStereoResult;
|
|
1281
1522
|
/**
|
|
1282
1523
|
* Mono `masterAudio` with per-stage progress reporting. `onProgress` is invoked
|
|
1283
1524
|
* with `(progress, stage)` between each chain stage (progress is in [0,1]).
|
|
1284
1525
|
*/
|
|
1285
|
-
declare function masterAudioWithProgress(
|
|
1526
|
+
declare function masterAudioWithProgress(request: MasterAudioRequest & Required<Pick<MasterAudioRequest, 'onProgress'>>): MasteringChainResult;
|
|
1527
|
+
declare function masterAudioWithProgress(samples: Float32Array, sampleRate?: number, presetName?: MasteringPreset, overrides?: MasteringChainConfig | null, onProgress?: ProgressCallback): MasteringChainResult;
|
|
1286
1528
|
/**
|
|
1287
1529
|
* Stereo `masterAudio` with per-stage progress reporting.
|
|
1288
1530
|
*/
|
|
1289
|
-
declare function masterAudioStereoWithProgress(
|
|
1531
|
+
declare function masterAudioStereoWithProgress(request: MasterAudioStereoRequest & Required<Pick<MasterAudioStereoRequest, 'onProgress'>>): MasteringChainStereoResult;
|
|
1532
|
+
declare function masterAudioStereoWithProgress(left: Float32Array, right: Float32Array, sampleRate?: number, presetName?: MasteringPreset, overrides?: MasteringChainConfig | null, onProgress?: ProgressCallback): MasteringChainStereoResult;
|
|
1290
1533
|
|
|
1534
|
+
/** Canonical request form for loudness/true-peak mastering. */
|
|
1535
|
+
interface MasteringRequest extends MasteringOptions {
|
|
1536
|
+
samples: Float32Array;
|
|
1537
|
+
sampleRate?: number;
|
|
1538
|
+
}
|
|
1539
|
+
interface MasteringProcessRequest {
|
|
1540
|
+
processorName: SoloProcessor;
|
|
1541
|
+
samples: Float32Array;
|
|
1542
|
+
sampleRate?: number;
|
|
1543
|
+
params?: MasteringProcessorParams;
|
|
1544
|
+
}
|
|
1545
|
+
interface MasteringProcessStereoRequest {
|
|
1546
|
+
processorName: SoloProcessor;
|
|
1547
|
+
left: Float32Array;
|
|
1548
|
+
right: Float32Array;
|
|
1549
|
+
sampleRate?: number;
|
|
1550
|
+
params?: MasteringProcessorParams;
|
|
1551
|
+
}
|
|
1552
|
+
/** Canonical request form for a two-input match processor. */
|
|
1553
|
+
interface MasteringPairProcessRequest {
|
|
1554
|
+
processorName: PairProcessor;
|
|
1555
|
+
source: Float32Array;
|
|
1556
|
+
reference: Float32Array;
|
|
1557
|
+
sampleRate?: number;
|
|
1558
|
+
params?: MasteringProcessorParams;
|
|
1559
|
+
}
|
|
1560
|
+
/** Canonical request form for a two-input match analysis. */
|
|
1561
|
+
interface MasteringPairAnalyzeRequest {
|
|
1562
|
+
analysisName: PairAnalysis;
|
|
1563
|
+
source: Float32Array;
|
|
1564
|
+
reference: Float32Array;
|
|
1565
|
+
sampleRate?: number;
|
|
1566
|
+
params?: MasteringProcessorParams;
|
|
1567
|
+
}
|
|
1568
|
+
/** Canonical request form for a stereo analysis. */
|
|
1569
|
+
interface MasteringStereoAnalyzeRequest {
|
|
1570
|
+
analysisName: StereoAnalysis;
|
|
1571
|
+
left: Float32Array;
|
|
1572
|
+
right: Float32Array;
|
|
1573
|
+
sampleRate?: number;
|
|
1574
|
+
params?: MasteringProcessorParams;
|
|
1575
|
+
}
|
|
1576
|
+
/** Canonical request form for assistant/profile calls. */
|
|
1577
|
+
interface MasteringSamplesParamsRequest {
|
|
1578
|
+
samples: Float32Array;
|
|
1579
|
+
sampleRate?: number;
|
|
1580
|
+
params?: MasteringProcessorParams;
|
|
1581
|
+
}
|
|
1582
|
+
/** Canonical request form for streaming-platform preview. */
|
|
1583
|
+
interface MasteringStreamingPreviewRequest {
|
|
1584
|
+
samples: Float32Array;
|
|
1585
|
+
sampleRate?: number;
|
|
1586
|
+
platforms?: StreamingPlatform[];
|
|
1587
|
+
}
|
|
1291
1588
|
/**
|
|
1292
1589
|
* Apply mastering loudness normalization with a true-peak ceiling.
|
|
1293
1590
|
*
|
|
@@ -1296,6 +1593,7 @@ declare function masterAudioStereoWithProgress(left: Float32Array, right: Float3
|
|
|
1296
1593
|
* @param options - Loudness/ceiling settings ({@link MasteringOptions})
|
|
1297
1594
|
* @returns Processed audio and loudness metadata
|
|
1298
1595
|
*/
|
|
1596
|
+
declare function mastering(request: MasteringRequest): MasteringResult;
|
|
1299
1597
|
declare function mastering(samples: Float32Array, sampleRate?: number, options?: MasteringOptions): MasteringResult;
|
|
1300
1598
|
declare function masteringProcessorNames(): SoloProcessor[];
|
|
1301
1599
|
/**
|
|
@@ -1357,6 +1655,16 @@ interface MasteringProcessorCatalogEntry {
|
|
|
1357
1655
|
realtimeInsertable: boolean;
|
|
1358
1656
|
/** True for processors with no mono implementation (stereo-only). */
|
|
1359
1657
|
stereoOnly: boolean;
|
|
1658
|
+
/**
|
|
1659
|
+
* Reported latency for the default 48 kHz / 512-sample probe configuration.
|
|
1660
|
+
* Zero for offline processors; configuration-dependent values are estimates.
|
|
1661
|
+
*/
|
|
1662
|
+
latencySamples: number;
|
|
1663
|
+
/**
|
|
1664
|
+
* Audible decay length for the same default prepared probe. Zero for
|
|
1665
|
+
* offline, dry-only, and no-tail processors.
|
|
1666
|
+
*/
|
|
1667
|
+
tailSamples: number;
|
|
1360
1668
|
/**
|
|
1361
1669
|
* How the mixer wraps the processor on a >2-channel (surround) bus insert:
|
|
1362
1670
|
* "multichannel" (one full-buffer call) or "stereoPairOnly" (front L/R pair,
|
|
@@ -1374,22 +1682,30 @@ declare function masteringProcessorCatalog(): MasteringProcessorCatalogEntry[];
|
|
|
1374
1682
|
declare function masteringPairProcessorNames(): PairProcessor[];
|
|
1375
1683
|
declare function masteringPairAnalysisNames(): PairAnalysis[];
|
|
1376
1684
|
declare function masteringStereoAnalysisNames(): StereoAnalysis[];
|
|
1685
|
+
declare function masteringProcess(request: MasteringProcessRequest): MasteringResult;
|
|
1377
1686
|
declare function masteringProcess(processorName: SoloProcessor, samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringResult;
|
|
1687
|
+
declare function masteringProcessStereo(request: MasteringProcessStereoRequest): MasteringStereoResult;
|
|
1378
1688
|
declare function masteringProcessStereo(processorName: SoloProcessor, left: Float32Array, right: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringStereoResult;
|
|
1379
1689
|
/**
|
|
1380
1690
|
* Apply a two-input `match.*` processor. `source` and `reference` may have
|
|
1381
1691
|
* independent lengths — the match primitives consume each buffer at its own
|
|
1382
1692
|
* length.
|
|
1383
1693
|
*/
|
|
1694
|
+
declare function masteringPairProcess(request: MasteringPairProcessRequest): MasteringResult;
|
|
1384
1695
|
declare function masteringPairProcess(processorName: PairProcessor, source: Float32Array, reference: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringResult;
|
|
1385
1696
|
/**
|
|
1386
1697
|
* Analyze a `source` against a `reference` with a two-input analysis. The two
|
|
1387
1698
|
* buffers may have independent lengths.
|
|
1388
1699
|
*/
|
|
1700
|
+
declare function masteringPairAnalyze(request: MasteringPairAnalyzeRequest): string;
|
|
1389
1701
|
declare function masteringPairAnalyze(analysisName: PairAnalysis, source: Float32Array, reference: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1702
|
+
declare function masteringStereoAnalyze(request: MasteringStereoAnalyzeRequest): string;
|
|
1390
1703
|
declare function masteringStereoAnalyze(analysisName: StereoAnalysis, left: Float32Array, right: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1704
|
+
declare function masteringAssistantSuggest(request: MasteringSamplesParamsRequest): string;
|
|
1391
1705
|
declare function masteringAssistantSuggest(samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1706
|
+
declare function masteringAudioProfile(request: MasteringSamplesParamsRequest): string;
|
|
1392
1707
|
declare function masteringAudioProfile(samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1708
|
+
declare function masteringStreamingPreview(request: MasteringStreamingPreviewRequest): string;
|
|
1393
1709
|
declare function masteringStreamingPreview(samples: Float32Array, sampleRate?: number, platforms?: StreamingPlatform[]): string;
|
|
1394
1710
|
|
|
1395
1711
|
/** Compressor sidechain detector mode. */
|
|
@@ -1409,6 +1725,11 @@ interface CompressorOptions extends ValidateOptions {
|
|
|
1409
1725
|
pdrTimeMs?: number;
|
|
1410
1726
|
pdrReleaseScale?: number;
|
|
1411
1727
|
}
|
|
1728
|
+
/** Canonical request form for the offline compressor. */
|
|
1729
|
+
interface MasteringDynamicsCompressorRequest extends CompressorOptions {
|
|
1730
|
+
samples: Float32Array;
|
|
1731
|
+
sampleRate: number;
|
|
1732
|
+
}
|
|
1412
1733
|
/** Options for `masteringDynamicsGate`. */
|
|
1413
1734
|
interface GateOptions extends ValidateOptions {
|
|
1414
1735
|
thresholdDb?: number;
|
|
@@ -1419,6 +1740,11 @@ interface GateOptions extends ValidateOptions {
|
|
|
1419
1740
|
closeThresholdDb?: number;
|
|
1420
1741
|
keyHpfHz?: number;
|
|
1421
1742
|
}
|
|
1743
|
+
/** Canonical request form for the offline gate. */
|
|
1744
|
+
interface MasteringDynamicsGateRequest extends GateOptions {
|
|
1745
|
+
samples: Float32Array;
|
|
1746
|
+
sampleRate: number;
|
|
1747
|
+
}
|
|
1422
1748
|
/** Options for `masteringDynamicsTransientShaper`. */
|
|
1423
1749
|
interface TransientShaperOptions extends ValidateOptions {
|
|
1424
1750
|
attackGainDb?: number;
|
|
@@ -1432,16 +1758,24 @@ interface TransientShaperOptions extends ValidateOptions {
|
|
|
1432
1758
|
gainSmoothingMs?: number;
|
|
1433
1759
|
lookaheadMs?: number;
|
|
1434
1760
|
}
|
|
1761
|
+
/** Canonical request form for the offline transient shaper. */
|
|
1762
|
+
interface MasteringDynamicsTransientShaperRequest extends TransientShaperOptions {
|
|
1763
|
+
samples: Float32Array;
|
|
1764
|
+
sampleRate: number;
|
|
1765
|
+
}
|
|
1435
1766
|
/** Result envelope returned by offline mastering dynamics processors. */
|
|
1436
1767
|
interface DynamicsResult {
|
|
1437
1768
|
samples: Float32Array;
|
|
1438
1769
|
latencySamples: number;
|
|
1439
1770
|
}
|
|
1440
1771
|
/** Offline feed-forward compressor (soft knee, optional auto-makeup / sidechain HPF). */
|
|
1772
|
+
declare function masteringDynamicsCompressor(request: MasteringDynamicsCompressorRequest): DynamicsResult;
|
|
1441
1773
|
declare function masteringDynamicsCompressor(samples: Float32Array, sampleRate: number, options?: CompressorOptions): DynamicsResult;
|
|
1442
1774
|
/** Offline noise gate (hysteresis, hold, optional key HPF). */
|
|
1775
|
+
declare function masteringDynamicsGate(request: MasteringDynamicsGateRequest): DynamicsResult;
|
|
1443
1776
|
declare function masteringDynamicsGate(samples: Float32Array, sampleRate: number, options?: GateOptions): DynamicsResult;
|
|
1444
1777
|
/** Offline transient shaper (envelope-difference attack/sustain control). */
|
|
1778
|
+
declare function masteringDynamicsTransientShaper(request: MasteringDynamicsTransientShaperRequest): DynamicsResult;
|
|
1445
1779
|
declare function masteringDynamicsTransientShaper(samples: Float32Array, sampleRate: number, options?: TransientShaperOptions): DynamicsResult;
|
|
1446
1780
|
|
|
1447
1781
|
/** Options for `masteringRepairDeclick`. */
|
|
@@ -1452,6 +1786,10 @@ interface DeclickOptions {
|
|
|
1452
1786
|
lpcOrder?: number;
|
|
1453
1787
|
residualRatio?: number;
|
|
1454
1788
|
}
|
|
1789
|
+
interface MasteringRepairDeclickRequest extends DeclickOptions {
|
|
1790
|
+
samples: Float32Array;
|
|
1791
|
+
sampleRate: number;
|
|
1792
|
+
}
|
|
1455
1793
|
/** Algorithms accepted by `masteringRepairDenoiseClassical`. */
|
|
1456
1794
|
type DenoiseClassicalMode = 'logMmse' | 'mmseStsa' | 'spectralSubtraction';
|
|
1457
1795
|
/** Noise PSD estimators accepted by `masteringRepairDenoiseClassical`. */
|
|
@@ -1470,9 +1808,15 @@ interface DenoiseClassicalOptions {
|
|
|
1470
1808
|
speechPresenceGain?: boolean;
|
|
1471
1809
|
gainSmoothing?: boolean;
|
|
1472
1810
|
}
|
|
1811
|
+
interface MasteringRepairDenoiseClassicalRequest extends DenoiseClassicalOptions {
|
|
1812
|
+
samples: Float32Array;
|
|
1813
|
+
sampleRate: number;
|
|
1814
|
+
}
|
|
1473
1815
|
/** Offline LPC-based declicker. */
|
|
1816
|
+
declare function masteringRepairDeclick(request: MasteringRepairDeclickRequest): Float32Array;
|
|
1474
1817
|
declare function masteringRepairDeclick(samples: Float32Array, sampleRate: number, options?: DeclickOptions): Float32Array;
|
|
1475
1818
|
/** Offline STFT-domain classical denoiser (LogMMSE / MMSE-STSA / SpectralSubtraction). */
|
|
1819
|
+
declare function masteringRepairDenoiseClassical(request: MasteringRepairDenoiseClassicalRequest): Float32Array;
|
|
1476
1820
|
declare function masteringRepairDenoiseClassical(samples: Float32Array, sampleRate: number, options?: DenoiseClassicalOptions): Float32Array;
|
|
1477
1821
|
/** Options for `masteringRepairDeclip`. */
|
|
1478
1822
|
interface DeclipOptions {
|
|
@@ -1481,6 +1825,10 @@ interface DeclipOptions {
|
|
|
1481
1825
|
iterations?: number;
|
|
1482
1826
|
lpcBlend?: number;
|
|
1483
1827
|
}
|
|
1828
|
+
interface MasteringRepairDeclipRequest extends DeclipOptions {
|
|
1829
|
+
samples: Float32Array;
|
|
1830
|
+
sampleRate: number;
|
|
1831
|
+
}
|
|
1484
1832
|
/** Algorithms accepted by `masteringRepairDecrackle`. */
|
|
1485
1833
|
type DecrackleMode = 'median' | 'waveletShrinkage';
|
|
1486
1834
|
/** Options for `masteringRepairDecrackle`. */
|
|
@@ -1489,6 +1837,10 @@ interface DecrackleOptions {
|
|
|
1489
1837
|
mode?: DecrackleMode;
|
|
1490
1838
|
levels?: number;
|
|
1491
1839
|
}
|
|
1840
|
+
interface MasteringRepairDecrackleRequest extends DecrackleOptions {
|
|
1841
|
+
samples: Float32Array;
|
|
1842
|
+
sampleRate: number;
|
|
1843
|
+
}
|
|
1492
1844
|
/** Options for `masteringRepairDehum`. */
|
|
1493
1845
|
interface DehumOptions {
|
|
1494
1846
|
fundamentalHz?: number;
|
|
@@ -1500,6 +1852,10 @@ interface DehumOptions {
|
|
|
1500
1852
|
frameSize?: number;
|
|
1501
1853
|
pllBandwidth?: number;
|
|
1502
1854
|
}
|
|
1855
|
+
interface MasteringRepairDehumRequest extends DehumOptions {
|
|
1856
|
+
samples: Float32Array;
|
|
1857
|
+
sampleRate: number;
|
|
1858
|
+
}
|
|
1503
1859
|
/** Options for `masteringRepairDereverbClassical`. */
|
|
1504
1860
|
interface DereverbClassicalOptions {
|
|
1505
1861
|
threshold?: number;
|
|
@@ -1515,6 +1871,10 @@ interface DereverbClassicalOptions {
|
|
|
1515
1871
|
wpeTaps?: number;
|
|
1516
1872
|
wpeStrength?: number;
|
|
1517
1873
|
}
|
|
1874
|
+
interface MasteringRepairDereverbClassicalRequest extends DereverbClassicalOptions {
|
|
1875
|
+
samples: Float32Array;
|
|
1876
|
+
sampleRate: number;
|
|
1877
|
+
}
|
|
1518
1878
|
/** Trimming modes accepted by `masteringRepairTrimSilence`. */
|
|
1519
1879
|
type TrimSilenceMode = 'peak' | 'lufsGated';
|
|
1520
1880
|
/** Options for `masteringRepairTrimSilence`. */
|
|
@@ -1525,15 +1885,24 @@ interface TrimSilenceOptions {
|
|
|
1525
1885
|
gateLufs?: number;
|
|
1526
1886
|
windowMs?: number;
|
|
1527
1887
|
}
|
|
1888
|
+
interface MasteringRepairTrimSilenceRequest extends TrimSilenceOptions {
|
|
1889
|
+
samples: Float32Array;
|
|
1890
|
+
sampleRate: number;
|
|
1891
|
+
}
|
|
1528
1892
|
/** Offline LPC-based declipper. */
|
|
1893
|
+
declare function masteringRepairDeclip(request: MasteringRepairDeclipRequest): Float32Array;
|
|
1529
1894
|
declare function masteringRepairDeclip(samples: Float32Array, sampleRate: number, options?: DeclipOptions): Float32Array;
|
|
1530
1895
|
/** Offline crackle suppressor (median or wavelet-shrinkage). */
|
|
1896
|
+
declare function masteringRepairDecrackle(request: MasteringRepairDecrackleRequest): Float32Array;
|
|
1531
1897
|
declare function masteringRepairDecrackle(samples: Float32Array, sampleRate: number, options?: DecrackleOptions): Float32Array;
|
|
1532
1898
|
/** Offline mains-hum remover. */
|
|
1899
|
+
declare function masteringRepairDehum(request: MasteringRepairDehumRequest): Float32Array;
|
|
1533
1900
|
declare function masteringRepairDehum(samples: Float32Array, sampleRate: number, options?: DehumOptions): Float32Array;
|
|
1534
1901
|
/** Offline classical dereverberator (spectral subtraction + optional WPE). */
|
|
1902
|
+
declare function masteringRepairDereverbClassical(request: MasteringRepairDereverbClassicalRequest): Float32Array;
|
|
1535
1903
|
declare function masteringRepairDereverbClassical(samples: Float32Array, sampleRate: number, options?: DereverbClassicalOptions): Float32Array;
|
|
1536
1904
|
/** Offline silence trimmer (peak threshold or LUFS-gated). */
|
|
1905
|
+
declare function masteringRepairTrimSilence(request: MasteringRepairTrimSilenceRequest): Float32Array;
|
|
1537
1906
|
declare function masteringRepairTrimSilence(samples: Float32Array, sampleRate: number, options?: TrimSilenceOptions): Float32Array;
|
|
1538
1907
|
|
|
1539
1908
|
declare function mixingScenePresetNames(): string[];
|
|
@@ -1546,6 +1915,12 @@ declare function mixingScenePresetNames(): string[];
|
|
|
1546
1915
|
* @returns Scene JSON string
|
|
1547
1916
|
*/
|
|
1548
1917
|
declare function mixingScenePresetJson(presetName: string): string;
|
|
1918
|
+
/** Inputs for the one-shot {@link mixStereo} facade. */
|
|
1919
|
+
interface MixStereoRequest extends MixOptions {
|
|
1920
|
+
leftChannels: Float32Array[];
|
|
1921
|
+
rightChannels: Float32Array[];
|
|
1922
|
+
sampleRate?: number;
|
|
1923
|
+
}
|
|
1549
1924
|
/**
|
|
1550
1925
|
* One-shot stereo mix of multiple strips through the routing graph + master bus.
|
|
1551
1926
|
*
|
|
@@ -1561,6 +1936,7 @@ declare function mixingScenePresetJson(presetName: string): string;
|
|
|
1561
1936
|
* @param sampleRate - Sample rate in Hz
|
|
1562
1937
|
* @param options - Per-strip mix options (trim, fader, pan, width, mute)
|
|
1563
1938
|
*/
|
|
1939
|
+
declare function mixStereo(request: MixStereoRequest): MixResult;
|
|
1564
1940
|
declare function mixStereo(leftChannels: Float32Array[], rightChannels: Float32Array[], sampleRate?: number, options?: MixOptions): MixResult;
|
|
1565
1941
|
|
|
1566
1942
|
type BrowserDecodeContext = Pick<BaseAudioContext, 'decodeAudioData' | 'sampleRate'>;
|
|
@@ -1648,11 +2024,12 @@ declare class Audio {
|
|
|
1648
2024
|
pitchShift(semitones: number): Float32Array;
|
|
1649
2025
|
pitchCorrectToMidi(currentMidi?: number, targetMidi?: number): Float32Array;
|
|
1650
2026
|
noteStretch(options?: NoteStretchOptions): Float32Array;
|
|
2027
|
+
noteMove(options?: NoteMoveOptions): Float32Array;
|
|
1651
2028
|
voiceChange(options?: VoiceChangeOptions): Float32Array;
|
|
1652
2029
|
normalize(targetDb?: number): Float32Array;
|
|
1653
2030
|
mastering(options?: MasteringOptions): MasteringResult;
|
|
1654
|
-
masteringChain(config
|
|
1655
|
-
masterAudio(presetName?: MasteringPreset, overrides?:
|
|
2031
|
+
masteringChain(config?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainResult;
|
|
2032
|
+
masterAudio(presetName?: MasteringPreset, overrides?: MasteringChainConfig | null, onProgress?: ProgressCallback): MasteringChainResult;
|
|
1656
2033
|
masteringProcess(processorName: SoloProcessor, params?: MasteringProcessorParams): MasteringResult;
|
|
1657
2034
|
trim(thresholdDb?: number): Float32Array;
|
|
1658
2035
|
stft(nFft?: number, hopLength?: number): StftResult;
|
|
@@ -1937,8 +2314,13 @@ interface ProjectLoopRecordingResult {
|
|
|
1937
2314
|
/** Clip loop mode for {@link Project.setClipLoop}. */
|
|
1938
2315
|
type ProjectLoopMode = 'off' | 'loop' | 0 | 1;
|
|
1939
2316
|
type ProjectWarpMode = 'off' | 'repitch' | 'tempo-sync' | 0 | 1 | 2;
|
|
1940
|
-
/**
|
|
1941
|
-
|
|
2317
|
+
/**
|
|
2318
|
+
* Automation breakpoint interpolation for {@link ProjectAutomationPoint}.
|
|
2319
|
+
*
|
|
2320
|
+
* `'s-curve'` is the canonical spelling, matching the Node engine and the mixer
|
|
2321
|
+
* automation types. The legacy `'scurve'` remains accepted for compatibility.
|
|
2322
|
+
*/
|
|
2323
|
+
type ProjectAutomationCurve = 'linear' | 'exponential' | 'hold' | 's-curve' | 'scurve' | 0 | 1 | 2 | 3;
|
|
1942
2324
|
/** One automation breakpoint accepted by the automation-lane edit ops. */
|
|
1943
2325
|
interface ProjectAutomationPoint {
|
|
1944
2326
|
/** Breakpoint position in PPQ. */
|
|
@@ -1975,6 +2357,14 @@ interface ProjectTimeSignatureSegment {
|
|
|
1975
2357
|
/** Beat unit (time-signature denominator, e.g. 4 or 8). */
|
|
1976
2358
|
denominator: number;
|
|
1977
2359
|
}
|
|
2360
|
+
/** A ranked primary/half/double tempo hypothesis returned by {@link Project.analyzeTempo}. */
|
|
2361
|
+
interface ProjectTempoCandidate {
|
|
2362
|
+
bpm: number;
|
|
2363
|
+
confidence: number;
|
|
2364
|
+
label: 'primary' | 'half' | 'double';
|
|
2365
|
+
timeSignatureCount: number;
|
|
2366
|
+
timeSignature: ProjectTimeSignatureSegment;
|
|
2367
|
+
}
|
|
1978
2368
|
/** Key segment for {@link Project.annotateKeys}. */
|
|
1979
2369
|
interface ProjectKeySegment {
|
|
1980
2370
|
startPpq: number;
|
|
@@ -2293,10 +2683,12 @@ declare class Project {
|
|
|
2293
2683
|
* or not a MIDI clip.
|
|
2294
2684
|
*/
|
|
2295
2685
|
validateMidiNotes(clipId: number): ProjectNotePairValidation;
|
|
2296
|
-
/**
|
|
2297
|
-
|
|
2298
|
-
/**
|
|
2299
|
-
|
|
2686
|
+
/** Return ranked tempo-octave and detected-meter candidates without editing. */
|
|
2687
|
+
analyzeTempo(audio: Float32Array, sampleRate: number): ProjectTempoCandidate[];
|
|
2688
|
+
/** Detect and install a ranked tempo candidate; optionally apply detected meter. */
|
|
2689
|
+
autoTempo(audio: Float32Array, sampleRate: number, candidateIndex?: number, applyTimeSignatures?: boolean): number;
|
|
2690
|
+
/** Snap to a bar (`division=0`), beat (`1`), or beat subdivision (`2+`). */
|
|
2691
|
+
snapToGrid(ppq: number, strength?: number, division?: number): number;
|
|
2300
2692
|
/** Compile the project into a renderable timeline, surfacing diagnostics. */
|
|
2301
2693
|
compile(): ProjectCompileResult;
|
|
2302
2694
|
/**
|
|
@@ -2498,6 +2890,7 @@ declare function synthPresetNames(): string[];
|
|
|
2498
2890
|
declare function synthPresetPatch(name: string): SynthPatch;
|
|
2499
2891
|
declare function synthEnumTables(): SynthEnumTables;
|
|
2500
2892
|
|
|
2893
|
+
type ExternalMidiEvent = WasmExternalMidiEvent;
|
|
2501
2894
|
type EngineClip = WasmEngineClip;
|
|
2502
2895
|
type ClipPageRequest = WasmClipPageRequest;
|
|
2503
2896
|
type EngineParameterInfo = WasmEngineParameterInfo;
|
|
@@ -2749,6 +3142,11 @@ declare class RealtimeEngine {
|
|
|
2749
3142
|
graphNodeCount(): number;
|
|
2750
3143
|
graphConnectionCount(): number;
|
|
2751
3144
|
setClips(clips: EngineClip[]): void;
|
|
3145
|
+
/**
|
|
3146
|
+
* Returns the PCM generated for a tempo-sync clip by the control-thread
|
|
3147
|
+
* setter, or `null` when the clip did not require a tempo-sync bake.
|
|
3148
|
+
*/
|
|
3149
|
+
prebakedClipChannels(clipId: number): Float32Array[] | null;
|
|
2752
3150
|
clipCount(): number;
|
|
2753
3151
|
setTrackLanes(lanes: Array<number | EngineTrackLane>): void;
|
|
2754
3152
|
/**
|
|
@@ -3034,68 +3432,336 @@ declare class SonareError extends Error {
|
|
|
3034
3432
|
/** Type guard: whether a caught value is a libsonare {@link SonareError}. */
|
|
3035
3433
|
declare function isSonareError(value: unknown): value is SonareError;
|
|
3036
3434
|
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3435
|
+
interface DbConversionRequest {
|
|
3436
|
+
values: Float32Array;
|
|
3437
|
+
ref?: number;
|
|
3438
|
+
amin?: number;
|
|
3439
|
+
topDb?: number;
|
|
3440
|
+
}
|
|
3441
|
+
interface SilenceRequest {
|
|
3442
|
+
samples: Float32Array;
|
|
3443
|
+
topDb?: number;
|
|
3444
|
+
frameLength?: number;
|
|
3445
|
+
hopLength?: number;
|
|
3446
|
+
}
|
|
3447
|
+
interface FrameSignalRequest {
|
|
3448
|
+
samples: Float32Array;
|
|
3449
|
+
frameLength: number;
|
|
3450
|
+
hopLength: number;
|
|
3451
|
+
}
|
|
3452
|
+
/** Canonical request form for pre/de-emphasis filters. */
|
|
3453
|
+
interface EmphasisRequest {
|
|
3454
|
+
samples: Float32Array;
|
|
3455
|
+
coef?: number;
|
|
3456
|
+
zi?: number;
|
|
3457
|
+
}
|
|
3458
|
+
/** Canonical request form for centering or extending a vector. */
|
|
3459
|
+
interface PadCenterRequest {
|
|
3460
|
+
values: Float32Array;
|
|
3461
|
+
targetSize: number;
|
|
3462
|
+
padValue?: number;
|
|
3463
|
+
}
|
|
3464
|
+
/** Canonical request form for resizing a vector. */
|
|
3465
|
+
interface FixLengthRequest {
|
|
3466
|
+
values: Float32Array;
|
|
3467
|
+
targetSize: number;
|
|
3468
|
+
padValue?: number;
|
|
3469
|
+
}
|
|
3470
|
+
/** Canonical request form for bounding a frame-index vector. */
|
|
3471
|
+
interface FixFramesRequest {
|
|
3472
|
+
frames: Int32Array;
|
|
3473
|
+
xMin?: number;
|
|
3474
|
+
xMax?: number;
|
|
3475
|
+
pad?: boolean;
|
|
3476
|
+
}
|
|
3477
|
+
/** Canonical request form for peak selection. */
|
|
3478
|
+
interface PeakPickRequest {
|
|
3479
|
+
values: Float32Array;
|
|
3480
|
+
preMax: number;
|
|
3481
|
+
postMax: number;
|
|
3482
|
+
preAvg: number;
|
|
3483
|
+
postAvg: number;
|
|
3484
|
+
delta: number;
|
|
3485
|
+
wait: number;
|
|
3486
|
+
}
|
|
3487
|
+
/** Canonical request form for vector normalization. */
|
|
3488
|
+
interface VectorNormalizeRequest {
|
|
3489
|
+
values: Float32Array;
|
|
3490
|
+
normType?: number;
|
|
3491
|
+
threshold?: number;
|
|
3492
|
+
}
|
|
3493
|
+
/** Canonical request form for tonal centroid projection. */
|
|
3494
|
+
interface TonnetzRequest {
|
|
3495
|
+
chromagram: Float32Array;
|
|
3496
|
+
nChroma: number;
|
|
3497
|
+
nFrames: number;
|
|
3498
|
+
}
|
|
3499
|
+
interface PcenRequest {
|
|
3500
|
+
values: Float32Array;
|
|
3501
|
+
nBins: number;
|
|
3502
|
+
nFrames: number;
|
|
3503
|
+
options?: Record<string, number>;
|
|
3504
|
+
}
|
|
3505
|
+
interface TempogramRequest {
|
|
3506
|
+
onsetEnvelope: Float32Array;
|
|
3507
|
+
sampleRate?: number;
|
|
3508
|
+
hopLength?: number;
|
|
3509
|
+
winLength?: number;
|
|
3510
|
+
mode?: TempogramMode;
|
|
3511
|
+
}
|
|
3512
|
+
interface CyclicTempogramRequest {
|
|
3513
|
+
onsetEnvelope: Float32Array;
|
|
3514
|
+
sampleRate?: number;
|
|
3515
|
+
hopLength?: number;
|
|
3516
|
+
winLength?: number;
|
|
3517
|
+
bpmMin?: number;
|
|
3518
|
+
nBins?: number;
|
|
3519
|
+
}
|
|
3520
|
+
interface PlpRequest {
|
|
3521
|
+
onsetEnvelope: Float32Array;
|
|
3522
|
+
sampleRate?: number;
|
|
3523
|
+
hopLength?: number;
|
|
3524
|
+
tempoMin?: number;
|
|
3525
|
+
tempoMax?: number;
|
|
3526
|
+
winLength?: number;
|
|
3527
|
+
}
|
|
3040
3528
|
/**
|
|
3041
|
-
*
|
|
3529
|
+
* Convert frequency in Hz to Mel scale.
|
|
3042
3530
|
*
|
|
3043
|
-
* @param
|
|
3044
|
-
* @
|
|
3045
|
-
* @returns NNLS chroma result
|
|
3531
|
+
* @param hz - Frequency in Hz
|
|
3532
|
+
* @returns Mel frequency
|
|
3046
3533
|
*/
|
|
3047
|
-
declare function
|
|
3534
|
+
declare function hzToMel(hz: number): number;
|
|
3048
3535
|
/**
|
|
3049
|
-
*
|
|
3536
|
+
* Convert Mel scale to frequency in Hz.
|
|
3050
3537
|
*
|
|
3051
|
-
* @param
|
|
3052
|
-
* @
|
|
3053
|
-
* @param hopLength - Hop length (default: 512)
|
|
3054
|
-
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3055
|
-
* @param nBins - Number of frequency bins (default: 84)
|
|
3056
|
-
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3057
|
-
* @returns CQT magnitude result
|
|
3538
|
+
* @param mel - Mel frequency
|
|
3539
|
+
* @returns Frequency in Hz
|
|
3058
3540
|
*/
|
|
3059
|
-
declare function
|
|
3541
|
+
declare function melToHz(mel: number): number;
|
|
3060
3542
|
/**
|
|
3061
|
-
*
|
|
3543
|
+
* Convert frequency in Hz to MIDI note number.
|
|
3062
3544
|
*
|
|
3063
|
-
* @param
|
|
3064
|
-
* @
|
|
3065
|
-
* @param hopLength - Hop length (default: 512)
|
|
3066
|
-
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3067
|
-
* @param nBins - Number of frequency bins (default: 84)
|
|
3068
|
-
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3069
|
-
* @returns CQT magnitude result
|
|
3545
|
+
* @param hz - Frequency in Hz
|
|
3546
|
+
* @returns MIDI note number (A4 = 440 Hz = 69)
|
|
3070
3547
|
*/
|
|
3071
|
-
declare function
|
|
3548
|
+
declare function hzToMidi(hz: number): number;
|
|
3072
3549
|
/**
|
|
3073
|
-
*
|
|
3550
|
+
* Convert MIDI note number to frequency in Hz.
|
|
3074
3551
|
*
|
|
3075
|
-
* @param
|
|
3076
|
-
* @
|
|
3077
|
-
* @param hopLength - Hop length (default: 512)
|
|
3078
|
-
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3079
|
-
* @param nBins - Number of frequency bins (default: 84)
|
|
3080
|
-
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3081
|
-
* @returns CQT magnitude result
|
|
3552
|
+
* @param midi - MIDI note number
|
|
3553
|
+
* @returns Frequency in Hz
|
|
3082
3554
|
*/
|
|
3083
|
-
declare function
|
|
3555
|
+
declare function midiToHz(midi: number): number;
|
|
3084
3556
|
/**
|
|
3085
|
-
*
|
|
3557
|
+
* Convert frequency in Hz to note name.
|
|
3086
3558
|
*
|
|
3087
|
-
* @param
|
|
3088
|
-
* @
|
|
3089
|
-
* @param hopLength - Hop length (default: 512)
|
|
3090
|
-
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3091
|
-
* @param nBins - Number of frequency bins (default: 84)
|
|
3092
|
-
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3093
|
-
* @param gamma - Bandwidth offset; 0 is equivalent to CQT (default: 0)
|
|
3094
|
-
* @returns VQT magnitude result (same shape as CQT)
|
|
3559
|
+
* @param hz - Frequency in Hz
|
|
3560
|
+
* @returns Note name (e.g., "A4", "C#5")
|
|
3095
3561
|
*/
|
|
3096
|
-
declare function
|
|
3562
|
+
declare function hzToNote(hz: number): string;
|
|
3097
3563
|
/**
|
|
3098
|
-
*
|
|
3564
|
+
* Convert note name to frequency in Hz.
|
|
3565
|
+
*
|
|
3566
|
+
* @param note - Note name (e.g., "A4", "C#5")
|
|
3567
|
+
* @returns Frequency in Hz
|
|
3568
|
+
*/
|
|
3569
|
+
declare function noteToHz(note: string): number;
|
|
3570
|
+
/**
|
|
3571
|
+
* Convert frame index to time in seconds.
|
|
3572
|
+
*
|
|
3573
|
+
* @param frames - Frame index
|
|
3574
|
+
* @param sr - Sample rate in Hz (default: 22050)
|
|
3575
|
+
* @param hopLength - Hop length in samples (default: 512)
|
|
3576
|
+
* @returns Time in seconds
|
|
3577
|
+
*/
|
|
3578
|
+
declare function framesToTime(frames: number, sr?: number, hopLength?: number): number;
|
|
3579
|
+
/**
|
|
3580
|
+
* Convert time in seconds to frame index.
|
|
3581
|
+
*
|
|
3582
|
+
* @param time - Time in seconds
|
|
3583
|
+
* @param sr - Sample rate in Hz (default: 22050)
|
|
3584
|
+
* @param hopLength - Hop length in samples (default: 512)
|
|
3585
|
+
* @returns Frame index
|
|
3586
|
+
*/
|
|
3587
|
+
declare function timeToFrames(time: number, sr?: number, hopLength?: number): number;
|
|
3588
|
+
declare function framesToSamples(frames: number, hopLength?: number, nFft?: number): number;
|
|
3589
|
+
declare function samplesToFrames(samples: number, hopLength?: number, nFft?: number): number;
|
|
3590
|
+
declare function powerToDb(request: DbConversionRequest): Float32Array;
|
|
3591
|
+
declare function powerToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3592
|
+
declare function amplitudeToDb(request: DbConversionRequest): Float32Array;
|
|
3593
|
+
declare function amplitudeToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3594
|
+
declare function dbToPower(values: Float32Array, ref?: number): Float32Array;
|
|
3595
|
+
declare function dbToAmplitude(values: Float32Array, ref?: number): Float32Array;
|
|
3596
|
+
declare function preemphasis(request: EmphasisRequest): Float32Array;
|
|
3597
|
+
declare function preemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3598
|
+
declare function deemphasis(request: EmphasisRequest): Float32Array;
|
|
3599
|
+
declare function deemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3600
|
+
declare function trimSilence(request: SilenceRequest): WasmTrimResult;
|
|
3601
|
+
declare function trimSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): WasmTrimResult;
|
|
3602
|
+
declare function splitSilence(request: SilenceRequest): Int32Array;
|
|
3603
|
+
declare function splitSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): Int32Array;
|
|
3604
|
+
declare function frameSignal(request: FrameSignalRequest): WasmFrameResult;
|
|
3605
|
+
declare function frameSignal(samples: Float32Array, frameLength: number, hopLength: number): WasmFrameResult;
|
|
3606
|
+
declare function padCenter(request: PadCenterRequest): Float32Array;
|
|
3607
|
+
declare function padCenter(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3608
|
+
declare function fixLength(request: FixLengthRequest): Float32Array;
|
|
3609
|
+
declare function fixLength(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3610
|
+
declare function fixFrames(request: FixFramesRequest): Int32Array;
|
|
3611
|
+
declare function fixFrames(frames: Int32Array, xMin?: number, xMax?: number, pad?: boolean): Int32Array;
|
|
3612
|
+
declare function peakPick(request: PeakPickRequest): Int32Array;
|
|
3613
|
+
declare function peakPick(values: Float32Array, preMax: number, postMax: number, preAvg: number, postAvg: number, delta: number, wait: number): Int32Array;
|
|
3614
|
+
declare function vectorNormalize(request: VectorNormalizeRequest): Float32Array;
|
|
3615
|
+
declare function vectorNormalize(values: Float32Array, normType?: number, threshold?: number): Float32Array;
|
|
3616
|
+
declare function pcen(request: PcenRequest): Float32Array;
|
|
3617
|
+
declare function pcen(values: Float32Array, nBins: number, nFrames: number, options?: Record<string, number>): Float32Array;
|
|
3618
|
+
declare function tonnetz(request: TonnetzRequest): Float32Array;
|
|
3619
|
+
declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
|
|
3620
|
+
declare function tempogram(request: TempogramRequest): WasmTempogramResult;
|
|
3621
|
+
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
|
|
3622
|
+
declare function cyclicTempogram(request: CyclicTempogramRequest): WasmCyclicTempogramResult;
|
|
3623
|
+
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
|
|
3624
|
+
declare function plp(request: PlpRequest): Float32Array;
|
|
3625
|
+
declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, tempoMin?: number, tempoMax?: number, winLength?: number): Float32Array;
|
|
3626
|
+
|
|
3627
|
+
type GuardedOptions$2 = ValidateOptions;
|
|
3628
|
+
type AnalyzeSectionsGuardedOptions = AnalyzeSectionsOptions & ValidateOptions;
|
|
3629
|
+
type MelodyGuardedOptions = MelodyOptions & ValidateOptions;
|
|
3630
|
+
/** Canonical request form shared by the Constant-Q transform variants. */
|
|
3631
|
+
interface CqtRequest extends GuardedOptions$2 {
|
|
3632
|
+
samples: Float32Array;
|
|
3633
|
+
sampleRate?: number;
|
|
3634
|
+
hopLength?: number;
|
|
3635
|
+
fmin?: number;
|
|
3636
|
+
nBins?: number;
|
|
3637
|
+
binsPerOctave?: number;
|
|
3638
|
+
}
|
|
3639
|
+
/** Canonical request form for {@link vqt}. */
|
|
3640
|
+
interface VqtRequest extends CqtRequest {
|
|
3641
|
+
gamma?: number;
|
|
3642
|
+
}
|
|
3643
|
+
interface OnsetEnvelopeRequest extends GuardedOptions$2 {
|
|
3644
|
+
samples: Float32Array;
|
|
3645
|
+
sampleRate?: number;
|
|
3646
|
+
nFft?: number;
|
|
3647
|
+
hopLength?: number;
|
|
3648
|
+
nMels?: number;
|
|
3649
|
+
}
|
|
3650
|
+
interface OnsetStrengthMultiRequest extends OnsetEnvelopeRequest {
|
|
3651
|
+
nBands?: number;
|
|
3652
|
+
}
|
|
3653
|
+
interface FourierTempogramRequest extends GuardedOptions$2 {
|
|
3654
|
+
onsetEnvelope: Float32Array;
|
|
3655
|
+
sampleRate?: number;
|
|
3656
|
+
hopLength?: number;
|
|
3657
|
+
winLength?: number;
|
|
3658
|
+
}
|
|
3659
|
+
interface TempogramRatioRequest extends GuardedOptions$2 {
|
|
3660
|
+
tempogramData: Float32Array;
|
|
3661
|
+
winLength?: number;
|
|
3662
|
+
sampleRate?: number;
|
|
3663
|
+
hopLength?: number;
|
|
3664
|
+
factors?: Float32Array | number[];
|
|
3665
|
+
}
|
|
3666
|
+
interface CqtToAudioRequest extends GuardedOptions$2 {
|
|
3667
|
+
magnitude: Float32Array;
|
|
3668
|
+
nBins: number;
|
|
3669
|
+
nFrames: number;
|
|
3670
|
+
sampleRate?: number;
|
|
3671
|
+
hopLength?: number;
|
|
3672
|
+
fmin?: number;
|
|
3673
|
+
binsPerOctave?: number;
|
|
3674
|
+
nIter?: number;
|
|
3675
|
+
}
|
|
3676
|
+
interface VqtToAudioRequest extends CqtToAudioRequest {
|
|
3677
|
+
gamma?: number;
|
|
3678
|
+
}
|
|
3679
|
+
interface AnalyzeSectionsRequest extends AnalyzeSectionsGuardedOptions {
|
|
3680
|
+
samples: Float32Array;
|
|
3681
|
+
sampleRate?: number;
|
|
3682
|
+
}
|
|
3683
|
+
interface AnalyzeMelodyRequest extends MelodyGuardedOptions {
|
|
3684
|
+
samples: Float32Array;
|
|
3685
|
+
sampleRate?: number;
|
|
3686
|
+
}
|
|
3687
|
+
interface LufsRequest extends ValidateOptions {
|
|
3688
|
+
samples: Float32Array;
|
|
3689
|
+
sampleRate?: number;
|
|
3690
|
+
}
|
|
3691
|
+
interface NnlsChromaRequest extends GuardedOptions$2 {
|
|
3692
|
+
samples: Float32Array;
|
|
3693
|
+
sampleRate?: number;
|
|
3694
|
+
}
|
|
3695
|
+
/**
|
|
3696
|
+
* Compute NNLS (non-negative least squares) chromagram.
|
|
3697
|
+
*
|
|
3698
|
+
* @param samples - Audio samples (mono, float32)
|
|
3699
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3700
|
+
* @returns NNLS chroma result
|
|
3701
|
+
*/
|
|
3702
|
+
declare function nnlsChroma(request: NnlsChromaRequest): WasmNnlsChromaResult;
|
|
3703
|
+
declare function nnlsChroma(samples: Float32Array, sampleRate?: number, options?: GuardedOptions$2): WasmNnlsChromaResult;
|
|
3704
|
+
/**
|
|
3705
|
+
* Compute the Constant-Q Transform magnitude.
|
|
3706
|
+
*
|
|
3707
|
+
* @param samples - Audio samples (mono, float32)
|
|
3708
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3709
|
+
* @param hopLength - Hop length (default: 512)
|
|
3710
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3711
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3712
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3713
|
+
* @returns CQT magnitude result
|
|
3714
|
+
*/
|
|
3715
|
+
declare function cqt(request: CqtRequest): CqtResult;
|
|
3716
|
+
declare function cqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, options?: GuardedOptions$2): CqtResult;
|
|
3717
|
+
/**
|
|
3718
|
+
* Compute the pseudo Constant-Q Transform magnitude.
|
|
3719
|
+
*
|
|
3720
|
+
* @param samples - Audio samples (mono, float32)
|
|
3721
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3722
|
+
* @param hopLength - Hop length (default: 512)
|
|
3723
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3724
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3725
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3726
|
+
* @returns CQT magnitude result
|
|
3727
|
+
*/
|
|
3728
|
+
declare function pseudoCqt(request: CqtRequest): CqtResult;
|
|
3729
|
+
declare function pseudoCqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, options?: GuardedOptions$2): CqtResult;
|
|
3730
|
+
/**
|
|
3731
|
+
* Compute the hybrid Constant-Q Transform magnitude.
|
|
3732
|
+
*
|
|
3733
|
+
* @param samples - Audio samples (mono, float32)
|
|
3734
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3735
|
+
* @param hopLength - Hop length (default: 512)
|
|
3736
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3737
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3738
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3739
|
+
* @returns CQT magnitude result
|
|
3740
|
+
*/
|
|
3741
|
+
declare function hybridCqt(request: CqtRequest): CqtResult;
|
|
3742
|
+
declare function hybridCqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, options?: GuardedOptions$2): CqtResult;
|
|
3743
|
+
/**
|
|
3744
|
+
* Compute the Variable-Q Transform magnitude (gamma controls Q).
|
|
3745
|
+
*
|
|
3746
|
+
* @param samples - Audio samples (mono, float32)
|
|
3747
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3748
|
+
* @param hopLength - Hop length (default: 512)
|
|
3749
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3750
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3751
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3752
|
+
* @param gamma - Bandwidth offset; 0 is equivalent to CQT (default: 0)
|
|
3753
|
+
* @returns VQT magnitude result (same shape as CQT)
|
|
3754
|
+
*/
|
|
3755
|
+
declare function vqt(request: VqtRequest): CqtResult;
|
|
3756
|
+
declare function vqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, gamma?: number, options?: GuardedOptions$2): CqtResult;
|
|
3757
|
+
/** Reconstruct mono audio from row-major CQT magnitude via Griffin-Lim. */
|
|
3758
|
+
declare function cqtToAudio(request: CqtToAudioRequest): Float32Array;
|
|
3759
|
+
declare function cqtToAudio(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, hopLength?: number, fmin?: number, binsPerOctave?: number, nIter?: number, options?: GuardedOptions$2): Float32Array;
|
|
3760
|
+
/** Reconstruct mono audio from row-major VQT magnitude via Griffin-Lim. */
|
|
3761
|
+
declare function vqtToAudio(request: VqtToAudioRequest): Float32Array;
|
|
3762
|
+
declare function vqtToAudio(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, hopLength?: number, fmin?: number, binsPerOctave?: number, gamma?: number, nIter?: number, options?: GuardedOptions$2): Float32Array;
|
|
3763
|
+
/**
|
|
3764
|
+
* Detect song-structure sections (intro/verse/chorus/...).
|
|
3099
3765
|
*
|
|
3100
3766
|
* @param samples - Audio samples (mono, float32)
|
|
3101
3767
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
@@ -3104,6 +3770,7 @@ declare function vqt(samples: Float32Array, sampleRate?: number, hopLength?: num
|
|
|
3104
3770
|
* @param minSectionSec - Minimum section duration in seconds (default: 4.0)
|
|
3105
3771
|
* @returns Array of detected sections
|
|
3106
3772
|
*/
|
|
3773
|
+
declare function analyzeSections(request: AnalyzeSectionsRequest): Section[];
|
|
3107
3774
|
declare function analyzeSections(samples: Float32Array, sampleRate?: number, options?: AnalyzeSectionsGuardedOptions): Section[];
|
|
3108
3775
|
/** Options for {@link analyzeMelody}. All fields are optional. */
|
|
3109
3776
|
interface MelodyOptions {
|
|
@@ -3137,6 +3804,7 @@ interface MelodyOptions {
|
|
|
3137
3804
|
* @param options - Tracker + tuning options ({@link MelodyOptions})
|
|
3138
3805
|
* @returns Melody contour with per-frame pitch points and summary stats
|
|
3139
3806
|
*/
|
|
3807
|
+
declare function analyzeMelody(request: AnalyzeMelodyRequest): MelodyResult;
|
|
3140
3808
|
declare function analyzeMelody(samples: Float32Array, sampleRate?: number, options?: MelodyGuardedOptions): MelodyResult;
|
|
3141
3809
|
/**
|
|
3142
3810
|
* Compute the onset strength envelope.
|
|
@@ -3148,6 +3816,7 @@ declare function analyzeMelody(samples: Float32Array, sampleRate?: number, optio
|
|
|
3148
3816
|
* @param nMels - Number of Mel bands (default: 128)
|
|
3149
3817
|
* @returns Onset envelope for each frame
|
|
3150
3818
|
*/
|
|
3819
|
+
declare function onsetEnvelope(request: OnsetEnvelopeRequest): Float32Array;
|
|
3151
3820
|
declare function onsetEnvelope(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, options?: GuardedOptions$2): Float32Array;
|
|
3152
3821
|
/**
|
|
3153
3822
|
* Compute multi-band onset strength envelopes.
|
|
@@ -3160,6 +3829,7 @@ declare function onsetEnvelope(samples: Float32Array, sampleRate?: number, nFft?
|
|
|
3160
3829
|
* @param nBands - Number of onset bands (default: 3)
|
|
3161
3830
|
* @returns Multi-band onset matrix
|
|
3162
3831
|
*/
|
|
3832
|
+
declare function onsetStrengthMulti(request: OnsetStrengthMultiRequest): OnsetStrengthMultiResult;
|
|
3163
3833
|
declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, nBands?: number, options?: GuardedOptions$2): OnsetStrengthMultiResult;
|
|
3164
3834
|
/**
|
|
3165
3835
|
* Compute the Fourier tempogram from an onset envelope.
|
|
@@ -3170,6 +3840,7 @@ declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number,
|
|
|
3170
3840
|
* @param winLength - Window length in frames (default: 384)
|
|
3171
3841
|
* @returns Fourier tempogram result
|
|
3172
3842
|
*/
|
|
3843
|
+
declare function fourierTempogram(request: FourierTempogramRequest): WasmFourierTempogramResult;
|
|
3173
3844
|
declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, options?: GuardedOptions$2): WasmFourierTempogramResult;
|
|
3174
3845
|
/**
|
|
3175
3846
|
* Compute tempogram ratio features.
|
|
@@ -3182,6 +3853,7 @@ declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: numb
|
|
|
3182
3853
|
* default {0.5, 1, 2, 3, 4} is used.
|
|
3183
3854
|
* @returns Tempogram ratio features (one value per factor)
|
|
3184
3855
|
*/
|
|
3856
|
+
declare function tempogramRatio(request: TempogramRatioRequest): Float32Array;
|
|
3185
3857
|
declare function tempogramRatio(tempogramData: Float32Array, winLength?: number, sampleRate?: number, hopLength?: number, factors?: Float32Array | number[], options?: GuardedOptions$2): Float32Array;
|
|
3186
3858
|
/**
|
|
3187
3859
|
* Measure loudness (EBU R128 / ITU-R BS.1770).
|
|
@@ -3192,6 +3864,7 @@ declare function tempogramRatio(tempogramData: Float32Array, winLength?: number,
|
|
|
3192
3864
|
* dependent and a wrong rate yields wrong loudness.
|
|
3193
3865
|
* @returns Loudness measurement result
|
|
3194
3866
|
*/
|
|
3867
|
+
declare function lufs(request: LufsRequest): LufsResult;
|
|
3195
3868
|
declare function lufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): LufsResult;
|
|
3196
3869
|
/**
|
|
3197
3870
|
* Compute the momentary loudness (LUFS) over time.
|
|
@@ -3201,6 +3874,7 @@ declare function lufs(samples: Float32Array, sampleRate?: number, options?: Vali
|
|
|
3201
3874
|
* K-weighting is sample-rate dependent; pass the buffer's actual rate.
|
|
3202
3875
|
* @returns Momentary LUFS values over time
|
|
3203
3876
|
*/
|
|
3877
|
+
declare function momentaryLufs(request: LufsRequest): Float32Array;
|
|
3204
3878
|
declare function momentaryLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
3205
3879
|
/**
|
|
3206
3880
|
* Compute the short-term loudness (LUFS) over time.
|
|
@@ -3210,90 +3884,9 @@ declare function momentaryLufs(samples: Float32Array, sampleRate?: number, optio
|
|
|
3210
3884
|
* K-weighting is sample-rate dependent; pass the buffer's actual rate.
|
|
3211
3885
|
* @returns Short-term LUFS values over time
|
|
3212
3886
|
*/
|
|
3887
|
+
declare function shortTermLufs(request: LufsRequest): Float32Array;
|
|
3213
3888
|
declare function shortTermLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
3214
3889
|
|
|
3215
|
-
/**
|
|
3216
|
-
* Convert frequency in Hz to Mel scale.
|
|
3217
|
-
*
|
|
3218
|
-
* @param hz - Frequency in Hz
|
|
3219
|
-
* @returns Mel frequency
|
|
3220
|
-
*/
|
|
3221
|
-
declare function hzToMel(hz: number): number;
|
|
3222
|
-
/**
|
|
3223
|
-
* Convert Mel scale to frequency in Hz.
|
|
3224
|
-
*
|
|
3225
|
-
* @param mel - Mel frequency
|
|
3226
|
-
* @returns Frequency in Hz
|
|
3227
|
-
*/
|
|
3228
|
-
declare function melToHz(mel: number): number;
|
|
3229
|
-
/**
|
|
3230
|
-
* Convert frequency in Hz to MIDI note number.
|
|
3231
|
-
*
|
|
3232
|
-
* @param hz - Frequency in Hz
|
|
3233
|
-
* @returns MIDI note number (A4 = 440 Hz = 69)
|
|
3234
|
-
*/
|
|
3235
|
-
declare function hzToMidi(hz: number): number;
|
|
3236
|
-
/**
|
|
3237
|
-
* Convert MIDI note number to frequency in Hz.
|
|
3238
|
-
*
|
|
3239
|
-
* @param midi - MIDI note number
|
|
3240
|
-
* @returns Frequency in Hz
|
|
3241
|
-
*/
|
|
3242
|
-
declare function midiToHz(midi: number): number;
|
|
3243
|
-
/**
|
|
3244
|
-
* Convert frequency in Hz to note name.
|
|
3245
|
-
*
|
|
3246
|
-
* @param hz - Frequency in Hz
|
|
3247
|
-
* @returns Note name (e.g., "A4", "C#5")
|
|
3248
|
-
*/
|
|
3249
|
-
declare function hzToNote(hz: number): string;
|
|
3250
|
-
/**
|
|
3251
|
-
* Convert note name to frequency in Hz.
|
|
3252
|
-
*
|
|
3253
|
-
* @param note - Note name (e.g., "A4", "C#5")
|
|
3254
|
-
* @returns Frequency in Hz
|
|
3255
|
-
*/
|
|
3256
|
-
declare function noteToHz(note: string): number;
|
|
3257
|
-
/**
|
|
3258
|
-
* Convert frame index to time in seconds.
|
|
3259
|
-
*
|
|
3260
|
-
* @param frames - Frame index
|
|
3261
|
-
* @param sr - Sample rate in Hz (default: 22050)
|
|
3262
|
-
* @param hopLength - Hop length in samples (default: 512)
|
|
3263
|
-
* @returns Time in seconds
|
|
3264
|
-
*/
|
|
3265
|
-
declare function framesToTime(frames: number, sr?: number, hopLength?: number): number;
|
|
3266
|
-
/**
|
|
3267
|
-
* Convert time in seconds to frame index.
|
|
3268
|
-
*
|
|
3269
|
-
* @param time - Time in seconds
|
|
3270
|
-
* @param sr - Sample rate in Hz (default: 22050)
|
|
3271
|
-
* @param hopLength - Hop length in samples (default: 512)
|
|
3272
|
-
* @returns Frame index
|
|
3273
|
-
*/
|
|
3274
|
-
declare function timeToFrames(time: number, sr?: number, hopLength?: number): number;
|
|
3275
|
-
declare function framesToSamples(frames: number, hopLength?: number, nFft?: number): number;
|
|
3276
|
-
declare function samplesToFrames(samples: number, hopLength?: number, nFft?: number): number;
|
|
3277
|
-
declare function powerToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3278
|
-
declare function amplitudeToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3279
|
-
declare function dbToPower(values: Float32Array, ref?: number): Float32Array;
|
|
3280
|
-
declare function dbToAmplitude(values: Float32Array, ref?: number): Float32Array;
|
|
3281
|
-
declare function preemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3282
|
-
declare function deemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3283
|
-
declare function trimSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): WasmTrimResult;
|
|
3284
|
-
declare function splitSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): Int32Array;
|
|
3285
|
-
declare function frameSignal(samples: Float32Array, frameLength: number, hopLength: number): WasmFrameResult;
|
|
3286
|
-
declare function padCenter(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3287
|
-
declare function fixLength(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3288
|
-
declare function fixFrames(frames: Int32Array, xMin?: number, xMax?: number, pad?: boolean): Int32Array;
|
|
3289
|
-
declare function peakPick(values: Float32Array, preMax: number, postMax: number, preAvg: number, postAvg: number, delta: number, wait: number): Int32Array;
|
|
3290
|
-
declare function vectorNormalize(values: Float32Array, normType?: number, threshold?: number): Float32Array;
|
|
3291
|
-
declare function pcen(values: Float32Array, nBins: number, nFrames: number, options?: Record<string, number>): Float32Array;
|
|
3292
|
-
declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
|
|
3293
|
-
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
|
|
3294
|
-
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
|
|
3295
|
-
declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, tempoMin?: number, tempoMax?: number, winLength?: number): Float32Array;
|
|
3296
|
-
|
|
3297
3890
|
/**
|
|
3298
3891
|
* Detect pitch using YIN algorithm.
|
|
3299
3892
|
*
|
|
@@ -3307,6 +3900,17 @@ declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength
|
|
|
3307
3900
|
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
3308
3901
|
* @returns Pitch detection result
|
|
3309
3902
|
*/
|
|
3903
|
+
interface PitchYinRequest {
|
|
3904
|
+
samples: Float32Array;
|
|
3905
|
+
sampleRate?: number;
|
|
3906
|
+
frameLength?: number;
|
|
3907
|
+
hopLength?: number;
|
|
3908
|
+
fmin?: number;
|
|
3909
|
+
fmax?: number;
|
|
3910
|
+
threshold?: number;
|
|
3911
|
+
fillNa?: boolean;
|
|
3912
|
+
}
|
|
3913
|
+
declare function pitchYin(request: PitchYinRequest): PitchResult;
|
|
3310
3914
|
declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3311
3915
|
/**
|
|
3312
3916
|
* Detect pitch using pYIN algorithm (probabilistic YIN with HMM smoothing).
|
|
@@ -3321,6 +3925,9 @@ declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLengt
|
|
|
3321
3925
|
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
3322
3926
|
* @returns Pitch detection result
|
|
3323
3927
|
*/
|
|
3928
|
+
interface PitchPyinRequest extends PitchYinRequest {
|
|
3929
|
+
}
|
|
3930
|
+
declare function pitchPyin(request: PitchPyinRequest): PitchResult;
|
|
3324
3931
|
declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3325
3932
|
|
|
3326
3933
|
/**
|
|
@@ -3331,8 +3938,97 @@ declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLeng
|
|
|
3331
3938
|
* @param targetSr - Target sample rate in Hz
|
|
3332
3939
|
* @returns Resampled audio
|
|
3333
3940
|
*/
|
|
3941
|
+
interface ResampleRequest {
|
|
3942
|
+
samples: Float32Array;
|
|
3943
|
+
srcSr: number;
|
|
3944
|
+
targetSr: number;
|
|
3945
|
+
}
|
|
3946
|
+
declare function resample(request: ResampleRequest): Float32Array;
|
|
3334
3947
|
declare function resample(samples: Float32Array, srcSr: number, targetSr: number): Float32Array;
|
|
3335
3948
|
|
|
3949
|
+
/** Canonical request form for frame-based spectral feature extraction. */
|
|
3950
|
+
interface SpectralFrameRequest {
|
|
3951
|
+
samples: Float32Array;
|
|
3952
|
+
sampleRate?: number;
|
|
3953
|
+
nFft?: number;
|
|
3954
|
+
hopLength?: number;
|
|
3955
|
+
}
|
|
3956
|
+
interface SpectralRolloffRequest extends SpectralFrameRequest {
|
|
3957
|
+
rollPercent?: number;
|
|
3958
|
+
}
|
|
3959
|
+
interface ZeroCrossingRateRequest {
|
|
3960
|
+
samples: Float32Array;
|
|
3961
|
+
sampleRate?: number;
|
|
3962
|
+
frameLength?: number;
|
|
3963
|
+
hopLength?: number;
|
|
3964
|
+
}
|
|
3965
|
+
interface DecomposeRequest {
|
|
3966
|
+
s: Float32Array;
|
|
3967
|
+
nFeatures: number;
|
|
3968
|
+
nFrames: number;
|
|
3969
|
+
nComponents: number;
|
|
3970
|
+
nIter?: number;
|
|
3971
|
+
beta?: number;
|
|
3972
|
+
}
|
|
3973
|
+
interface DecomposeWithInitRequest extends DecomposeRequest {
|
|
3974
|
+
init?: 'random' | 'nndsvd';
|
|
3975
|
+
}
|
|
3976
|
+
interface SpectralContrastRequest extends SpectralFrameRequest {
|
|
3977
|
+
nBands?: number;
|
|
3978
|
+
fmin?: number;
|
|
3979
|
+
quantile?: number;
|
|
3980
|
+
}
|
|
3981
|
+
interface PolyFeaturesRequest extends SpectralFrameRequest {
|
|
3982
|
+
order?: number;
|
|
3983
|
+
}
|
|
3984
|
+
interface ZeroCrossingsRequest {
|
|
3985
|
+
samples: Float32Array;
|
|
3986
|
+
threshold?: number;
|
|
3987
|
+
refMagnitude?: boolean;
|
|
3988
|
+
pad?: boolean;
|
|
3989
|
+
zeroPos?: boolean;
|
|
3990
|
+
}
|
|
3991
|
+
interface PitchTuningRequest {
|
|
3992
|
+
frequencies: Float32Array;
|
|
3993
|
+
resolution?: number;
|
|
3994
|
+
binsPerOctave?: number;
|
|
3995
|
+
}
|
|
3996
|
+
interface EstimateTuningRequest extends SpectralFrameRequest {
|
|
3997
|
+
resolution?: number;
|
|
3998
|
+
binsPerOctave?: number;
|
|
3999
|
+
}
|
|
4000
|
+
interface NnFilterRequest {
|
|
4001
|
+
s: Float32Array;
|
|
4002
|
+
nFeatures: number;
|
|
4003
|
+
nFrames: number;
|
|
4004
|
+
aggregate?: string;
|
|
4005
|
+
k?: number;
|
|
4006
|
+
width?: number;
|
|
4007
|
+
}
|
|
4008
|
+
interface RemixRequest {
|
|
4009
|
+
samples: Float32Array;
|
|
4010
|
+
intervals: Int32Array | ArrayLike<number>;
|
|
4011
|
+
sampleRate?: number;
|
|
4012
|
+
alignZeros?: boolean;
|
|
4013
|
+
}
|
|
4014
|
+
interface PhaseVocoderRequest extends SpectralFrameRequest {
|
|
4015
|
+
rate: number;
|
|
4016
|
+
}
|
|
4017
|
+
interface HpssWithResidualRequest {
|
|
4018
|
+
samples: Float32Array;
|
|
4019
|
+
sampleRate?: number;
|
|
4020
|
+
kernelHarmonic?: number;
|
|
4021
|
+
kernelPercussive?: number;
|
|
4022
|
+
}
|
|
4023
|
+
interface LufsInterleavedRequest extends ValidateOptions {
|
|
4024
|
+
samples: Float32Array;
|
|
4025
|
+
channels: number;
|
|
4026
|
+
sampleRate?: number;
|
|
4027
|
+
}
|
|
4028
|
+
interface Ebur128LoudnessRangeRequest extends ValidateOptions {
|
|
4029
|
+
samples: Float32Array;
|
|
4030
|
+
sampleRate?: number;
|
|
4031
|
+
}
|
|
3336
4032
|
/**
|
|
3337
4033
|
* Compute spectral centroid (center of mass of spectrum).
|
|
3338
4034
|
*
|
|
@@ -3342,36 +4038,43 @@ declare function resample(samples: Float32Array, srcSr: number, targetSr: number
|
|
|
3342
4038
|
* @param hopLength - Hop length (default: 512)
|
|
3343
4039
|
* @returns Spectral centroid in Hz for each frame
|
|
3344
4040
|
*/
|
|
4041
|
+
declare function spectralCentroid(request: SpectralFrameRequest): Float32Array;
|
|
3345
4042
|
declare function spectralCentroid(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3346
4043
|
/**
|
|
3347
4044
|
* Compute spectral contrast (librosa.feature.spectral_contrast).
|
|
3348
4045
|
*
|
|
3349
4046
|
* @returns Matrix2d of shape (nBands + 1) x nFrames.
|
|
3350
4047
|
*/
|
|
4048
|
+
declare function spectralContrast(request: SpectralContrastRequest): WasmMatrix2dResult;
|
|
3351
4049
|
declare function spectralContrast(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nBands?: number, fmin?: number, quantile?: number): WasmMatrix2dResult;
|
|
3352
4050
|
/**
|
|
3353
4051
|
* Fit per-frame polynomial coefficients (librosa.feature.poly_features).
|
|
3354
4052
|
*
|
|
3355
4053
|
* @returns Matrix2d of shape (order + 1) x nFrames.
|
|
3356
4054
|
*/
|
|
4055
|
+
declare function polyFeatures(request: PolyFeaturesRequest): WasmMatrix2dResult;
|
|
3357
4056
|
declare function polyFeatures(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, order?: number): WasmMatrix2dResult;
|
|
3358
4057
|
/**
|
|
3359
4058
|
* Locate zero-crossing indices of a signal (librosa.zero_crossings).
|
|
3360
4059
|
*/
|
|
4060
|
+
declare function zeroCrossings(request: ZeroCrossingsRequest): Int32Array;
|
|
3361
4061
|
declare function zeroCrossings(samples: Float32Array, threshold?: number, refMagnitude?: boolean, pad?: boolean, zeroPos?: boolean): Int32Array;
|
|
3362
4062
|
/**
|
|
3363
4063
|
* Estimate the global tuning offset from a set of frequencies
|
|
3364
4064
|
* (librosa.pitch_tuning). Returns a deviation in fractions of a bin.
|
|
3365
4065
|
*/
|
|
4066
|
+
declare function pitchTuning(request: PitchTuningRequest): number;
|
|
3366
4067
|
declare function pitchTuning(frequencies: Float32Array, resolution?: number, binsPerOctave?: number): number;
|
|
3367
4068
|
/**
|
|
3368
4069
|
* Estimate the tuning offset of an audio signal (librosa.estimate_tuning).
|
|
3369
4070
|
*/
|
|
4071
|
+
declare function estimateTuning(request: EstimateTuningRequest): number;
|
|
3370
4072
|
declare function estimateTuning(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, resolution?: number, binsPerOctave?: number): number;
|
|
3371
4073
|
/**
|
|
3372
4074
|
* Non-negative matrix factorisation of a flattened [nFeatures x nFrames]
|
|
3373
4075
|
* spectrogram (librosa.decompose.decompose). Returns the W and H factors.
|
|
3374
4076
|
*/
|
|
4077
|
+
declare function decompose(request: DecomposeRequest): WasmDecomposeResult;
|
|
3375
4078
|
declare function decompose(s: Float32Array, nFeatures: number, nFrames: number, nComponents: number, nIter?: number, beta?: number): WasmDecomposeResult;
|
|
3376
4079
|
/**
|
|
3377
4080
|
* Non-negative matrix factorisation with a selectable initialiser
|
|
@@ -3380,25 +4083,30 @@ declare function decompose(s: Float32Array, nFeatures: number, nFrames: number,
|
|
|
3380
4083
|
* or `'nndsvd'` (SVD-based warm start, which tends to converge in fewer
|
|
3381
4084
|
* iterations). Returns the W and H factors.
|
|
3382
4085
|
*/
|
|
4086
|
+
declare function decomposeWithInit(request: DecomposeWithInitRequest): WasmDecomposeResult;
|
|
3383
4087
|
declare function decomposeWithInit(s: Float32Array, nFeatures: number, nFrames: number, nComponents: number, nIter?: number, beta?: number, init?: 'random' | 'nndsvd'): WasmDecomposeResult;
|
|
3384
4088
|
/**
|
|
3385
4089
|
* Nearest-neighbour filtering of a flattened [nFeatures x nFrames] spectrogram
|
|
3386
4090
|
* (librosa.decompose.nn_filter).
|
|
3387
4091
|
*/
|
|
4092
|
+
declare function nnFilter(request: NnFilterRequest): WasmMatrix2dResult;
|
|
3388
4093
|
declare function nnFilter(s: Float32Array, nFeatures: number, nFrames: number, aggregate?: string, k?: number, width?: number): WasmMatrix2dResult;
|
|
3389
4094
|
/**
|
|
3390
4095
|
* Reorder/concatenate a signal by interval slices (librosa.effects.remix).
|
|
3391
4096
|
*
|
|
3392
4097
|
* @param intervals - Flat (start, end) sample pairs (even length).
|
|
3393
4098
|
*/
|
|
4099
|
+
declare function remix(request: RemixRequest): Float32Array;
|
|
3394
4100
|
declare function remix(samples: Float32Array, intervals: Int32Array | ArrayLike<number>, sampleRate?: number, alignZeros?: boolean): Float32Array;
|
|
3395
4101
|
/**
|
|
3396
4102
|
* Phase-vocoder time-scale modification (rate > 1 faster, < 1 slower).
|
|
3397
4103
|
*/
|
|
4104
|
+
declare function phaseVocoder(request: PhaseVocoderRequest): Float32Array;
|
|
3398
4105
|
declare function phaseVocoder(samples: Float32Array, rate: number, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3399
4106
|
/**
|
|
3400
4107
|
* HPSS into harmonic / percussive / residual signals.
|
|
3401
4108
|
*/
|
|
4109
|
+
declare function hpssWithResidual(request: HpssWithResidualRequest): WasmHpssWithResidualResult;
|
|
3402
4110
|
declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): WasmHpssWithResidualResult;
|
|
3403
4111
|
/**
|
|
3404
4112
|
* Channel-weighted multichannel integrated loudness + LRA (ITU-R BS.1770 /
|
|
@@ -3409,12 +4117,14 @@ declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, ke
|
|
|
3409
4117
|
* audio, and K-weighting is sample-rate dependent, so a wrong rate yields wrong
|
|
3410
4118
|
* loudness.
|
|
3411
4119
|
*/
|
|
4120
|
+
declare function lufsInterleaved(request: LufsInterleavedRequest): WasmLufsResult;
|
|
3412
4121
|
declare function lufsInterleaved(samples: Float32Array, channels: number, sampleRate?: number, options?: ValidateOptions): WasmLufsResult;
|
|
3413
4122
|
/**
|
|
3414
4123
|
* Standards-compliant EBU R128 loudness range (LRA) in LU. Pass the buffer's
|
|
3415
4124
|
* actual `sampleRate`: the default (22050) is non-standard and K-weighting is
|
|
3416
4125
|
* sample-rate dependent.
|
|
3417
4126
|
*/
|
|
4127
|
+
declare function ebur128LoudnessRange(request: Ebur128LoudnessRangeRequest): number;
|
|
3418
4128
|
declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number): number;
|
|
3419
4129
|
/**
|
|
3420
4130
|
* Compute spectral bandwidth.
|
|
@@ -3425,6 +4135,7 @@ declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number
|
|
|
3425
4135
|
* @param hopLength - Hop length (default: 512)
|
|
3426
4136
|
* @returns Spectral bandwidth in Hz for each frame
|
|
3427
4137
|
*/
|
|
4138
|
+
declare function spectralBandwidth(request: SpectralFrameRequest): Float32Array;
|
|
3428
4139
|
declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3429
4140
|
/**
|
|
3430
4141
|
* Compute spectral rolloff frequency.
|
|
@@ -3436,6 +4147,7 @@ declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, n
|
|
|
3436
4147
|
* @param rollPercent - Percentage threshold (default: 0.85)
|
|
3437
4148
|
* @returns Rolloff frequency in Hz for each frame
|
|
3438
4149
|
*/
|
|
4150
|
+
declare function spectralRolloff(request: SpectralRolloffRequest): Float32Array;
|
|
3439
4151
|
declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, rollPercent?: number): Float32Array;
|
|
3440
4152
|
/**
|
|
3441
4153
|
* Compute spectral flatness.
|
|
@@ -3446,6 +4158,7 @@ declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFf
|
|
|
3446
4158
|
* @param hopLength - Hop length (default: 512)
|
|
3447
4159
|
* @returns Spectral flatness for each frame (0 = tonal, 1 = noise-like)
|
|
3448
4160
|
*/
|
|
4161
|
+
declare function spectralFlatness(request: SpectralFrameRequest): Float32Array;
|
|
3449
4162
|
declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3450
4163
|
/**
|
|
3451
4164
|
* Compute zero crossing rate.
|
|
@@ -3456,6 +4169,7 @@ declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nF
|
|
|
3456
4169
|
* @param hopLength - Hop length (default: 512)
|
|
3457
4170
|
* @returns Zero crossing rate for each frame
|
|
3458
4171
|
*/
|
|
4172
|
+
declare function zeroCrossingRate(request: ZeroCrossingRateRequest): Float32Array;
|
|
3459
4173
|
declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
3460
4174
|
/**
|
|
3461
4175
|
* Compute RMS energy.
|
|
@@ -3466,9 +4180,70 @@ declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, fr
|
|
|
3466
4180
|
* @param hopLength - Hop length (default: 512)
|
|
3467
4181
|
* @returns RMS energy for each frame
|
|
3468
4182
|
*/
|
|
4183
|
+
declare function rmsEnergy(request: ZeroCrossingRateRequest): Float32Array;
|
|
3469
4184
|
declare function rmsEnergy(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
3470
4185
|
|
|
3471
4186
|
type GuardedOptions$1 = ValidateOptions;
|
|
4187
|
+
/** Canonical request form for basic frame-based spectrogram features. */
|
|
4188
|
+
interface SpectrogramRequest extends GuardedOptions$1 {
|
|
4189
|
+
samples: Float32Array;
|
|
4190
|
+
sampleRate?: number;
|
|
4191
|
+
nFft?: number;
|
|
4192
|
+
hopLength?: number;
|
|
4193
|
+
}
|
|
4194
|
+
interface ChromaSpectrogramRequest extends GuardedOptions$1 {
|
|
4195
|
+
samples: Float32Array;
|
|
4196
|
+
sampleRate?: number;
|
|
4197
|
+
hopLength?: number;
|
|
4198
|
+
nChroma?: number;
|
|
4199
|
+
}
|
|
4200
|
+
interface MelSpectrogramRequest extends SpectrogramRequest {
|
|
4201
|
+
nMels?: number;
|
|
4202
|
+
fmin?: number;
|
|
4203
|
+
fmax?: number;
|
|
4204
|
+
htk?: boolean;
|
|
4205
|
+
}
|
|
4206
|
+
interface MfccRequest extends MelSpectrogramRequest {
|
|
4207
|
+
nMfcc?: number;
|
|
4208
|
+
lifter?: number;
|
|
4209
|
+
}
|
|
4210
|
+
interface MfccToMelRequest extends GuardedOptions$1 {
|
|
4211
|
+
mfccCoefficients: Float32Array;
|
|
4212
|
+
nMfcc: number;
|
|
4213
|
+
nFrames: number;
|
|
4214
|
+
nMels?: number;
|
|
4215
|
+
}
|
|
4216
|
+
/** Canonical request form for reconstruction from a Mel power spectrogram. */
|
|
4217
|
+
interface MelToStftRequest extends GuardedOptions$1 {
|
|
4218
|
+
melPower: Float32Array;
|
|
4219
|
+
nMels: number;
|
|
4220
|
+
nFrames: number;
|
|
4221
|
+
sampleRate?: number;
|
|
4222
|
+
nFft?: number;
|
|
4223
|
+
fmin?: number;
|
|
4224
|
+
fmax?: number;
|
|
4225
|
+
htk?: boolean;
|
|
4226
|
+
}
|
|
4227
|
+
/** Canonical request form for Griffin-Lim reconstruction from Mel power. */
|
|
4228
|
+
interface MelToAudioRequest extends MelToStftRequest {
|
|
4229
|
+
hopLength?: number;
|
|
4230
|
+
nIter?: number;
|
|
4231
|
+
}
|
|
4232
|
+
/** Canonical request form for Griffin-Lim reconstruction from MFCCs. */
|
|
4233
|
+
interface MfccToAudioRequest extends MfccToMelRequest {
|
|
4234
|
+
sampleRate?: number;
|
|
4235
|
+
nFft?: number;
|
|
4236
|
+
hopLength?: number;
|
|
4237
|
+
fmin?: number;
|
|
4238
|
+
fmax?: number;
|
|
4239
|
+
nIter?: number;
|
|
4240
|
+
htk?: boolean;
|
|
4241
|
+
}
|
|
4242
|
+
interface TrimRequest extends GuardedOptions$1 {
|
|
4243
|
+
samples: Float32Array;
|
|
4244
|
+
sampleRate: number;
|
|
4245
|
+
thresholdDb?: number;
|
|
4246
|
+
}
|
|
3472
4247
|
/**
|
|
3473
4248
|
* Trim silence from beginning and end of audio.
|
|
3474
4249
|
*
|
|
@@ -3477,6 +4252,7 @@ type GuardedOptions$1 = ValidateOptions;
|
|
|
3477
4252
|
* @param thresholdDb - Silence threshold in dB (default: -60 dB)
|
|
3478
4253
|
* @returns Trimmed audio
|
|
3479
4254
|
*/
|
|
4255
|
+
declare function trim(request: TrimRequest): Float32Array;
|
|
3480
4256
|
declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: number, options?: GuardedOptions$1): Float32Array;
|
|
3481
4257
|
/**
|
|
3482
4258
|
* Compute Short-Time Fourier Transform (STFT).
|
|
@@ -3487,6 +4263,7 @@ declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: n
|
|
|
3487
4263
|
* @param hopLength - Hop length (default: 512)
|
|
3488
4264
|
* @returns STFT result with magnitude and power spectrograms
|
|
3489
4265
|
*/
|
|
4266
|
+
declare function stft(request: SpectrogramRequest): StftResult;
|
|
3490
4267
|
declare function stft(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): StftResult;
|
|
3491
4268
|
/**
|
|
3492
4269
|
* Compute STFT and return magnitude in decibels.
|
|
@@ -3497,6 +4274,11 @@ declare function stft(samples: Float32Array, sampleRate?: number, nFft?: number,
|
|
|
3497
4274
|
* @param hopLength - Hop length (default: 512)
|
|
3498
4275
|
* @returns STFT result with dB values
|
|
3499
4276
|
*/
|
|
4277
|
+
declare function stftDb(request: SpectrogramRequest): {
|
|
4278
|
+
nBins: number;
|
|
4279
|
+
nFrames: number;
|
|
4280
|
+
db: Float32Array;
|
|
4281
|
+
};
|
|
3500
4282
|
declare function stftDb(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): {
|
|
3501
4283
|
nBins: number;
|
|
3502
4284
|
nFrames: number;
|
|
@@ -3511,6 +4293,7 @@ declare function stftDb(samples: Float32Array, sampleRate?: number, nFft?: numbe
|
|
|
3511
4293
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3512
4294
|
* @returns Chroma result
|
|
3513
4295
|
*/
|
|
4296
|
+
declare function chromaCens(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3514
4297
|
declare function chromaCens(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3515
4298
|
/**
|
|
3516
4299
|
* Compute a constant-Q chromagram (librosa.feature.chroma_cqt).
|
|
@@ -3521,6 +4304,7 @@ declare function chromaCens(samples: Float32Array, sampleRate?: number, hopLengt
|
|
|
3521
4304
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3522
4305
|
* @returns Chroma result
|
|
3523
4306
|
*/
|
|
4307
|
+
declare function chromaCqt(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3524
4308
|
declare function chromaCqt(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3525
4309
|
/**
|
|
3526
4310
|
* Compute low-frequency bass chroma.
|
|
@@ -3531,6 +4315,7 @@ declare function chromaCqt(samples: Float32Array, sampleRate?: number, hopLength
|
|
|
3531
4315
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3532
4316
|
* @returns Chroma result
|
|
3533
4317
|
*/
|
|
4318
|
+
declare function bassChroma(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3534
4319
|
declare function bassChroma(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3535
4320
|
/**
|
|
3536
4321
|
* Compute Mel spectrogram.
|
|
@@ -3546,6 +4331,7 @@ declare function bassChroma(samples: Float32Array, sampleRate?: number, hopLengt
|
|
|
3546
4331
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3547
4332
|
* @returns Mel spectrogram result
|
|
3548
4333
|
*/
|
|
4334
|
+
declare function melSpectrogram(request: MelSpectrogramRequest): MelSpectrogramResult;
|
|
3549
4335
|
declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, fmin?: number, fmax?: number, htk?: boolean, options?: GuardedOptions$1): MelSpectrogramResult;
|
|
3550
4336
|
/**
|
|
3551
4337
|
* Compute MFCC (Mel-Frequency Cepstral Coefficients).
|
|
@@ -3562,6 +4348,7 @@ declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft
|
|
|
3562
4348
|
* @param lifter - Cepstral liftering coefficient (default: 0 = no liftering)
|
|
3563
4349
|
* @returns MFCC result
|
|
3564
4350
|
*/
|
|
4351
|
+
declare function mfcc(request: MfccRequest): MfccResult;
|
|
3565
4352
|
declare function mfcc(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, nMfcc?: number, fmin?: number, fmax?: number, htk?: boolean, lifter?: number, options?: GuardedOptions$1): MfccResult;
|
|
3566
4353
|
/**
|
|
3567
4354
|
* Approximate inverse of a Mel filterbank: Mel power spectrogram -> STFT power
|
|
@@ -3577,6 +4364,7 @@ declare function mfcc(samples: Float32Array, sampleRate?: number, nFft?: number,
|
|
|
3577
4364
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3578
4365
|
* @returns STFT power spectrogram result
|
|
3579
4366
|
*/
|
|
4367
|
+
declare function melToStft(request: MelToStftRequest): StftPowerResult;
|
|
3580
4368
|
declare function melToStft(melPower: Float32Array, nMels: number, nFrames: number, sampleRate?: number, nFft?: number, fmin?: number, fmax?: number, htk?: boolean, options?: GuardedOptions$1): StftPowerResult;
|
|
3581
4369
|
/**
|
|
3582
4370
|
* Reconstruct audio from a Mel power spectrogram via Griffin-Lim. Mirrors
|
|
@@ -3594,6 +4382,7 @@ declare function melToStft(melPower: Float32Array, nMels: number, nFrames: numbe
|
|
|
3594
4382
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3595
4383
|
* @returns Reconstructed audio samples (mono, float32)
|
|
3596
4384
|
*/
|
|
4385
|
+
declare function melToAudio(request: MelToAudioRequest): Float32Array;
|
|
3597
4386
|
declare function melToAudio(melPower: Float32Array, nMels: number, nFrames: number, sampleRate?: number, nFft?: number, hopLength?: number, fmin?: number, fmax?: number, nIter?: number, htk?: boolean, options?: GuardedOptions$1): Float32Array;
|
|
3598
4387
|
/**
|
|
3599
4388
|
* Invert MFCC coefficients back to a Mel power spectrogram. Mirrors
|
|
@@ -3605,6 +4394,7 @@ declare function melToAudio(melPower: Float32Array, nMels: number, nFrames: numb
|
|
|
3605
4394
|
* @param nMels - Number of Mel bins to reconstruct (default: 128)
|
|
3606
4395
|
* @returns Mel power spectrogram result
|
|
3607
4396
|
*/
|
|
4397
|
+
declare function mfccToMel(request: MfccToMelRequest): MelPowerResult;
|
|
3608
4398
|
declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels?: number, options?: GuardedOptions$1): MelPowerResult;
|
|
3609
4399
|
/**
|
|
3610
4400
|
* Reconstruct audio directly from MFCC coefficients via Griffin-Lim. Mirrors
|
|
@@ -3623,6 +4413,7 @@ declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrame
|
|
|
3623
4413
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3624
4414
|
* @returns Reconstructed audio samples (mono, float32)
|
|
3625
4415
|
*/
|
|
4416
|
+
declare function mfccToAudio(request: MfccToAudioRequest): Float32Array;
|
|
3626
4417
|
declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels?: number, sampleRate?: number, nFft?: number, hopLength?: number, fmin?: number, fmax?: number, nIter?: number, htk?: boolean, options?: GuardedOptions$1): Float32Array;
|
|
3627
4418
|
/**
|
|
3628
4419
|
* Compute STFT chromagram (librosa.feature.chroma_stft).
|
|
@@ -3639,6 +4430,7 @@ declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFra
|
|
|
3639
4430
|
* @param hopLength - Hop length (default: 512)
|
|
3640
4431
|
* @returns Chroma features result
|
|
3641
4432
|
*/
|
|
4433
|
+
declare function chroma(request: SpectrogramRequest): ChromaResult;
|
|
3642
4434
|
declare function chroma(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3643
4435
|
|
|
3644
4436
|
interface SonareWorkletMeterSnapshot {
|
|
@@ -3818,6 +4610,27 @@ interface SonareEngineSyncClipsDeltaMessage {
|
|
|
3818
4610
|
upserts: EngineClip[];
|
|
3819
4611
|
removeIds: number[];
|
|
3820
4612
|
}
|
|
4613
|
+
/** Begins a paged, pre-baked clip transfer. PCM pages follow in FIFO order. */
|
|
4614
|
+
interface SonareEngineSyncClipPageProviderMessage {
|
|
4615
|
+
type: 'syncClipPageProvider';
|
|
4616
|
+
clipId: number;
|
|
4617
|
+
clip: EngineClip;
|
|
4618
|
+
numChannels: number;
|
|
4619
|
+
numSamples: number;
|
|
4620
|
+
pageFrames: number;
|
|
4621
|
+
}
|
|
4622
|
+
/** Supplies one bounded PCM page for a pending pre-baked clip transfer. */
|
|
4623
|
+
interface SonareEngineSyncClipPageMessage {
|
|
4624
|
+
type: 'syncClipPage';
|
|
4625
|
+
clipId: number;
|
|
4626
|
+
pageIndex: number;
|
|
4627
|
+
channels: Float32Array[];
|
|
4628
|
+
}
|
|
4629
|
+
/** Makes a fully supplied paged clip visible to the audio engine. */
|
|
4630
|
+
interface SonareEngineSyncClipPageCommitMessage {
|
|
4631
|
+
type: 'syncClipPageCommit';
|
|
4632
|
+
clipId: number;
|
|
4633
|
+
}
|
|
3821
4634
|
interface SonareEngineSyncMidiClipsMessage {
|
|
3822
4635
|
type: 'syncMidiClips';
|
|
3823
4636
|
clips: EngineMidiClipSchedule[];
|
|
@@ -4014,7 +4827,7 @@ interface SonareEngineSyncExternalMidiClockMessage {
|
|
|
4014
4827
|
type: 'syncExternalMidiClock';
|
|
4015
4828
|
enabled: boolean;
|
|
4016
4829
|
}
|
|
4017
|
-
type SonareEngineSyncMessage = SonareEngineSyncClipsMessage | SonareEngineSyncClipsDeltaMessage | SonareEngineSyncMidiClipsMessage | SonareEngineSyncMarkersMessage | SonareEngineSyncMetronomeMessage | SonareEngineSyncAutomationMessage | SonareEngineSyncTempoMessage | SonareEngineSyncMixerMessage | SonareEngineSyncCaptureMessage | SonareEngineSyncTrackStripEqBandMessage | SonareEngineSyncMasterStripEqBandMessage | SonareEngineSyncTrackStripInsertBypassedMessage | SonareEngineSyncMasterStripInsertBypassedMessage | SonareEngineSyncTrackStripInsertParamByNameMessage | SonareEngineSyncMasterStripInsertParamByNameMessage | SonareEngineSyncBusStripInsertParamByNameMessage | SonareEngineSyncTrackStripPanMessage | SonareEngineSyncTrackStripPanLawMessage | SonareEngineSyncTrackStripPanModeMessage | SonareEngineSyncTrackStripDualPanMessage | SonareEngineSyncTrackStripChannelDelaySamplesMessage | SonareEngineSyncBuiltinInstrumentMessage | SonareEngineSyncSynthInstrumentMessage | SonareEngineSyncSf2InstrumentMessage | SonareEngineSyncLoadSoundFontMessage | SonareEngineSyncMidiFxMessage | SonareEngineSyncMidiNoteMessage | SonareEngineSyncMidiCcMessage | SonareEngineSyncMidiSysexMessage | SonareEngineSyncMidiPanicMessage | SonareEngineSyncMidiDestinationExternalMessage | SonareEngineSyncExternalMidiClockMessage;
|
|
4830
|
+
type SonareEngineSyncMessage = SonareEngineSyncClipsMessage | SonareEngineSyncClipsDeltaMessage | SonareEngineSyncClipPageProviderMessage | SonareEngineSyncClipPageMessage | SonareEngineSyncClipPageCommitMessage | SonareEngineSyncMidiClipsMessage | SonareEngineSyncMarkersMessage | SonareEngineSyncMetronomeMessage | SonareEngineSyncAutomationMessage | SonareEngineSyncTempoMessage | SonareEngineSyncMixerMessage | SonareEngineSyncCaptureMessage | SonareEngineSyncTrackStripEqBandMessage | SonareEngineSyncMasterStripEqBandMessage | SonareEngineSyncTrackStripInsertBypassedMessage | SonareEngineSyncMasterStripInsertBypassedMessage | SonareEngineSyncTrackStripInsertParamByNameMessage | SonareEngineSyncMasterStripInsertParamByNameMessage | SonareEngineSyncBusStripInsertParamByNameMessage | SonareEngineSyncTrackStripPanMessage | SonareEngineSyncTrackStripPanLawMessage | SonareEngineSyncTrackStripPanModeMessage | SonareEngineSyncTrackStripDualPanMessage | SonareEngineSyncTrackStripChannelDelaySamplesMessage | SonareEngineSyncBuiltinInstrumentMessage | SonareEngineSyncSynthInstrumentMessage | SonareEngineSyncSf2InstrumentMessage | SonareEngineSyncLoadSoundFontMessage | SonareEngineSyncMidiFxMessage | SonareEngineSyncMidiNoteMessage | SonareEngineSyncMidiCcMessage | SonareEngineSyncMidiSysexMessage | SonareEngineSyncMidiPanicMessage | SonareEngineSyncMidiDestinationExternalMessage | SonareEngineSyncExternalMidiClockMessage;
|
|
4018
4831
|
|
|
4019
4832
|
declare class SonareRealtimeEngineNode {
|
|
4020
4833
|
readonly node: AudioWorkletNode;
|
|
@@ -4120,14 +4933,38 @@ interface MeteringDynamicRangeOptions extends ValidateOptions {
|
|
|
4120
4933
|
/** High percentile in [0,1] (negative = library default, 0.95). Default -1. */
|
|
4121
4934
|
highPercentile?: number;
|
|
4122
4935
|
}
|
|
4936
|
+
/** Canonical request form for single-channel meter readings. */
|
|
4937
|
+
interface MeteringSamplesRequest extends ValidateOptions {
|
|
4938
|
+
samples: Float32Array;
|
|
4939
|
+
sampleRate?: number;
|
|
4940
|
+
}
|
|
4941
|
+
/** Canonical request form for true-peak analysis. */
|
|
4942
|
+
interface MeteringTruePeakRequest extends MeteringSamplesRequest {
|
|
4943
|
+
oversampleFactor?: number;
|
|
4944
|
+
}
|
|
4945
|
+
/** Canonical request form for clipping analysis. */
|
|
4946
|
+
interface MeteringDetectClippingRequest extends MeteringDetectClippingOptions {
|
|
4947
|
+
samples: Float32Array;
|
|
4948
|
+
sampleRate?: number;
|
|
4949
|
+
}
|
|
4950
|
+
/** Canonical request form for dynamic-range analysis. */
|
|
4951
|
+
interface MeteringDynamicRangeRequest extends MeteringDynamicRangeOptions {
|
|
4952
|
+
samples: Float32Array;
|
|
4953
|
+
sampleRate?: number;
|
|
4954
|
+
}
|
|
4955
|
+
declare function meteringPeakDb(request: MeteringSamplesRequest): number;
|
|
4123
4956
|
declare function meteringPeakDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4957
|
+
declare function meteringRmsDb(request: MeteringSamplesRequest): number;
|
|
4124
4958
|
declare function meteringRmsDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4959
|
+
declare function meteringCrestFactorDb(request: MeteringSamplesRequest): number;
|
|
4125
4960
|
declare function meteringCrestFactorDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4961
|
+
declare function meteringDcOffset(request: MeteringSamplesRequest): number;
|
|
4126
4962
|
declare function meteringDcOffset(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4127
4963
|
/**
|
|
4128
4964
|
* Inter-sample (true) peak in dBFS. `oversampleFactor` must be a power of two
|
|
4129
4965
|
* in [1, 16]; pass 0 to use the library default (4).
|
|
4130
4966
|
*/
|
|
4967
|
+
declare function meteringTruePeakDb(request: MeteringTruePeakRequest): number;
|
|
4131
4968
|
declare function meteringTruePeakDb(samples: Float32Array, sampleRate?: number, oversampleFactor?: number, options?: ValidateOptions): number;
|
|
4132
4969
|
/**
|
|
4133
4970
|
* Detect contiguous runs of clipped samples.
|
|
@@ -4135,6 +4972,7 @@ declare function meteringTruePeakDb(samples: Float32Array, sampleRate?: number,
|
|
|
4135
4972
|
* @param threshold Linear absolute threshold (default 0.999).
|
|
4136
4973
|
* @param minRegionSamples Minimum run length to report (default 1).
|
|
4137
4974
|
*/
|
|
4975
|
+
declare function meteringDetectClipping(request: MeteringDetectClippingRequest): ClippingReport;
|
|
4138
4976
|
declare function meteringDetectClipping(samples: Float32Array, sampleRate?: number, options?: MeteringDetectClippingOptions): ClippingReport;
|
|
4139
4977
|
/**
|
|
4140
4978
|
* Sliding-window dynamic range. Pass 0 for window/hop to use the library
|
|
@@ -4142,6 +4980,7 @@ declare function meteringDetectClipping(samples: Float32Array, sampleRate?: numb
|
|
|
4142
4980
|
* "use the library default" (low=0.10, high=0.95) because 0 is a literal 0th
|
|
4143
4981
|
* percentile; omitted percentiles therefore default to -1.
|
|
4144
4982
|
*/
|
|
4983
|
+
declare function meteringDynamicRange(request: MeteringDynamicRangeRequest): DynamicRangeReport;
|
|
4145
4984
|
declare function meteringDynamicRange(samples: Float32Array, sampleRate?: number, options?: MeteringDynamicRangeOptions): DynamicRangeReport;
|
|
4146
4985
|
/** Mid/side vectorscope point series for a (left, right) stereo pair. */
|
|
4147
4986
|
interface VectorscopeReport {
|
|
@@ -4190,6 +5029,44 @@ interface WaveformPeakPyramidOptions extends ValidateOptions {
|
|
|
4190
5029
|
/** Bucket widths in frames, one per zoom level. Default [512, 1024, 2048, 4096]. */
|
|
4191
5030
|
samplesPerBucketLevels?: number[];
|
|
4192
5031
|
}
|
|
5032
|
+
/** Canonical request form for stereo meter readings. */
|
|
5033
|
+
interface MeteringStereoRequest extends ValidateOptions {
|
|
5034
|
+
left: Float32Array;
|
|
5035
|
+
right: Float32Array;
|
|
5036
|
+
sampleRate?: number;
|
|
5037
|
+
}
|
|
5038
|
+
/** Canonical request form for display-decimated stereo scopes. */
|
|
5039
|
+
interface MeteringStereoDecimatedRequest extends MeteringStereoRequest {
|
|
5040
|
+
maxPoints?: number;
|
|
5041
|
+
}
|
|
5042
|
+
/** Options for the scope functions (mirrors the Node `ScopeOptions`). */
|
|
5043
|
+
interface ScopeOptions extends ValidateOptions {
|
|
5044
|
+
/**
|
|
5045
|
+
* Upper bound on the returned point count. Omit / `0` (or a value `>= length`)
|
|
5046
|
+
* yields one point per input sample; otherwise the point cloud is
|
|
5047
|
+
* deterministically decimated to at most `maxPoints` points for display.
|
|
5048
|
+
*/
|
|
5049
|
+
maxPoints?: number;
|
|
5050
|
+
}
|
|
5051
|
+
/** Canonical request form for whole-signal spectrum analysis. */
|
|
5052
|
+
interface MeteringSpectrumRequest extends SpectrumOptions, ValidateOptions {
|
|
5053
|
+
samples: Float32Array;
|
|
5054
|
+
sampleRate?: number;
|
|
5055
|
+
}
|
|
5056
|
+
/** Canonical request form for a single spectrum frame. */
|
|
5057
|
+
interface MeteringSpectrumFrameRequest extends MeteringSpectrumRequest {
|
|
5058
|
+
frameOffset?: number;
|
|
5059
|
+
}
|
|
5060
|
+
/** Canonical request form for waveform bucket generation. */
|
|
5061
|
+
interface WaveformPeaksRequest extends WaveformPeaksOptions {
|
|
5062
|
+
samples: Float32Array;
|
|
5063
|
+
channels: number;
|
|
5064
|
+
}
|
|
5065
|
+
/** Canonical request form for multi-resolution waveform bucket generation. */
|
|
5066
|
+
interface WaveformPeakPyramidRequest extends WaveformPeakPyramidOptions {
|
|
5067
|
+
samples: Float32Array;
|
|
5068
|
+
channels: number;
|
|
5069
|
+
}
|
|
4193
5070
|
/** Per-channel min/max waveform buckets. Arrays are channel-major. */
|
|
4194
5071
|
interface WaveformPeaksReport {
|
|
4195
5072
|
min: Float32Array;
|
|
@@ -4199,30 +5076,46 @@ interface WaveformPeaksReport {
|
|
|
4199
5076
|
samplesPerBucket: number;
|
|
4200
5077
|
}
|
|
4201
5078
|
/** Pearson correlation in [-1, 1] between two equal-length channels. */
|
|
5079
|
+
declare function meteringStereoCorrelation(request: MeteringStereoRequest): number;
|
|
4202
5080
|
declare function meteringStereoCorrelation(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4203
5081
|
/**
|
|
4204
5082
|
* Side / mid energy ratio, clamped to `[0, 2]`: 0 = pure mono, ~1 = wide
|
|
4205
5083
|
* stereo, 2 = fully decorrelated / out-of-phase.
|
|
4206
5084
|
*/
|
|
5085
|
+
declare function meteringStereoWidth(request: MeteringStereoRequest): number;
|
|
4207
5086
|
declare function meteringStereoWidth(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4208
|
-
/** Per-sample mid/side point series (one entry per input frame). */
|
|
4209
|
-
declare function meteringVectorscope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): VectorscopeReport;
|
|
4210
5087
|
/**
|
|
4211
|
-
*
|
|
4212
|
-
*
|
|
4213
|
-
*
|
|
4214
|
-
|
|
5088
|
+
* Mid/side vectorscope point series. By default emits one point per input
|
|
5089
|
+
* sample; pass `maxPoints` to get a display-sized decimated point set (matching
|
|
5090
|
+
* the Node `meteringVectorscope` shape).
|
|
5091
|
+
*/
|
|
5092
|
+
declare function meteringVectorscope(request: MeteringStereoDecimatedRequest): VectorscopeReport;
|
|
5093
|
+
declare function meteringVectorscope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ScopeOptions): VectorscopeReport;
|
|
5094
|
+
/**
|
|
5095
|
+
* Display-sized mid/side vectorscope.
|
|
5096
|
+
*
|
|
5097
|
+
* @deprecated Pass `maxPoints` to {@link meteringVectorscope} instead; it now
|
|
5098
|
+
* folds `maxPoints` into the request, matching the Node surface. This alias is
|
|
5099
|
+
* kept for backward compatibility and simply delegates.
|
|
4215
5100
|
*/
|
|
5101
|
+
declare function meteringVectorscopeDecimated(request: MeteringStereoDecimatedRequest): VectorscopeReport;
|
|
4216
5102
|
declare function meteringVectorscopeDecimated(left: Float32Array, right: Float32Array, sampleRate?: number, maxPoints?: number, options?: ValidateOptions): VectorscopeReport;
|
|
4217
|
-
/** Phase-scope point series plus summary stats. */
|
|
4218
|
-
declare function meteringPhaseScope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): PhaseScopeReport;
|
|
4219
5103
|
/**
|
|
4220
|
-
*
|
|
4221
|
-
*
|
|
4222
|
-
*
|
|
4223
|
-
*
|
|
4224
|
-
|
|
5104
|
+
* Phase-scope point series plus summary stats. By default emits one point per
|
|
5105
|
+
* input sample; pass `maxPoints` to decimate the point cloud for display
|
|
5106
|
+
* (matching the Node `meteringPhaseScope` shape). The summary stats are always
|
|
5107
|
+
* computed over the full-resolution signal.
|
|
5108
|
+
*/
|
|
5109
|
+
declare function meteringPhaseScope(request: MeteringStereoDecimatedRequest): PhaseScopeReport;
|
|
5110
|
+
declare function meteringPhaseScope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ScopeOptions): PhaseScopeReport;
|
|
5111
|
+
/**
|
|
5112
|
+
* Display-sized phase scope.
|
|
5113
|
+
*
|
|
5114
|
+
* @deprecated Pass `maxPoints` to {@link meteringPhaseScope} instead; it now
|
|
5115
|
+
* folds `maxPoints` into the request, matching the Node surface. This alias is
|
|
5116
|
+
* kept for backward compatibility and simply delegates.
|
|
4225
5117
|
*/
|
|
5118
|
+
declare function meteringPhaseScopeDecimated(request: MeteringStereoDecimatedRequest): PhaseScopeReport;
|
|
4226
5119
|
declare function meteringPhaseScopeDecimated(left: Float32Array, right: Float32Array, sampleRate?: number, maxPoints?: number, options?: ValidateOptions): PhaseScopeReport;
|
|
4227
5120
|
/**
|
|
4228
5121
|
* Welch-averaged magnitude / power / dB spectrum over the WHOLE signal (split
|
|
@@ -4230,6 +5123,7 @@ declare function meteringPhaseScopeDecimated(left: Float32Array, right: Float32A
|
|
|
4230
5123
|
* are averaged). For a true single-frame snapshot, use
|
|
4231
5124
|
* {@link meteringSpectrumFrame}.
|
|
4232
5125
|
*/
|
|
5126
|
+
declare function meteringSpectrum(request: MeteringSpectrumRequest): SpectrumReport;
|
|
4233
5127
|
declare function meteringSpectrum(samples: Float32Array, sampleRate?: number, options?: SpectrumOptions & ValidateOptions): SpectrumReport;
|
|
4234
5128
|
/**
|
|
4235
5129
|
* True single-frame magnitude / power / dB spectrum (one Hann-windowed
|
|
@@ -4237,13 +5131,61 @@ declare function meteringSpectrum(samples: Float32Array, sampleRate?: number, op
|
|
|
4237
5131
|
* time-averaged like {@link meteringSpectrum}. The analysis frame spans
|
|
4238
5132
|
* `[frameOffset, frameOffset + nFft)`; samples past the end are zero-padded.
|
|
4239
5133
|
*/
|
|
5134
|
+
declare function meteringSpectrumFrame(request: MeteringSpectrumFrameRequest): SpectrumReport;
|
|
4240
5135
|
declare function meteringSpectrumFrame(samples: Float32Array, sampleRate?: number, frameOffset?: number, options?: SpectrumOptions & ValidateOptions): SpectrumReport;
|
|
4241
5136
|
/** Compute per-channel min/max waveform buckets from interleaved audio. */
|
|
5137
|
+
declare function waveformPeaks(request: WaveformPeaksRequest): WaveformPeaksReport;
|
|
4242
5138
|
declare function waveformPeaks(samples: Float32Array, channels: number, options?: WaveformPeaksOptions): WaveformPeaksReport;
|
|
4243
5139
|
/** Compute waveform peak buckets for several zoom levels. */
|
|
5140
|
+
declare function waveformPeakPyramid(request: WaveformPeakPyramidRequest): WaveformPeaksReport[];
|
|
4244
5141
|
declare function waveformPeakPyramid(samples: Float32Array, channels: number, options?: WaveformPeakPyramidOptions): WaveformPeaksReport[];
|
|
4245
5142
|
|
|
4246
5143
|
type GuardedOptions = ValidateOptions;
|
|
5144
|
+
/** Canonical request form for one-shot analysis functions. */
|
|
5145
|
+
interface SamplesRequest extends GuardedOptions {
|
|
5146
|
+
samples: Float32Array;
|
|
5147
|
+
sampleRate?: number;
|
|
5148
|
+
}
|
|
5149
|
+
/** Canonical request form for key detection functions. */
|
|
5150
|
+
interface DetectKeyRequest extends KeyDetectionOptions, SamplesRequest {
|
|
5151
|
+
}
|
|
5152
|
+
/** Canonical request form for analysis with synchronous progress reporting. */
|
|
5153
|
+
interface AnalyzeWithProgressRequest extends SamplesRequest {
|
|
5154
|
+
onProgress: ProgressCallback;
|
|
5155
|
+
}
|
|
5156
|
+
/** Canonical request form for chord detection. */
|
|
5157
|
+
interface DetectChordsRequest extends ChordDetectionOptions, SamplesRequest {
|
|
5158
|
+
}
|
|
5159
|
+
/** Canonical request form for functional chord analysis. */
|
|
5160
|
+
interface ChordFunctionalAnalysisRequest extends DetectChordsRequest {
|
|
5161
|
+
keyRoot: PitchClass;
|
|
5162
|
+
/** Musical mode; defaults to {@link Mode.Major}. */
|
|
5163
|
+
keyMode?: Mode;
|
|
5164
|
+
}
|
|
5165
|
+
/** Canonical request form for impulse-response analysis. */
|
|
5166
|
+
interface AnalyzeImpulseResponseRequest extends SamplesRequest {
|
|
5167
|
+
nOctaveBands?: number;
|
|
5168
|
+
}
|
|
5169
|
+
/** Canonical request form for acoustic analysis. */
|
|
5170
|
+
interface DetectAcousticRequest extends AcousticOptions, SamplesRequest {
|
|
5171
|
+
}
|
|
5172
|
+
/** Canonical request form for equivalent-room estimation. */
|
|
5173
|
+
interface EstimateRoomRequest extends RoomEstimateOptions, SamplesRequest {
|
|
5174
|
+
}
|
|
5175
|
+
/** Canonical request form for room-reverb morphing. */
|
|
5176
|
+
interface RoomMorphRequest extends RoomMorphOptions, GuardedOptions {
|
|
5177
|
+
samples: Float32Array;
|
|
5178
|
+
sampleRate: number;
|
|
5179
|
+
}
|
|
5180
|
+
/** Canonical request forms for detailed music-analysis APIs. */
|
|
5181
|
+
interface AnalyzeBpmRequest extends AnalyzeBpmOptions, SamplesRequest {
|
|
5182
|
+
}
|
|
5183
|
+
interface AnalyzeRhythmRequest extends AnalyzeRhythmOptions, SamplesRequest {
|
|
5184
|
+
}
|
|
5185
|
+
interface AnalyzeDynamicsRequest extends AnalyzeDynamicsOptions, SamplesRequest {
|
|
5186
|
+
}
|
|
5187
|
+
interface AnalyzeTimbreRequest extends AnalyzeTimbreOptions, SamplesRequest {
|
|
5188
|
+
}
|
|
4247
5189
|
/**
|
|
4248
5190
|
* Detect BPM from audio samples.
|
|
4249
5191
|
*
|
|
@@ -4251,6 +5193,7 @@ type GuardedOptions = ValidateOptions;
|
|
|
4251
5193
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4252
5194
|
* @returns Detected BPM
|
|
4253
5195
|
*/
|
|
5196
|
+
declare function detectBpm(request: SamplesRequest): number;
|
|
4254
5197
|
declare function detectBpm(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): number;
|
|
4255
5198
|
/**
|
|
4256
5199
|
* Detect musical key from audio samples.
|
|
@@ -4259,7 +5202,9 @@ declare function detectBpm(samples: Float32Array, sampleRate?: number, options?:
|
|
|
4259
5202
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4260
5203
|
* @returns Detected key
|
|
4261
5204
|
*/
|
|
5205
|
+
declare function detectKey(request: DetectKeyRequest): Key;
|
|
4262
5206
|
declare function detectKey(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): Key;
|
|
5207
|
+
declare function detectKeyCandidates(request: DetectKeyRequest): KeyCandidate[];
|
|
4263
5208
|
declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): KeyCandidate[];
|
|
4264
5209
|
/**
|
|
4265
5210
|
* Detect onset times from audio samples.
|
|
@@ -4268,6 +5213,7 @@ declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number,
|
|
|
4268
5213
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4269
5214
|
* @returns Array of onset times in seconds
|
|
4270
5215
|
*/
|
|
5216
|
+
declare function detectOnsets(request: SamplesRequest): Float32Array;
|
|
4271
5217
|
declare function detectOnsets(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4272
5218
|
/**
|
|
4273
5219
|
* Detect beat times from audio samples.
|
|
@@ -4276,6 +5222,7 @@ declare function detectOnsets(samples: Float32Array, sampleRate?: number, option
|
|
|
4276
5222
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4277
5223
|
* @returns Array of beat times in seconds
|
|
4278
5224
|
*/
|
|
5225
|
+
declare function detectBeats(request: SamplesRequest): Float32Array;
|
|
4279
5226
|
declare function detectBeats(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4280
5227
|
/**
|
|
4281
5228
|
* Detect downbeat times from audio samples.
|
|
@@ -4284,6 +5231,7 @@ declare function detectBeats(samples: Float32Array, sampleRate?: number, options
|
|
|
4284
5231
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4285
5232
|
* @returns Array of downbeat times in seconds
|
|
4286
5233
|
*/
|
|
5234
|
+
declare function detectDownbeats(request: SamplesRequest): Float32Array;
|
|
4287
5235
|
declare function detectDownbeats(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4288
5236
|
/**
|
|
4289
5237
|
* Detect chords from audio samples.
|
|
@@ -4293,6 +5241,7 @@ declare function detectDownbeats(samples: Float32Array, sampleRate?: number, opt
|
|
|
4293
5241
|
* @param options - Optional chord detection settings
|
|
4294
5242
|
* @returns Detected chord segments
|
|
4295
5243
|
*/
|
|
5244
|
+
declare function detectChords(request: DetectChordsRequest): ChordAnalysisResult;
|
|
4296
5245
|
declare function detectChords(samples: Float32Array, sampleRate?: number, options?: ChordDetectionOptions): ChordAnalysisResult;
|
|
4297
5246
|
/**
|
|
4298
5247
|
* Functional (Roman-numeral) harmonic analysis of the detected chord
|
|
@@ -4301,7 +5250,8 @@ declare function detectChords(samples: Float32Array, sampleRate?: number, option
|
|
|
4301
5250
|
*
|
|
4302
5251
|
* @returns One Roman-numeral label (e.g. "I", "IV", "V", "vi") per detected chord
|
|
4303
5252
|
*/
|
|
4304
|
-
declare function chordFunctionalAnalysis(
|
|
5253
|
+
declare function chordFunctionalAnalysis(request: ChordFunctionalAnalysisRequest): string[];
|
|
5254
|
+
declare function chordFunctionalAnalysis(samples: Float32Array, keyRoot: PitchClass, keyMode?: Mode, sampleRate?: number, options?: ChordDetectionOptions): string[];
|
|
4305
5255
|
/**
|
|
4306
5256
|
* Perform complete music analysis.
|
|
4307
5257
|
*
|
|
@@ -4317,8 +5267,11 @@ declare function chordFunctionalAnalysis(samples: Float32Array, keyRoot: PitchCl
|
|
|
4317
5267
|
* the UI responsive for long inputs, drive this from a Web Worker and use
|
|
4318
5268
|
* {@link analyzeWithProgress} to report progress.
|
|
4319
5269
|
*/
|
|
5270
|
+
declare function analyze(request: SamplesRequest): AnalysisResult;
|
|
4320
5271
|
declare function analyze(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): AnalysisResult;
|
|
5272
|
+
declare function analyzeImpulseResponse(request: AnalyzeImpulseResponseRequest): AcousticResult;
|
|
4321
5273
|
declare function analyzeImpulseResponse(samples: Float32Array, sampleRate?: number, nOctaveBands?: number): AcousticResult;
|
|
5274
|
+
declare function detectAcoustic(request: DetectAcousticRequest): AcousticResult;
|
|
4322
5275
|
declare function detectAcoustic(samples: Float32Array, sampleRate?: number, options?: AcousticOptions): AcousticResult;
|
|
4323
5276
|
/**
|
|
4324
5277
|
* Synthesize a room impulse response from shoebox geometry. `hasError` is true
|
|
@@ -4329,12 +5282,14 @@ declare function synthesizeRir(options?: RirSynthOptions): RirResult;
|
|
|
4329
5282
|
* Estimate an equivalent room (volume/dimensions/absorption/DRR) from a
|
|
4330
5283
|
* recording or impulse response.
|
|
4331
5284
|
*/
|
|
5285
|
+
declare function estimateRoom(request: EstimateRoomRequest): RoomEstimateResult;
|
|
4332
5286
|
declare function estimateRoom(samples: Float32Array, sampleRate?: number, options?: RoomEstimateOptions): RoomEstimateResult;
|
|
4333
5287
|
/**
|
|
4334
5288
|
* Morph a recording's reverberation toward a target room (creative FX, not
|
|
4335
5289
|
* dereverberation). Returns the morphed samples (input length plus the target
|
|
4336
5290
|
* room's reverb tail).
|
|
4337
5291
|
*/
|
|
5292
|
+
declare function roomMorph(request: RoomMorphRequest): Float32Array;
|
|
4338
5293
|
declare function roomMorph(samples: Float32Array, sampleRate: number, options?: RoomMorphOptions): Float32Array;
|
|
4339
5294
|
/**
|
|
4340
5295
|
* Perform complete music analysis with progress reporting.
|
|
@@ -4344,6 +5299,7 @@ declare function roomMorph(samples: Float32Array, sampleRate: number, options?:
|
|
|
4344
5299
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
4345
5300
|
* @returns Complete analysis result
|
|
4346
5301
|
*/
|
|
5302
|
+
declare function analyzeWithProgress(request: AnalyzeWithProgressRequest): AnalysisResult;
|
|
4347
5303
|
declare function analyzeWithProgress(samples: Float32Array, sampleRate: number | undefined, onProgress: ProgressCallback): AnalysisResult;
|
|
4348
5304
|
interface BpmCandidate {
|
|
4349
5305
|
bpm: number;
|
|
@@ -4400,19 +5356,23 @@ interface TimbreAnalysisResult extends TimbreFrame {
|
|
|
4400
5356
|
* Detailed BPM analysis (BPM, confidence, alternate candidates, autocorrelation,
|
|
4401
5357
|
* tempogram). Matches the Node `analyzeBpm` / Python `analyze_bpm` surface.
|
|
4402
5358
|
*/
|
|
5359
|
+
declare function analyzeBpm(request: AnalyzeBpmRequest): BpmAnalysisResult;
|
|
4403
5360
|
declare function analyzeBpm(samples: Float32Array, sampleRate?: number, options?: AnalyzeBpmOptions): BpmAnalysisResult;
|
|
4404
5361
|
/**
|
|
4405
5362
|
* Detailed rhythm analysis (time signature, groove, syncopation, beat intervals).
|
|
4406
5363
|
*/
|
|
5364
|
+
declare function analyzeRhythm(request: AnalyzeRhythmRequest): RhythmAnalysisResult;
|
|
4407
5365
|
declare function analyzeRhythm(samples: Float32Array, sampleRate?: number, options?: AnalyzeRhythmOptions): RhythmAnalysisResult;
|
|
4408
5366
|
/**
|
|
4409
5367
|
* Dynamics analysis (RMS, peak, crest factor, LRA, loudness curve).
|
|
4410
5368
|
*/
|
|
5369
|
+
declare function analyzeDynamics(request: AnalyzeDynamicsRequest): DynamicsAnalysisResult;
|
|
4411
5370
|
declare function analyzeDynamics(samples: Float32Array, sampleRate?: number, options?: AnalyzeDynamicsOptions): DynamicsAnalysisResult;
|
|
4412
5371
|
/**
|
|
4413
5372
|
* Timbre analysis (brightness/warmth/density/roughness/complexity plus spectral
|
|
4414
5373
|
* features and per-window timbre frames).
|
|
4415
5374
|
*/
|
|
5375
|
+
declare function analyzeTimbre(request: AnalyzeTimbreRequest): TimbreAnalysisResult;
|
|
4416
5376
|
declare function analyzeTimbre(samples: Float32Array, sampleRate?: number, options?: AnalyzeTimbreOptions): TimbreAnalysisResult;
|
|
4417
5377
|
/**
|
|
4418
5378
|
* Whether this WASM build was compiled with FFmpeg support. Mirrors Node /
|
|
@@ -4494,6 +5454,8 @@ interface AnalyzerStats {
|
|
|
4494
5454
|
durationSeconds: number;
|
|
4495
5455
|
pendingFrames: number;
|
|
4496
5456
|
droppedOutputFrames: number;
|
|
5457
|
+
droppedChordProgressionEntries: number;
|
|
5458
|
+
droppedBarProgressionEntries: number;
|
|
4497
5459
|
estimate: ProgressiveEstimate;
|
|
4498
5460
|
}
|
|
4499
5461
|
/**
|
|
@@ -4503,6 +5465,10 @@ interface FrameBuffer {
|
|
|
4503
5465
|
nFrames: number;
|
|
4504
5466
|
/** Number of mel bands; flat `mel` is `[nFrames * nMels]` row-major. */
|
|
4505
5467
|
nMels: number;
|
|
5468
|
+
/** Chroma stride: 12 when enabled, otherwise 0. */
|
|
5469
|
+
nChroma: number;
|
|
5470
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5471
|
+
featureFlags: number;
|
|
4506
5472
|
timestamps: Float32Array;
|
|
4507
5473
|
/**
|
|
4508
5474
|
* Mel spectrogram in LINEAR power (not dB) — the raw per-frame mel energies.
|
|
@@ -4540,6 +5506,9 @@ interface StreamQuantizeConfig {
|
|
|
4540
5506
|
interface StreamFramesU8 {
|
|
4541
5507
|
nFrames: number;
|
|
4542
5508
|
nMels: number;
|
|
5509
|
+
nChroma: number;
|
|
5510
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5511
|
+
featureFlags: number;
|
|
4543
5512
|
timestamps: Float32Array;
|
|
4544
5513
|
/** Row-major `[nFrames * nMels]` mel in dB, quantized over `[melDbMin, melDbMax]`. */
|
|
4545
5514
|
mel: Uint8Array;
|
|
@@ -4552,6 +5521,9 @@ interface StreamFramesU8 {
|
|
|
4552
5521
|
interface StreamFramesI16 {
|
|
4553
5522
|
nFrames: number;
|
|
4554
5523
|
nMels: number;
|
|
5524
|
+
nChroma: number;
|
|
5525
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5526
|
+
featureFlags: number;
|
|
4555
5527
|
timestamps: Float32Array;
|
|
4556
5528
|
/** Row-major `[nFrames * nMels]` mel in dB, quantized over `[melDbMin, melDbMax]`. */
|
|
4557
5529
|
mel: Int16Array;
|
|
@@ -4584,11 +5556,14 @@ interface StreamConfig {
|
|
|
4584
5556
|
computeSpectral?: boolean;
|
|
4585
5557
|
emitEveryNFrames?: number;
|
|
4586
5558
|
magnitudeDownsample?: number;
|
|
4587
|
-
/** Maximum unread frames; overflow drops the
|
|
5559
|
+
/** Maximum unread frames; overflow drops the newly produced frame. */
|
|
4588
5560
|
maxPendingFrames?: number;
|
|
5561
|
+
/** Maximum retained chord and bar progression entries; overflow drops oldest. */
|
|
5562
|
+
maxProgressionEntries?: number;
|
|
4589
5563
|
keyUpdateIntervalSec?: number;
|
|
4590
5564
|
bpmUpdateIntervalSec?: number;
|
|
4591
5565
|
window?: number;
|
|
5566
|
+
/** @deprecated Must be 0 (Float32). Use readFramesU8/readFramesI16 explicitly. */
|
|
4592
5567
|
outputFormat?: number;
|
|
4593
5568
|
}
|
|
4594
5569
|
type StreamConfigDefaults = Required<StreamConfig>;
|
|
@@ -4614,6 +5589,16 @@ declare function streamAnalyzerConfigDefaults(): StreamConfigDefaults;
|
|
|
4614
5589
|
* console.log('Key:', stats.estimate.key);
|
|
4615
5590
|
* console.log('Chord progression:', stats.estimate.chordProgression);
|
|
4616
5591
|
* ```
|
|
5592
|
+
*
|
|
5593
|
+
* The native analyzer supports one serialized producer (`process`,
|
|
5594
|
+
* `processWithOffset`, or `finalize`) concurrently with one serialized consumer
|
|
5595
|
+
* (`availableFrames`, a `readFrames*` method, `stats`, `frameCount`, or
|
|
5596
|
+
* `currentTime`) when a threaded WASM host shares the native instance.
|
|
5597
|
+
* Publication is allocation-free release/acquire. `reset`, setters, and
|
|
5598
|
+
* deletion require both roles to be stopped. A full pending ring drops the
|
|
5599
|
+
* newly produced output frame while analysis totals keep advancing. Ordinary
|
|
5600
|
+
* browser builds remain single-threaded unless the host explicitly provisions
|
|
5601
|
+
* shared-memory worker support.
|
|
4617
5602
|
*/
|
|
4618
5603
|
declare class StreamAnalyzer {
|
|
4619
5604
|
private analyzer;
|
|
@@ -4630,14 +5615,15 @@ declare class StreamAnalyzer {
|
|
|
4630
5615
|
*/
|
|
4631
5616
|
process(samples: Float32Array): void;
|
|
4632
5617
|
/**
|
|
4633
|
-
* Process audio samples with explicit sample offset.
|
|
5618
|
+
* Process audio samples with a contiguous explicit sample offset. A gap,
|
|
5619
|
+
* seek, or switch from `process()` requires `reset()` first.
|
|
4634
5620
|
*
|
|
4635
5621
|
* @param samples - Audio samples (mono, float32)
|
|
4636
5622
|
* @param sampleOffset - Cumulative sample count at start of this chunk
|
|
4637
5623
|
*/
|
|
4638
5624
|
processWithOffset(samples: Float32Array, sampleOffset: number): void;
|
|
4639
5625
|
/**
|
|
4640
|
-
*
|
|
5626
|
+
* Drain any high-rate resampler tail, then zero-pad the final partial frame.
|
|
4641
5627
|
*/
|
|
4642
5628
|
finalize(): void;
|
|
4643
5629
|
/**
|
|
@@ -4752,6 +5738,7 @@ interface MixerRealtimeBuffer {
|
|
|
4752
5738
|
*/
|
|
4753
5739
|
declare class Mixer {
|
|
4754
5740
|
private mixer;
|
|
5741
|
+
private readonly blockSize;
|
|
4755
5742
|
private constructor();
|
|
4756
5743
|
/**
|
|
4757
5744
|
* Build a mixer from a scene JSON string.
|
|
@@ -4975,7 +5962,7 @@ declare class Mixer {
|
|
|
4975
5962
|
/** Serialize the current scene (strips, buses, sends, connections) to JSON. */
|
|
4976
5963
|
toSceneJson(): string;
|
|
4977
5964
|
/**
|
|
4978
|
-
*
|
|
5965
|
+
* Longest audible serial processor-tail path to the master, in samples. Lazily
|
|
4979
5966
|
* compiles the routing graph if the topology is dirty.
|
|
4980
5967
|
*/
|
|
4981
5968
|
tailSamples(): number;
|
|
@@ -5414,4 +6401,4 @@ declare function voiceCharacterPresetId(preset: VoicePresetId | number): string
|
|
|
5414
6401
|
*/
|
|
5415
6402
|
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig | null;
|
|
5416
6403
|
|
|
5417
|
-
export { type AcousticOptions, type AcousticResult, type AnalysisResult, type AnalyzeBpmOptions, type AnalyzeDynamicsOptions, type AnalyzeRhythmOptions, type AnalyzeSectionsOptions, type AnalyzeTimbreOptions, type AnalyzerStats, Audio, type AutomationCurve, type BarChord, type Beat, type BindMicrophoneInputOptions, type BindWebMidiOptions, type BpmAnalysisResult, type BpmCandidate, type BrowserAudioDecodeOptions, type BuiltinSynthBinding, type BuiltinSynthConfig, type BuiltinSynthWaveform, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, ChordQuality, type ChromaResult, type ClipPageStreamSource, ClipPageStreamer, type ClipPageStreamerEngine, type ClipPageStreamerOptions, type ClippingRegion, type ClippingReport, type CompressorDetector, type CompressorOptions, type CqtResult, type DeclickOptions, type DeclipOptions, type DecomposeResult, type DecrackleMode, type DecrackleOptions, type DehumOptions, type DenoiseClassicalMode, type DenoiseClassicalNoiseEstimator, type DenoiseClassicalOptions, type DereverbClassicalOptions, type DynamicRangeReport, type Dynamics, type DynamicsAnalysisResult, type DynamicsResult, EXPECTED_ENGINE_ABI_VERSION, EXPECTED_PROJECT_ABI_VERSION, type EngineAutomationPoint, type EngineBounceOptions, type EngineBounceResult, type EngineBus, type EngineCapabilities, 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 EngineTrackSend, type EngineTransportState, type EqBand, type EqBandPhase, type EqBandType, type EqCoeffMode, type EqMatchOptions, type EqSpectrumSnapshot, type EqStereoPlacement, ErrorCode, type FrameBuffer, type GateOptions, type GoniometerPoint, type HpssResult, type HpssWithResidualResult, type Key, type KeyCandidate, type KeyDetectionOptions, KeyProfile, type KeyProfileName, type LufsResult, MarkerKind, type MasteringChainConfig, type MasteringChainResult, type MasteringChannelPolicy, type MasteringInsertParamInfo, type MasteringOptions, type MasteringPreset, type MasteringProcessorCatalogEntry, type MasteringProcessorParams, type MasteringResult, type MasteringStereoChainResult, type MasteringStereoResult, type Matrix2dResult, type MelPowerResult, type MelSpectrogramResult, type MelodyOptions, type MelodyPoint, type MelodyResult, type MeterTap, type MeteringDetectClippingOptions, type MeteringDynamicRangeOptions, type MfccResult, type MicrophoneInputBinding, type MidiCcBindOptions, type MidiCcLearnOptions, type MixMeterSnapshot, type MixOptions, type MixResult, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type NoteStretchOptions, type OpfsClipPageProviderBinding, type OpfsClipPageProviderOptions, type OpfsClipStream, type OpfsClipStreamOptions, type PairAnalysis, type PairProcessor, type PanLaw, type PanMode, type PatternScore, type PhaseScopeReport, PitchClass as Pitch, PitchClass, type PitchCorrectOptions, type PitchResult, type ProgressiveEstimate, Project, type ProjectAssistSidecar, type ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, type ProjectBounceOptions, type ProjectChordSymbol, 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 ProjectTrackDesc, type ProjectTrackKind, type ProjectWarpAnchor, type ProjectWarpMapDesc, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, type RhythmAnalysisResult, type RhythmFeatures, type RirResult, type RirSynthOptions, type RoomEstimateOptions, type RoomEstimateResult, type RoomGeometryOptions, type RoomMorphOptions, SYNTH_BODY_TYPES, SYNTH_ENGINE_MODES, SYNTH_FILTER_MODELS, SYNTH_FILTER_OUTPUTS, SYNTH_MOD_DESTINATIONS, SYNTH_MOD_SOURCES, SYNTH_OSC_WAVEFORMS, type Section, SectionType, type SendTiming, type Sf2InstrumentConfig, type Sf2ProgramStatus, type SoloProcessor, SonareError, type SourceBackend, type SpectralEditMode, type SpectralEditOptions, type SpectralEditWindow, type SpectralRegionOp, type SpectrumOptions, type SpectrumReport, 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 Timbre, type TimbreAnalysisResult, type TimbreFrame, type TimeSignature, type TransientShaperOptions, type TrimSilenceMode, type TrimSilenceOptions, type ValidateOptions, type VectorscopeReport, type VoiceChangeOptions, type VoiceChangeRealtimeOptions, type VoicePresetId, type WaveformPeakPyramidOptions, type WaveformPeaksOptions, type WaveformPeaksReport, type WebMidiBinding, type WebMidiCcBinding, type WebMidiInputInfo, abiVersion, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, attachOpfsClipStream, bassChroma, bindMicrophoneInput, bindWebMidi, chordFunctionalAnalysis, chroma, chromaCens, chromaCqt, cqt, 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, 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, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringPhaseScopeDecimated, meteringRmsDb, meteringSpectrum, meteringSpectrumFrame, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, meteringVectorscopeDecimated, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteStretch, noteToHz, onsetEnvelope, onsetStrengthMulti, opfsClipPageWorkerSource, padCenter, pcen, peakPick, percussive, phaseVocoder, pitchCorrectTimevarying, pitchCorrectToMidi, pitchCorrectToMidiTimevarying, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, projectAbiVersion, pseudoCqt, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralEdit, spectralFlatness, spectralRolloff, splitSilence, stft, stftDb, streamAnalyzerConfigDefaults, synthEnumTables, synthPresetNames, synthPresetPatch, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, waveformPeakPyramid, waveformPeaks, zeroCrossingRate, zeroCrossings };
|
|
6404
|
+
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, type BarChord, type Beat, type BindMicrophoneInputOptions, type BindWebMidiOptions, type BpmAnalysisResult, type BpmCandidate, type BrowserAudioDecodeOptions, type BuiltinSynthBinding, type BuiltinSynthConfig, type BuiltinSynthWaveform, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, type ChordFunctionalAnalysisRequest, ChordQuality, type ChromaResult, type ChromaSpectrogramRequest, type ClipPageRequest, type ClipPageStreamSource, ClipPageStreamer, type ClipPageStreamerEngine, type ClipPageStreamerOptions, 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 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 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 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 FixFramesRequest, type FixLengthRequest, type FourierTempogramRequest, type FrameBuffer, type FrameSignalRequest, type GateOptions, type GoniometerPoint, 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 MasteringOptions, type MasteringPairAnalyzeRequest, type MasteringPairProcessRequest, type MasteringPreset, type MasteringProcessRequest, type MasteringProcessStereoRequest, type MasteringProcessorCatalogEntry, type MasteringProcessorParams, type MasteringRepairDeclickRequest, type MasteringRepairDeclipRequest, type MasteringRepairDecrackleRequest, type MasteringRepairDehumRequest, type MasteringRepairDenoiseClassicalRequest, type MasteringRepairDereverbClassicalRequest, type MasteringRepairTrimSilenceRequest, type MasteringRequest, type MasteringResult, type MasteringSamplesParamsRequest, type MasteringStereoAnalyzeRequest, type MasteringStereoChainResult, type MasteringStereoResult, type MasteringStreamingPreviewRequest, type Matrix2dResult, 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 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 NnFilterRequest, type NnlsChromaRequest, type NormalizeRequest, type NoteMoveRequest, type NoteStretchOptions, type NoteStretchRequest, type OnsetEnvelopeRequest, type OnsetStrengthMultiRequest, type OpfsClipPageProviderBinding, type OpfsClipPageProviderOptions, type OpfsClipStream, type OpfsClipStreamOptions, type PadCenterRequest, type PairAnalysis, type PairProcessor, type PanLaw, type PanMode, type PatternScore, type PcenRequest, type PeakPickRequest, type PercussiveRequest, type PhaseScopeReport, type PhaseVocoderRequest, 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 ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, type ProjectBounceOptions, type ProjectChordSymbol, 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 ProjectTrackDesc, type ProjectTrackKind, type ProjectWarpAnchor, type ProjectWarpMapDesc, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, 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 SendTiming, type Sf2InstrumentConfig, type Sf2ProgramStatus, type SilenceRequest, type SoloProcessor, 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 TonnetzRequest, 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 ZeroCrossingRateRequest, type ZeroCrossingsRequest, abiVersion, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, attachOpfsClipStream, bassChroma, bindMicrophoneInput, bindWebMidi, chordFunctionalAnalysis, chroma, chromaCens, chromaCqt, 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, 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, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringPhaseScopeDecimated, meteringRmsDb, meteringSpectrum, meteringSpectrumFrame, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, meteringVectorscopeDecimated, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteMove, noteStretch, noteToHz, onsetEnvelope, onsetStrengthMulti, opfsClipPageWorkerSource, padCenter, pcen, peakPick, percussive, phaseVocoder, pitchCorrectTimevarying, pitchCorrectToMidi, pitchCorrectToMidiTimevarying, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, projectAbiVersion, pseudoCqt, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralEdit, spectralFlatness, spectralRolloff, splitSilence, stft, stftDb, streamAnalyzerConfigDefaults, synthEnumTables, synthPresetNames, synthPresetPatch, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, vqtToAudio, waveformPeakPyramid, waveformPeaks, zeroCrossingRate, zeroCrossings };
|