@libraz/libsonare 1.5.2 → 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 +1147 -181
- package/dist/index.js +4826 -3941
- 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 +1067 -973
- 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 +357 -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/index.ts +130 -1
- package/src/mastering_chain.ts +305 -50
- package/src/mastering_core.ts +232 -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 +9 -2
- 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_spectral.ts +7 -0
- package/src/quick_analysis.ts +325 -117
- package/src/realtime_engine.ts +8 -0
- package/src/sonare.js.d.ts +31 -0
- package/src/stream_analyzer.ts +20 -1
- package/src/stream_types.ts +12 -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;
|
|
@@ -904,6 +1010,12 @@ interface NoteStretchOptions {
|
|
|
904
1010
|
/** Stretch ratio (0.5 = double duration, 2.0 = half duration). Default 1. */
|
|
905
1011
|
stretchRatio?: number;
|
|
906
1012
|
}
|
|
1013
|
+
/** Options for `noteMove`. */
|
|
1014
|
+
interface NoteMoveOptions {
|
|
1015
|
+
onsetSample?: number;
|
|
1016
|
+
offsetSample?: number;
|
|
1017
|
+
targetOnsetSample?: number;
|
|
1018
|
+
}
|
|
907
1019
|
/** How a `spectralEdit` region op modifies the masked bins. */
|
|
908
1020
|
type SpectralEditMode = 'gain' | 'attenuate' | 'mute' | 'heal';
|
|
909
1021
|
/** Analysis/synthesis window used by `spectralEdit`. */
|
|
@@ -1047,6 +1159,70 @@ interface HpssResult {
|
|
|
1047
1159
|
sampleRate: number;
|
|
1048
1160
|
}
|
|
1049
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
|
+
}
|
|
1050
1226
|
/**
|
|
1051
1227
|
* Perform Harmonic-Percussive Source Separation (HPSS).
|
|
1052
1228
|
*
|
|
@@ -1056,6 +1232,7 @@ interface HpssResult {
|
|
|
1056
1232
|
* @param kernelPercussive - Vertical median filter size for percussive (default: 31)
|
|
1057
1233
|
* @returns Separated harmonic and percussive components
|
|
1058
1234
|
*/
|
|
1235
|
+
declare function hpss(request: HpssRequest): HpssResult;
|
|
1059
1236
|
declare function hpss(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): HpssResult;
|
|
1060
1237
|
/**
|
|
1061
1238
|
* Extract harmonic component from audio.
|
|
@@ -1064,7 +1241,8 @@ declare function hpss(samples: Float32Array, sampleRate?: number, kernelHarmonic
|
|
|
1064
1241
|
* @param sampleRate - Sample rate in Hz
|
|
1065
1242
|
* @returns Harmonic component
|
|
1066
1243
|
*/
|
|
1067
|
-
declare function harmonic(
|
|
1244
|
+
declare function harmonic(request: HarmonicRequest): Float32Array;
|
|
1245
|
+
declare function harmonic(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
1068
1246
|
/**
|
|
1069
1247
|
* Extract percussive component from audio.
|
|
1070
1248
|
*
|
|
@@ -1072,7 +1250,8 @@ declare function harmonic(samples: Float32Array, sampleRate: number, options?: V
|
|
|
1072
1250
|
* @param sampleRate - Sample rate in Hz
|
|
1073
1251
|
* @returns Percussive component
|
|
1074
1252
|
*/
|
|
1075
|
-
declare function percussive(
|
|
1253
|
+
declare function percussive(request: PercussiveRequest): Float32Array;
|
|
1254
|
+
declare function percussive(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
1076
1255
|
/**
|
|
1077
1256
|
* Time-stretch audio without changing pitch.
|
|
1078
1257
|
*
|
|
@@ -1081,6 +1260,7 @@ declare function percussive(samples: Float32Array, sampleRate: number, options?:
|
|
|
1081
1260
|
* @param rate - Time stretch rate (0.5 = double duration, 2.0 = half duration)
|
|
1082
1261
|
* @returns Time-stretched audio
|
|
1083
1262
|
*/
|
|
1263
|
+
declare function timeStretch(request: TimeStretchRequest): Float32Array;
|
|
1084
1264
|
declare function timeStretch(samples: Float32Array, sampleRate: number, rate: number, options?: ValidateOptions): Float32Array;
|
|
1085
1265
|
/**
|
|
1086
1266
|
* Pitch-shift audio without changing duration.
|
|
@@ -1090,6 +1270,7 @@ declare function timeStretch(samples: Float32Array, sampleRate: number, rate: nu
|
|
|
1090
1270
|
* @param semitones - Pitch shift in semitones (+12 = one octave up, -12 = one octave down)
|
|
1091
1271
|
* @returns Pitch-shifted audio
|
|
1092
1272
|
*/
|
|
1273
|
+
declare function pitchShift(request: PitchShiftRequest): Float32Array;
|
|
1093
1274
|
declare function pitchShift(samples: Float32Array, sampleRate: number, semitones: number, options?: ValidateOptions): Float32Array;
|
|
1094
1275
|
/**
|
|
1095
1276
|
* Pitch-correct audio from a current MIDI note to a target MIDI note.
|
|
@@ -1100,6 +1281,7 @@ declare function pitchShift(samples: Float32Array, sampleRate: number, semitones
|
|
|
1100
1281
|
* @param targetMidi - Desired MIDI note number
|
|
1101
1282
|
* @returns Pitch-corrected audio
|
|
1102
1283
|
*/
|
|
1284
|
+
declare function pitchCorrectToMidi(request: PitchCorrectToMidiRequest): Float32Array;
|
|
1103
1285
|
declare function pitchCorrectToMidi(samples: Float32Array, sampleRate?: number, currentMidi?: number, targetMidi?: number, options?: ValidateOptions): Float32Array;
|
|
1104
1286
|
/**
|
|
1105
1287
|
* Contour-following ("time-varying") pitch correction toward a MIDI target.
|
|
@@ -1119,6 +1301,7 @@ declare function pitchCorrectToMidi(samples: Float32Array, sampleRate?: number,
|
|
|
1119
1301
|
* @param voicedProb - Optional per-frame voicing probability in [0, 1]
|
|
1120
1302
|
* @returns Pitch-corrected audio
|
|
1121
1303
|
*/
|
|
1304
|
+
declare function pitchCorrectToMidiTimevarying(request: PitchCorrectToMidiTimevaryingRequest): Float32Array;
|
|
1122
1305
|
declare function pitchCorrectToMidiTimevarying(samples: Float32Array, f0Hz: Float32Array, targetMidi: number, sampleRate?: number, hopLength?: number, voiced?: Int32Array, voicedProb?: Float32Array, options?: ValidateOptions): Float32Array;
|
|
1123
1306
|
/**
|
|
1124
1307
|
* Contour-following pitch correction toward a fixed MIDI note OR a musical
|
|
@@ -1136,6 +1319,7 @@ declare function pitchCorrectToMidiTimevarying(samples: Float32Array, f0Hz: Floa
|
|
|
1136
1319
|
* @param options - Target mode + retune knobs + optional voiced/voicedProb arrays
|
|
1137
1320
|
* @returns Pitch-corrected audio
|
|
1138
1321
|
*/
|
|
1322
|
+
declare function pitchCorrectTimevarying(request: PitchCorrectTimevaryingRequest): Float32Array;
|
|
1139
1323
|
declare function pitchCorrectTimevarying(samples: Float32Array, f0Hz: Float32Array, sampleRate?: number, hopLength?: number, options?: PitchCorrectOptions): Float32Array;
|
|
1140
1324
|
/**
|
|
1141
1325
|
* Time-stretch a note region between two sample offsets without changing pitch.
|
|
@@ -1147,7 +1331,11 @@ declare function pitchCorrectTimevarying(samples: Float32Array, f0Hz: Float32Arr
|
|
|
1147
1331
|
* @param stretchRatio - Stretch ratio (0.5 = double duration, 2.0 = half duration)
|
|
1148
1332
|
* @returns Audio with the note region stretched
|
|
1149
1333
|
*/
|
|
1334
|
+
declare function noteStretch(request: NoteStretchRequest): Float32Array;
|
|
1150
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;
|
|
1151
1339
|
/**
|
|
1152
1340
|
* Normalize audio to target peak level.
|
|
1153
1341
|
*
|
|
@@ -1156,6 +1344,7 @@ declare function noteStretch(samples: Float32Array, sampleRate?: number, options
|
|
|
1156
1344
|
* @param targetDb - Target peak level in dB (default: 0 dB = full scale)
|
|
1157
1345
|
* @returns Normalized audio
|
|
1158
1346
|
*/
|
|
1347
|
+
declare function normalize(request: NormalizeRequest): Float32Array;
|
|
1159
1348
|
declare function normalize(samples: Float32Array, sampleRate: number, targetDb?: number, options?: ValidateOptions): Float32Array;
|
|
1160
1349
|
/**
|
|
1161
1350
|
* Apply region-based spectral edits (gain/attenuate/mute/heal) to mono audio.
|
|
@@ -1171,6 +1360,7 @@ declare function normalize(samples: Float32Array, sampleRate: number, targetDb?:
|
|
|
1171
1360
|
* @param options - STFT + heal configuration ({@link SpectralEditOptions})
|
|
1172
1361
|
* @returns Edited audio
|
|
1173
1362
|
*/
|
|
1363
|
+
declare function spectralEdit(request: SpectralEditRequest): Float32Array;
|
|
1174
1364
|
declare function spectralEdit(samples: Float32Array, sampleRate: number, ops?: SpectralRegionOp[], options?: SpectralEditOptions & ValidateOptions): Float32Array;
|
|
1175
1365
|
|
|
1176
1366
|
/** Options for {@link voiceChange}. All fields are optional. */
|
|
@@ -1180,6 +1370,11 @@ interface VoiceChangeOptions extends ValidateOptions {
|
|
|
1180
1370
|
/** Formant scale factor (>1 brightens, <1 darkens). Default 1. */
|
|
1181
1371
|
formantFactor?: number;
|
|
1182
1372
|
}
|
|
1373
|
+
/** Canonical request form for one-shot voice changing. */
|
|
1374
|
+
interface VoiceChangeRequest extends VoiceChangeOptions {
|
|
1375
|
+
samples: Float32Array;
|
|
1376
|
+
sampleRate?: number;
|
|
1377
|
+
}
|
|
1183
1378
|
/**
|
|
1184
1379
|
* Apply a voice change by shifting pitch and formants independently.
|
|
1185
1380
|
*
|
|
@@ -1188,21 +1383,27 @@ interface VoiceChangeOptions extends ValidateOptions {
|
|
|
1188
1383
|
* @param options - Pitch/formant settings ({@link VoiceChangeOptions})
|
|
1189
1384
|
* @returns Voice-changed audio
|
|
1190
1385
|
*/
|
|
1386
|
+
declare function voiceChange(request: VoiceChangeRequest): Float32Array;
|
|
1191
1387
|
declare function voiceChange(samples: Float32Array, sampleRate?: number, options?: VoiceChangeOptions): Float32Array;
|
|
1192
1388
|
/** Options for the offline {@link voiceChangeRealtime} convenience wrapper. */
|
|
1193
1389
|
interface VoiceChangeRealtimeOptions extends ValidateOptions {
|
|
1194
1390
|
/** Channel count (1 = mono, 2 = interleaved stereo). */
|
|
1195
1391
|
channels?: 1 | 2;
|
|
1196
|
-
/**
|
|
1392
|
+
/** @deprecated The shared C-ABI renderer uses a fixed cross-surface block size. */
|
|
1197
1393
|
blockSize?: number;
|
|
1198
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
|
+
}
|
|
1199
1401
|
/**
|
|
1200
1402
|
* Applies the realtime voice-changer chain to a whole buffer in one call.
|
|
1201
1403
|
*
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1205
|
-
* 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,...).
|
|
1206
1407
|
*
|
|
1207
1408
|
* @param samples - Audio samples (mono, or interleaved stereo when channels=2)
|
|
1208
1409
|
* @param sampleRate - Sample rate in Hz (default 48000, matching Python/Node)
|
|
@@ -1210,8 +1411,39 @@ interface VoiceChangeRealtimeOptions extends ValidateOptions {
|
|
|
1210
1411
|
* @param options - Channel count and block size ({@link VoiceChangeRealtimeOptions})
|
|
1211
1412
|
* @returns The processed buffer (same layout/length as the input).
|
|
1212
1413
|
*/
|
|
1414
|
+
declare function voiceChangeRealtime(request: VoiceChangeRealtimeRequest): Float32Array;
|
|
1213
1415
|
declare function voiceChangeRealtime(samples: Float32Array, sampleRate?: number, preset?: RealtimeVoiceChangerConfigInput, options?: VoiceChangeRealtimeOptions): Float32Array;
|
|
1214
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
|
+
}
|
|
1215
1447
|
/**
|
|
1216
1448
|
* Apply a configurable mastering chain in WASM.
|
|
1217
1449
|
*
|
|
@@ -1220,7 +1452,8 @@ declare function voiceChangeRealtime(samples: Float32Array, sampleRate?: number,
|
|
|
1220
1452
|
* @param config - Chain stage configuration
|
|
1221
1453
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1222
1454
|
*/
|
|
1223
|
-
declare function masteringChain(
|
|
1455
|
+
declare function masteringChain(request: MasteringChainRequest): MasteringChainResult;
|
|
1456
|
+
declare function masteringChain(samples: Float32Array, sampleRate?: number, config?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainResult;
|
|
1224
1457
|
/**
|
|
1225
1458
|
* Apply a configurable stereo mastering chain in WASM.
|
|
1226
1459
|
*
|
|
@@ -1230,7 +1463,8 @@ declare function masteringChain(samples: Float32Array, sampleRate: number | unde
|
|
|
1230
1463
|
* @param config - Chain stage configuration
|
|
1231
1464
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1232
1465
|
*/
|
|
1233
|
-
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;
|
|
1234
1468
|
/**
|
|
1235
1469
|
* Apply a configurable mastering chain in WASM with progress reporting.
|
|
1236
1470
|
*
|
|
@@ -1240,7 +1474,8 @@ declare function masteringChainStereo(left: Float32Array, right: Float32Array, s
|
|
|
1240
1474
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
1241
1475
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1242
1476
|
*/
|
|
1243
|
-
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;
|
|
1244
1479
|
/**
|
|
1245
1480
|
* Apply a configurable stereo mastering chain in WASM with progress reporting.
|
|
1246
1481
|
*
|
|
@@ -1251,7 +1486,8 @@ declare function masteringChainWithProgress(samples: Float32Array, sampleRate: n
|
|
|
1251
1486
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
1252
1487
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1253
1488
|
*/
|
|
1254
|
-
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;
|
|
1255
1491
|
/**
|
|
1256
1492
|
* List built-in mastering preset identifiers.
|
|
1257
1493
|
*
|
|
@@ -1264,10 +1500,12 @@ declare function masteringPresetNames(): MasteringPreset[];
|
|
|
1264
1500
|
* @param samples - Audio samples (mono, float32)
|
|
1265
1501
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1266
1502
|
* @param presetName - Preset identifier from {@link masteringPresetNames}
|
|
1267
|
-
* @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).
|
|
1268
1505
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1269
1506
|
*/
|
|
1270
|
-
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;
|
|
1271
1509
|
/**
|
|
1272
1510
|
* Apply a named mastering preset chain to stereo audio.
|
|
1273
1511
|
*
|
|
@@ -1275,20 +1513,78 @@ declare function masterAudio(samples: Float32Array, sampleRate?: number, presetN
|
|
|
1275
1513
|
* @param right - Right channel samples
|
|
1276
1514
|
* @param sampleRate - Sample rate in Hz
|
|
1277
1515
|
* @param presetName - Preset identifier from {@link masteringPresetNames}
|
|
1278
|
-
* @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).
|
|
1279
1518
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1280
1519
|
*/
|
|
1281
|
-
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;
|
|
1282
1522
|
/**
|
|
1283
1523
|
* Mono `masterAudio` with per-stage progress reporting. `onProgress` is invoked
|
|
1284
1524
|
* with `(progress, stage)` between each chain stage (progress is in [0,1]).
|
|
1285
1525
|
*/
|
|
1286
|
-
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;
|
|
1287
1528
|
/**
|
|
1288
1529
|
* Stereo `masterAudio` with per-stage progress reporting.
|
|
1289
1530
|
*/
|
|
1290
|
-
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;
|
|
1291
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
|
+
}
|
|
1292
1588
|
/**
|
|
1293
1589
|
* Apply mastering loudness normalization with a true-peak ceiling.
|
|
1294
1590
|
*
|
|
@@ -1297,6 +1593,7 @@ declare function masterAudioStereoWithProgress(left: Float32Array, right: Float3
|
|
|
1297
1593
|
* @param options - Loudness/ceiling settings ({@link MasteringOptions})
|
|
1298
1594
|
* @returns Processed audio and loudness metadata
|
|
1299
1595
|
*/
|
|
1596
|
+
declare function mastering(request: MasteringRequest): MasteringResult;
|
|
1300
1597
|
declare function mastering(samples: Float32Array, sampleRate?: number, options?: MasteringOptions): MasteringResult;
|
|
1301
1598
|
declare function masteringProcessorNames(): SoloProcessor[];
|
|
1302
1599
|
/**
|
|
@@ -1385,22 +1682,30 @@ declare function masteringProcessorCatalog(): MasteringProcessorCatalogEntry[];
|
|
|
1385
1682
|
declare function masteringPairProcessorNames(): PairProcessor[];
|
|
1386
1683
|
declare function masteringPairAnalysisNames(): PairAnalysis[];
|
|
1387
1684
|
declare function masteringStereoAnalysisNames(): StereoAnalysis[];
|
|
1685
|
+
declare function masteringProcess(request: MasteringProcessRequest): MasteringResult;
|
|
1388
1686
|
declare function masteringProcess(processorName: SoloProcessor, samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringResult;
|
|
1687
|
+
declare function masteringProcessStereo(request: MasteringProcessStereoRequest): MasteringStereoResult;
|
|
1389
1688
|
declare function masteringProcessStereo(processorName: SoloProcessor, left: Float32Array, right: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringStereoResult;
|
|
1390
1689
|
/**
|
|
1391
1690
|
* Apply a two-input `match.*` processor. `source` and `reference` may have
|
|
1392
1691
|
* independent lengths — the match primitives consume each buffer at its own
|
|
1393
1692
|
* length.
|
|
1394
1693
|
*/
|
|
1694
|
+
declare function masteringPairProcess(request: MasteringPairProcessRequest): MasteringResult;
|
|
1395
1695
|
declare function masteringPairProcess(processorName: PairProcessor, source: Float32Array, reference: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringResult;
|
|
1396
1696
|
/**
|
|
1397
1697
|
* Analyze a `source` against a `reference` with a two-input analysis. The two
|
|
1398
1698
|
* buffers may have independent lengths.
|
|
1399
1699
|
*/
|
|
1700
|
+
declare function masteringPairAnalyze(request: MasteringPairAnalyzeRequest): string;
|
|
1400
1701
|
declare function masteringPairAnalyze(analysisName: PairAnalysis, source: Float32Array, reference: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1702
|
+
declare function masteringStereoAnalyze(request: MasteringStereoAnalyzeRequest): string;
|
|
1401
1703
|
declare function masteringStereoAnalyze(analysisName: StereoAnalysis, left: Float32Array, right: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1704
|
+
declare function masteringAssistantSuggest(request: MasteringSamplesParamsRequest): string;
|
|
1402
1705
|
declare function masteringAssistantSuggest(samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1706
|
+
declare function masteringAudioProfile(request: MasteringSamplesParamsRequest): string;
|
|
1403
1707
|
declare function masteringAudioProfile(samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1708
|
+
declare function masteringStreamingPreview(request: MasteringStreamingPreviewRequest): string;
|
|
1404
1709
|
declare function masteringStreamingPreview(samples: Float32Array, sampleRate?: number, platforms?: StreamingPlatform[]): string;
|
|
1405
1710
|
|
|
1406
1711
|
/** Compressor sidechain detector mode. */
|
|
@@ -1420,6 +1725,11 @@ interface CompressorOptions extends ValidateOptions {
|
|
|
1420
1725
|
pdrTimeMs?: number;
|
|
1421
1726
|
pdrReleaseScale?: number;
|
|
1422
1727
|
}
|
|
1728
|
+
/** Canonical request form for the offline compressor. */
|
|
1729
|
+
interface MasteringDynamicsCompressorRequest extends CompressorOptions {
|
|
1730
|
+
samples: Float32Array;
|
|
1731
|
+
sampleRate: number;
|
|
1732
|
+
}
|
|
1423
1733
|
/** Options for `masteringDynamicsGate`. */
|
|
1424
1734
|
interface GateOptions extends ValidateOptions {
|
|
1425
1735
|
thresholdDb?: number;
|
|
@@ -1430,6 +1740,11 @@ interface GateOptions extends ValidateOptions {
|
|
|
1430
1740
|
closeThresholdDb?: number;
|
|
1431
1741
|
keyHpfHz?: number;
|
|
1432
1742
|
}
|
|
1743
|
+
/** Canonical request form for the offline gate. */
|
|
1744
|
+
interface MasteringDynamicsGateRequest extends GateOptions {
|
|
1745
|
+
samples: Float32Array;
|
|
1746
|
+
sampleRate: number;
|
|
1747
|
+
}
|
|
1433
1748
|
/** Options for `masteringDynamicsTransientShaper`. */
|
|
1434
1749
|
interface TransientShaperOptions extends ValidateOptions {
|
|
1435
1750
|
attackGainDb?: number;
|
|
@@ -1443,16 +1758,24 @@ interface TransientShaperOptions extends ValidateOptions {
|
|
|
1443
1758
|
gainSmoothingMs?: number;
|
|
1444
1759
|
lookaheadMs?: number;
|
|
1445
1760
|
}
|
|
1761
|
+
/** Canonical request form for the offline transient shaper. */
|
|
1762
|
+
interface MasteringDynamicsTransientShaperRequest extends TransientShaperOptions {
|
|
1763
|
+
samples: Float32Array;
|
|
1764
|
+
sampleRate: number;
|
|
1765
|
+
}
|
|
1446
1766
|
/** Result envelope returned by offline mastering dynamics processors. */
|
|
1447
1767
|
interface DynamicsResult {
|
|
1448
1768
|
samples: Float32Array;
|
|
1449
1769
|
latencySamples: number;
|
|
1450
1770
|
}
|
|
1451
1771
|
/** Offline feed-forward compressor (soft knee, optional auto-makeup / sidechain HPF). */
|
|
1772
|
+
declare function masteringDynamicsCompressor(request: MasteringDynamicsCompressorRequest): DynamicsResult;
|
|
1452
1773
|
declare function masteringDynamicsCompressor(samples: Float32Array, sampleRate: number, options?: CompressorOptions): DynamicsResult;
|
|
1453
1774
|
/** Offline noise gate (hysteresis, hold, optional key HPF). */
|
|
1775
|
+
declare function masteringDynamicsGate(request: MasteringDynamicsGateRequest): DynamicsResult;
|
|
1454
1776
|
declare function masteringDynamicsGate(samples: Float32Array, sampleRate: number, options?: GateOptions): DynamicsResult;
|
|
1455
1777
|
/** Offline transient shaper (envelope-difference attack/sustain control). */
|
|
1778
|
+
declare function masteringDynamicsTransientShaper(request: MasteringDynamicsTransientShaperRequest): DynamicsResult;
|
|
1456
1779
|
declare function masteringDynamicsTransientShaper(samples: Float32Array, sampleRate: number, options?: TransientShaperOptions): DynamicsResult;
|
|
1457
1780
|
|
|
1458
1781
|
/** Options for `masteringRepairDeclick`. */
|
|
@@ -1463,6 +1786,10 @@ interface DeclickOptions {
|
|
|
1463
1786
|
lpcOrder?: number;
|
|
1464
1787
|
residualRatio?: number;
|
|
1465
1788
|
}
|
|
1789
|
+
interface MasteringRepairDeclickRequest extends DeclickOptions {
|
|
1790
|
+
samples: Float32Array;
|
|
1791
|
+
sampleRate: number;
|
|
1792
|
+
}
|
|
1466
1793
|
/** Algorithms accepted by `masteringRepairDenoiseClassical`. */
|
|
1467
1794
|
type DenoiseClassicalMode = 'logMmse' | 'mmseStsa' | 'spectralSubtraction';
|
|
1468
1795
|
/** Noise PSD estimators accepted by `masteringRepairDenoiseClassical`. */
|
|
@@ -1481,9 +1808,15 @@ interface DenoiseClassicalOptions {
|
|
|
1481
1808
|
speechPresenceGain?: boolean;
|
|
1482
1809
|
gainSmoothing?: boolean;
|
|
1483
1810
|
}
|
|
1811
|
+
interface MasteringRepairDenoiseClassicalRequest extends DenoiseClassicalOptions {
|
|
1812
|
+
samples: Float32Array;
|
|
1813
|
+
sampleRate: number;
|
|
1814
|
+
}
|
|
1484
1815
|
/** Offline LPC-based declicker. */
|
|
1816
|
+
declare function masteringRepairDeclick(request: MasteringRepairDeclickRequest): Float32Array;
|
|
1485
1817
|
declare function masteringRepairDeclick(samples: Float32Array, sampleRate: number, options?: DeclickOptions): Float32Array;
|
|
1486
1818
|
/** Offline STFT-domain classical denoiser (LogMMSE / MMSE-STSA / SpectralSubtraction). */
|
|
1819
|
+
declare function masteringRepairDenoiseClassical(request: MasteringRepairDenoiseClassicalRequest): Float32Array;
|
|
1487
1820
|
declare function masteringRepairDenoiseClassical(samples: Float32Array, sampleRate: number, options?: DenoiseClassicalOptions): Float32Array;
|
|
1488
1821
|
/** Options for `masteringRepairDeclip`. */
|
|
1489
1822
|
interface DeclipOptions {
|
|
@@ -1492,6 +1825,10 @@ interface DeclipOptions {
|
|
|
1492
1825
|
iterations?: number;
|
|
1493
1826
|
lpcBlend?: number;
|
|
1494
1827
|
}
|
|
1828
|
+
interface MasteringRepairDeclipRequest extends DeclipOptions {
|
|
1829
|
+
samples: Float32Array;
|
|
1830
|
+
sampleRate: number;
|
|
1831
|
+
}
|
|
1495
1832
|
/** Algorithms accepted by `masteringRepairDecrackle`. */
|
|
1496
1833
|
type DecrackleMode = 'median' | 'waveletShrinkage';
|
|
1497
1834
|
/** Options for `masteringRepairDecrackle`. */
|
|
@@ -1500,6 +1837,10 @@ interface DecrackleOptions {
|
|
|
1500
1837
|
mode?: DecrackleMode;
|
|
1501
1838
|
levels?: number;
|
|
1502
1839
|
}
|
|
1840
|
+
interface MasteringRepairDecrackleRequest extends DecrackleOptions {
|
|
1841
|
+
samples: Float32Array;
|
|
1842
|
+
sampleRate: number;
|
|
1843
|
+
}
|
|
1503
1844
|
/** Options for `masteringRepairDehum`. */
|
|
1504
1845
|
interface DehumOptions {
|
|
1505
1846
|
fundamentalHz?: number;
|
|
@@ -1511,6 +1852,10 @@ interface DehumOptions {
|
|
|
1511
1852
|
frameSize?: number;
|
|
1512
1853
|
pllBandwidth?: number;
|
|
1513
1854
|
}
|
|
1855
|
+
interface MasteringRepairDehumRequest extends DehumOptions {
|
|
1856
|
+
samples: Float32Array;
|
|
1857
|
+
sampleRate: number;
|
|
1858
|
+
}
|
|
1514
1859
|
/** Options for `masteringRepairDereverbClassical`. */
|
|
1515
1860
|
interface DereverbClassicalOptions {
|
|
1516
1861
|
threshold?: number;
|
|
@@ -1526,6 +1871,10 @@ interface DereverbClassicalOptions {
|
|
|
1526
1871
|
wpeTaps?: number;
|
|
1527
1872
|
wpeStrength?: number;
|
|
1528
1873
|
}
|
|
1874
|
+
interface MasteringRepairDereverbClassicalRequest extends DereverbClassicalOptions {
|
|
1875
|
+
samples: Float32Array;
|
|
1876
|
+
sampleRate: number;
|
|
1877
|
+
}
|
|
1529
1878
|
/** Trimming modes accepted by `masteringRepairTrimSilence`. */
|
|
1530
1879
|
type TrimSilenceMode = 'peak' | 'lufsGated';
|
|
1531
1880
|
/** Options for `masteringRepairTrimSilence`. */
|
|
@@ -1536,15 +1885,24 @@ interface TrimSilenceOptions {
|
|
|
1536
1885
|
gateLufs?: number;
|
|
1537
1886
|
windowMs?: number;
|
|
1538
1887
|
}
|
|
1888
|
+
interface MasteringRepairTrimSilenceRequest extends TrimSilenceOptions {
|
|
1889
|
+
samples: Float32Array;
|
|
1890
|
+
sampleRate: number;
|
|
1891
|
+
}
|
|
1539
1892
|
/** Offline LPC-based declipper. */
|
|
1893
|
+
declare function masteringRepairDeclip(request: MasteringRepairDeclipRequest): Float32Array;
|
|
1540
1894
|
declare function masteringRepairDeclip(samples: Float32Array, sampleRate: number, options?: DeclipOptions): Float32Array;
|
|
1541
1895
|
/** Offline crackle suppressor (median or wavelet-shrinkage). */
|
|
1896
|
+
declare function masteringRepairDecrackle(request: MasteringRepairDecrackleRequest): Float32Array;
|
|
1542
1897
|
declare function masteringRepairDecrackle(samples: Float32Array, sampleRate: number, options?: DecrackleOptions): Float32Array;
|
|
1543
1898
|
/** Offline mains-hum remover. */
|
|
1899
|
+
declare function masteringRepairDehum(request: MasteringRepairDehumRequest): Float32Array;
|
|
1544
1900
|
declare function masteringRepairDehum(samples: Float32Array, sampleRate: number, options?: DehumOptions): Float32Array;
|
|
1545
1901
|
/** Offline classical dereverberator (spectral subtraction + optional WPE). */
|
|
1902
|
+
declare function masteringRepairDereverbClassical(request: MasteringRepairDereverbClassicalRequest): Float32Array;
|
|
1546
1903
|
declare function masteringRepairDereverbClassical(samples: Float32Array, sampleRate: number, options?: DereverbClassicalOptions): Float32Array;
|
|
1547
1904
|
/** Offline silence trimmer (peak threshold or LUFS-gated). */
|
|
1905
|
+
declare function masteringRepairTrimSilence(request: MasteringRepairTrimSilenceRequest): Float32Array;
|
|
1548
1906
|
declare function masteringRepairTrimSilence(samples: Float32Array, sampleRate: number, options?: TrimSilenceOptions): Float32Array;
|
|
1549
1907
|
|
|
1550
1908
|
declare function mixingScenePresetNames(): string[];
|
|
@@ -1557,6 +1915,12 @@ declare function mixingScenePresetNames(): string[];
|
|
|
1557
1915
|
* @returns Scene JSON string
|
|
1558
1916
|
*/
|
|
1559
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
|
+
}
|
|
1560
1924
|
/**
|
|
1561
1925
|
* One-shot stereo mix of multiple strips through the routing graph + master bus.
|
|
1562
1926
|
*
|
|
@@ -1572,6 +1936,7 @@ declare function mixingScenePresetJson(presetName: string): string;
|
|
|
1572
1936
|
* @param sampleRate - Sample rate in Hz
|
|
1573
1937
|
* @param options - Per-strip mix options (trim, fader, pan, width, mute)
|
|
1574
1938
|
*/
|
|
1939
|
+
declare function mixStereo(request: MixStereoRequest): MixResult;
|
|
1575
1940
|
declare function mixStereo(leftChannels: Float32Array[], rightChannels: Float32Array[], sampleRate?: number, options?: MixOptions): MixResult;
|
|
1576
1941
|
|
|
1577
1942
|
type BrowserDecodeContext = Pick<BaseAudioContext, 'decodeAudioData' | 'sampleRate'>;
|
|
@@ -1659,11 +2024,12 @@ declare class Audio {
|
|
|
1659
2024
|
pitchShift(semitones: number): Float32Array;
|
|
1660
2025
|
pitchCorrectToMidi(currentMidi?: number, targetMidi?: number): Float32Array;
|
|
1661
2026
|
noteStretch(options?: NoteStretchOptions): Float32Array;
|
|
2027
|
+
noteMove(options?: NoteMoveOptions): Float32Array;
|
|
1662
2028
|
voiceChange(options?: VoiceChangeOptions): Float32Array;
|
|
1663
2029
|
normalize(targetDb?: number): Float32Array;
|
|
1664
2030
|
mastering(options?: MasteringOptions): MasteringResult;
|
|
1665
|
-
masteringChain(config
|
|
1666
|
-
masterAudio(presetName?: MasteringPreset, overrides?:
|
|
2031
|
+
masteringChain(config?: MasteringChainConfig, onProgress?: ProgressCallback): MasteringChainResult;
|
|
2032
|
+
masterAudio(presetName?: MasteringPreset, overrides?: MasteringChainConfig | null, onProgress?: ProgressCallback): MasteringChainResult;
|
|
1667
2033
|
masteringProcess(processorName: SoloProcessor, params?: MasteringProcessorParams): MasteringResult;
|
|
1668
2034
|
trim(thresholdDb?: number): Float32Array;
|
|
1669
2035
|
stft(nFft?: number, hopLength?: number): StftResult;
|
|
@@ -1948,8 +2314,13 @@ interface ProjectLoopRecordingResult {
|
|
|
1948
2314
|
/** Clip loop mode for {@link Project.setClipLoop}. */
|
|
1949
2315
|
type ProjectLoopMode = 'off' | 'loop' | 0 | 1;
|
|
1950
2316
|
type ProjectWarpMode = 'off' | 'repitch' | 'tempo-sync' | 0 | 1 | 2;
|
|
1951
|
-
/**
|
|
1952
|
-
|
|
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;
|
|
1953
2324
|
/** One automation breakpoint accepted by the automation-lane edit ops. */
|
|
1954
2325
|
interface ProjectAutomationPoint {
|
|
1955
2326
|
/** Breakpoint position in PPQ. */
|
|
@@ -1986,6 +2357,14 @@ interface ProjectTimeSignatureSegment {
|
|
|
1986
2357
|
/** Beat unit (time-signature denominator, e.g. 4 or 8). */
|
|
1987
2358
|
denominator: number;
|
|
1988
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
|
+
}
|
|
1989
2368
|
/** Key segment for {@link Project.annotateKeys}. */
|
|
1990
2369
|
interface ProjectKeySegment {
|
|
1991
2370
|
startPpq: number;
|
|
@@ -2304,10 +2683,12 @@ declare class Project {
|
|
|
2304
2683
|
* or not a MIDI clip.
|
|
2305
2684
|
*/
|
|
2306
2685
|
validateMidiNotes(clipId: number): ProjectNotePairValidation;
|
|
2307
|
-
/**
|
|
2308
|
-
|
|
2309
|
-
/**
|
|
2310
|
-
|
|
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;
|
|
2311
2692
|
/** Compile the project into a renderable timeline, surfacing diagnostics. */
|
|
2312
2693
|
compile(): ProjectCompileResult;
|
|
2313
2694
|
/**
|
|
@@ -2761,6 +3142,11 @@ declare class RealtimeEngine {
|
|
|
2761
3142
|
graphNodeCount(): number;
|
|
2762
3143
|
graphConnectionCount(): number;
|
|
2763
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;
|
|
2764
3150
|
clipCount(): number;
|
|
2765
3151
|
setTrackLanes(lanes: Array<number | EngineTrackLane>): void;
|
|
2766
3152
|
/**
|
|
@@ -3046,80 +3432,345 @@ declare class SonareError extends Error {
|
|
|
3046
3432
|
/** Type guard: whether a caught value is a libsonare {@link SonareError}. */
|
|
3047
3433
|
declare function isSonareError(value: unknown): value is SonareError;
|
|
3048
3434
|
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
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
|
+
}
|
|
3052
3528
|
/**
|
|
3053
|
-
*
|
|
3529
|
+
* Convert frequency in Hz to Mel scale.
|
|
3054
3530
|
*
|
|
3055
|
-
* @param
|
|
3056
|
-
* @
|
|
3057
|
-
* @returns NNLS chroma result
|
|
3531
|
+
* @param hz - Frequency in Hz
|
|
3532
|
+
* @returns Mel frequency
|
|
3058
3533
|
*/
|
|
3059
|
-
declare function
|
|
3534
|
+
declare function hzToMel(hz: number): number;
|
|
3060
3535
|
/**
|
|
3061
|
-
*
|
|
3536
|
+
* Convert Mel scale to frequency in Hz.
|
|
3062
3537
|
*
|
|
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
|
|
3538
|
+
* @param mel - Mel frequency
|
|
3539
|
+
* @returns Frequency in Hz
|
|
3070
3540
|
*/
|
|
3071
|
-
declare function
|
|
3541
|
+
declare function melToHz(mel: number): number;
|
|
3072
3542
|
/**
|
|
3073
|
-
*
|
|
3543
|
+
* Convert frequency in Hz to MIDI note number.
|
|
3074
3544
|
*
|
|
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
|
|
3545
|
+
* @param hz - Frequency in Hz
|
|
3546
|
+
* @returns MIDI note number (A4 = 440 Hz = 69)
|
|
3082
3547
|
*/
|
|
3083
|
-
declare function
|
|
3548
|
+
declare function hzToMidi(hz: number): number;
|
|
3084
3549
|
/**
|
|
3085
|
-
*
|
|
3550
|
+
* Convert MIDI note number to frequency in Hz.
|
|
3086
3551
|
*
|
|
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
|
-
* @returns CQT magnitude result
|
|
3552
|
+
* @param midi - MIDI note number
|
|
3553
|
+
* @returns Frequency in Hz
|
|
3094
3554
|
*/
|
|
3095
|
-
declare function
|
|
3555
|
+
declare function midiToHz(midi: number): number;
|
|
3096
3556
|
/**
|
|
3097
|
-
*
|
|
3557
|
+
* Convert frequency in Hz to note name.
|
|
3098
3558
|
*
|
|
3099
|
-
* @param
|
|
3100
|
-
* @
|
|
3101
|
-
* @param hopLength - Hop length (default: 512)
|
|
3102
|
-
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3103
|
-
* @param nBins - Number of frequency bins (default: 84)
|
|
3104
|
-
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3105
|
-
* @param gamma - Bandwidth offset; 0 is equivalent to CQT (default: 0)
|
|
3106
|
-
* @returns VQT magnitude result (same shape as CQT)
|
|
3559
|
+
* @param hz - Frequency in Hz
|
|
3560
|
+
* @returns Note name (e.g., "A4", "C#5")
|
|
3107
3561
|
*/
|
|
3108
|
-
declare function
|
|
3109
|
-
/** Reconstruct mono audio from row-major CQT magnitude via Griffin-Lim. */
|
|
3110
|
-
declare function cqtToAudio(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, hopLength?: number, fmin?: number, binsPerOctave?: number, nIter?: number, options?: GuardedOptions$2): Float32Array;
|
|
3111
|
-
/** Reconstruct mono audio from row-major VQT magnitude via Griffin-Lim. */
|
|
3112
|
-
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;
|
|
3562
|
+
declare function hzToNote(hz: number): string;
|
|
3113
3563
|
/**
|
|
3114
|
-
*
|
|
3564
|
+
* Convert note name to frequency in Hz.
|
|
3115
3565
|
*
|
|
3116
|
-
* @param
|
|
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/...).
|
|
3765
|
+
*
|
|
3766
|
+
* @param samples - Audio samples (mono, float32)
|
|
3117
3767
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3118
3768
|
* @param nFft - FFT size (default: 2048)
|
|
3119
3769
|
* @param hopLength - Hop length (default: 512)
|
|
3120
3770
|
* @param minSectionSec - Minimum section duration in seconds (default: 4.0)
|
|
3121
3771
|
* @returns Array of detected sections
|
|
3122
3772
|
*/
|
|
3773
|
+
declare function analyzeSections(request: AnalyzeSectionsRequest): Section[];
|
|
3123
3774
|
declare function analyzeSections(samples: Float32Array, sampleRate?: number, options?: AnalyzeSectionsGuardedOptions): Section[];
|
|
3124
3775
|
/** Options for {@link analyzeMelody}. All fields are optional. */
|
|
3125
3776
|
interface MelodyOptions {
|
|
@@ -3153,6 +3804,7 @@ interface MelodyOptions {
|
|
|
3153
3804
|
* @param options - Tracker + tuning options ({@link MelodyOptions})
|
|
3154
3805
|
* @returns Melody contour with per-frame pitch points and summary stats
|
|
3155
3806
|
*/
|
|
3807
|
+
declare function analyzeMelody(request: AnalyzeMelodyRequest): MelodyResult;
|
|
3156
3808
|
declare function analyzeMelody(samples: Float32Array, sampleRate?: number, options?: MelodyGuardedOptions): MelodyResult;
|
|
3157
3809
|
/**
|
|
3158
3810
|
* Compute the onset strength envelope.
|
|
@@ -3164,6 +3816,7 @@ declare function analyzeMelody(samples: Float32Array, sampleRate?: number, optio
|
|
|
3164
3816
|
* @param nMels - Number of Mel bands (default: 128)
|
|
3165
3817
|
* @returns Onset envelope for each frame
|
|
3166
3818
|
*/
|
|
3819
|
+
declare function onsetEnvelope(request: OnsetEnvelopeRequest): Float32Array;
|
|
3167
3820
|
declare function onsetEnvelope(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, options?: GuardedOptions$2): Float32Array;
|
|
3168
3821
|
/**
|
|
3169
3822
|
* Compute multi-band onset strength envelopes.
|
|
@@ -3176,6 +3829,7 @@ declare function onsetEnvelope(samples: Float32Array, sampleRate?: number, nFft?
|
|
|
3176
3829
|
* @param nBands - Number of onset bands (default: 3)
|
|
3177
3830
|
* @returns Multi-band onset matrix
|
|
3178
3831
|
*/
|
|
3832
|
+
declare function onsetStrengthMulti(request: OnsetStrengthMultiRequest): OnsetStrengthMultiResult;
|
|
3179
3833
|
declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, nBands?: number, options?: GuardedOptions$2): OnsetStrengthMultiResult;
|
|
3180
3834
|
/**
|
|
3181
3835
|
* Compute the Fourier tempogram from an onset envelope.
|
|
@@ -3186,6 +3840,7 @@ declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number,
|
|
|
3186
3840
|
* @param winLength - Window length in frames (default: 384)
|
|
3187
3841
|
* @returns Fourier tempogram result
|
|
3188
3842
|
*/
|
|
3843
|
+
declare function fourierTempogram(request: FourierTempogramRequest): WasmFourierTempogramResult;
|
|
3189
3844
|
declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, options?: GuardedOptions$2): WasmFourierTempogramResult;
|
|
3190
3845
|
/**
|
|
3191
3846
|
* Compute tempogram ratio features.
|
|
@@ -3198,6 +3853,7 @@ declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: numb
|
|
|
3198
3853
|
* default {0.5, 1, 2, 3, 4} is used.
|
|
3199
3854
|
* @returns Tempogram ratio features (one value per factor)
|
|
3200
3855
|
*/
|
|
3856
|
+
declare function tempogramRatio(request: TempogramRatioRequest): Float32Array;
|
|
3201
3857
|
declare function tempogramRatio(tempogramData: Float32Array, winLength?: number, sampleRate?: number, hopLength?: number, factors?: Float32Array | number[], options?: GuardedOptions$2): Float32Array;
|
|
3202
3858
|
/**
|
|
3203
3859
|
* Measure loudness (EBU R128 / ITU-R BS.1770).
|
|
@@ -3208,6 +3864,7 @@ declare function tempogramRatio(tempogramData: Float32Array, winLength?: number,
|
|
|
3208
3864
|
* dependent and a wrong rate yields wrong loudness.
|
|
3209
3865
|
* @returns Loudness measurement result
|
|
3210
3866
|
*/
|
|
3867
|
+
declare function lufs(request: LufsRequest): LufsResult;
|
|
3211
3868
|
declare function lufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): LufsResult;
|
|
3212
3869
|
/**
|
|
3213
3870
|
* Compute the momentary loudness (LUFS) over time.
|
|
@@ -3217,6 +3874,7 @@ declare function lufs(samples: Float32Array, sampleRate?: number, options?: Vali
|
|
|
3217
3874
|
* K-weighting is sample-rate dependent; pass the buffer's actual rate.
|
|
3218
3875
|
* @returns Momentary LUFS values over time
|
|
3219
3876
|
*/
|
|
3877
|
+
declare function momentaryLufs(request: LufsRequest): Float32Array;
|
|
3220
3878
|
declare function momentaryLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
3221
3879
|
/**
|
|
3222
3880
|
* Compute the short-term loudness (LUFS) over time.
|
|
@@ -3226,90 +3884,9 @@ declare function momentaryLufs(samples: Float32Array, sampleRate?: number, optio
|
|
|
3226
3884
|
* K-weighting is sample-rate dependent; pass the buffer's actual rate.
|
|
3227
3885
|
* @returns Short-term LUFS values over time
|
|
3228
3886
|
*/
|
|
3887
|
+
declare function shortTermLufs(request: LufsRequest): Float32Array;
|
|
3229
3888
|
declare function shortTermLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
3230
3889
|
|
|
3231
|
-
/**
|
|
3232
|
-
* Convert frequency in Hz to Mel scale.
|
|
3233
|
-
*
|
|
3234
|
-
* @param hz - Frequency in Hz
|
|
3235
|
-
* @returns Mel frequency
|
|
3236
|
-
*/
|
|
3237
|
-
declare function hzToMel(hz: number): number;
|
|
3238
|
-
/**
|
|
3239
|
-
* Convert Mel scale to frequency in Hz.
|
|
3240
|
-
*
|
|
3241
|
-
* @param mel - Mel frequency
|
|
3242
|
-
* @returns Frequency in Hz
|
|
3243
|
-
*/
|
|
3244
|
-
declare function melToHz(mel: number): number;
|
|
3245
|
-
/**
|
|
3246
|
-
* Convert frequency in Hz to MIDI note number.
|
|
3247
|
-
*
|
|
3248
|
-
* @param hz - Frequency in Hz
|
|
3249
|
-
* @returns MIDI note number (A4 = 440 Hz = 69)
|
|
3250
|
-
*/
|
|
3251
|
-
declare function hzToMidi(hz: number): number;
|
|
3252
|
-
/**
|
|
3253
|
-
* Convert MIDI note number to frequency in Hz.
|
|
3254
|
-
*
|
|
3255
|
-
* @param midi - MIDI note number
|
|
3256
|
-
* @returns Frequency in Hz
|
|
3257
|
-
*/
|
|
3258
|
-
declare function midiToHz(midi: number): number;
|
|
3259
|
-
/**
|
|
3260
|
-
* Convert frequency in Hz to note name.
|
|
3261
|
-
*
|
|
3262
|
-
* @param hz - Frequency in Hz
|
|
3263
|
-
* @returns Note name (e.g., "A4", "C#5")
|
|
3264
|
-
*/
|
|
3265
|
-
declare function hzToNote(hz: number): string;
|
|
3266
|
-
/**
|
|
3267
|
-
* Convert note name to frequency in Hz.
|
|
3268
|
-
*
|
|
3269
|
-
* @param note - Note name (e.g., "A4", "C#5")
|
|
3270
|
-
* @returns Frequency in Hz
|
|
3271
|
-
*/
|
|
3272
|
-
declare function noteToHz(note: string): number;
|
|
3273
|
-
/**
|
|
3274
|
-
* Convert frame index to time in seconds.
|
|
3275
|
-
*
|
|
3276
|
-
* @param frames - Frame index
|
|
3277
|
-
* @param sr - Sample rate in Hz (default: 22050)
|
|
3278
|
-
* @param hopLength - Hop length in samples (default: 512)
|
|
3279
|
-
* @returns Time in seconds
|
|
3280
|
-
*/
|
|
3281
|
-
declare function framesToTime(frames: number, sr?: number, hopLength?: number): number;
|
|
3282
|
-
/**
|
|
3283
|
-
* Convert time in seconds to frame index.
|
|
3284
|
-
*
|
|
3285
|
-
* @param time - Time in seconds
|
|
3286
|
-
* @param sr - Sample rate in Hz (default: 22050)
|
|
3287
|
-
* @param hopLength - Hop length in samples (default: 512)
|
|
3288
|
-
* @returns Frame index
|
|
3289
|
-
*/
|
|
3290
|
-
declare function timeToFrames(time: number, sr?: number, hopLength?: number): number;
|
|
3291
|
-
declare function framesToSamples(frames: number, hopLength?: number, nFft?: number): number;
|
|
3292
|
-
declare function samplesToFrames(samples: number, hopLength?: number, nFft?: number): number;
|
|
3293
|
-
declare function powerToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3294
|
-
declare function amplitudeToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3295
|
-
declare function dbToPower(values: Float32Array, ref?: number): Float32Array;
|
|
3296
|
-
declare function dbToAmplitude(values: Float32Array, ref?: number): Float32Array;
|
|
3297
|
-
declare function preemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3298
|
-
declare function deemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3299
|
-
declare function trimSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): WasmTrimResult;
|
|
3300
|
-
declare function splitSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): Int32Array;
|
|
3301
|
-
declare function frameSignal(samples: Float32Array, frameLength: number, hopLength: number): WasmFrameResult;
|
|
3302
|
-
declare function padCenter(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3303
|
-
declare function fixLength(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3304
|
-
declare function fixFrames(frames: Int32Array, xMin?: number, xMax?: number, pad?: boolean): Int32Array;
|
|
3305
|
-
declare function peakPick(values: Float32Array, preMax: number, postMax: number, preAvg: number, postAvg: number, delta: number, wait: number): Int32Array;
|
|
3306
|
-
declare function vectorNormalize(values: Float32Array, normType?: number, threshold?: number): Float32Array;
|
|
3307
|
-
declare function pcen(values: Float32Array, nBins: number, nFrames: number, options?: Record<string, number>): Float32Array;
|
|
3308
|
-
declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
|
|
3309
|
-
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
|
|
3310
|
-
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
|
|
3311
|
-
declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, tempoMin?: number, tempoMax?: number, winLength?: number): Float32Array;
|
|
3312
|
-
|
|
3313
3890
|
/**
|
|
3314
3891
|
* Detect pitch using YIN algorithm.
|
|
3315
3892
|
*
|
|
@@ -3323,6 +3900,17 @@ declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength
|
|
|
3323
3900
|
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
3324
3901
|
* @returns Pitch detection result
|
|
3325
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;
|
|
3326
3914
|
declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3327
3915
|
/**
|
|
3328
3916
|
* Detect pitch using pYIN algorithm (probabilistic YIN with HMM smoothing).
|
|
@@ -3337,6 +3925,9 @@ declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLengt
|
|
|
3337
3925
|
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
3338
3926
|
* @returns Pitch detection result
|
|
3339
3927
|
*/
|
|
3928
|
+
interface PitchPyinRequest extends PitchYinRequest {
|
|
3929
|
+
}
|
|
3930
|
+
declare function pitchPyin(request: PitchPyinRequest): PitchResult;
|
|
3340
3931
|
declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3341
3932
|
|
|
3342
3933
|
/**
|
|
@@ -3347,8 +3938,97 @@ declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLeng
|
|
|
3347
3938
|
* @param targetSr - Target sample rate in Hz
|
|
3348
3939
|
* @returns Resampled audio
|
|
3349
3940
|
*/
|
|
3941
|
+
interface ResampleRequest {
|
|
3942
|
+
samples: Float32Array;
|
|
3943
|
+
srcSr: number;
|
|
3944
|
+
targetSr: number;
|
|
3945
|
+
}
|
|
3946
|
+
declare function resample(request: ResampleRequest): Float32Array;
|
|
3350
3947
|
declare function resample(samples: Float32Array, srcSr: number, targetSr: number): Float32Array;
|
|
3351
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
|
+
}
|
|
3352
4032
|
/**
|
|
3353
4033
|
* Compute spectral centroid (center of mass of spectrum).
|
|
3354
4034
|
*
|
|
@@ -3358,36 +4038,43 @@ declare function resample(samples: Float32Array, srcSr: number, targetSr: number
|
|
|
3358
4038
|
* @param hopLength - Hop length (default: 512)
|
|
3359
4039
|
* @returns Spectral centroid in Hz for each frame
|
|
3360
4040
|
*/
|
|
4041
|
+
declare function spectralCentroid(request: SpectralFrameRequest): Float32Array;
|
|
3361
4042
|
declare function spectralCentroid(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3362
4043
|
/**
|
|
3363
4044
|
* Compute spectral contrast (librosa.feature.spectral_contrast).
|
|
3364
4045
|
*
|
|
3365
4046
|
* @returns Matrix2d of shape (nBands + 1) x nFrames.
|
|
3366
4047
|
*/
|
|
4048
|
+
declare function spectralContrast(request: SpectralContrastRequest): WasmMatrix2dResult;
|
|
3367
4049
|
declare function spectralContrast(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nBands?: number, fmin?: number, quantile?: number): WasmMatrix2dResult;
|
|
3368
4050
|
/**
|
|
3369
4051
|
* Fit per-frame polynomial coefficients (librosa.feature.poly_features).
|
|
3370
4052
|
*
|
|
3371
4053
|
* @returns Matrix2d of shape (order + 1) x nFrames.
|
|
3372
4054
|
*/
|
|
4055
|
+
declare function polyFeatures(request: PolyFeaturesRequest): WasmMatrix2dResult;
|
|
3373
4056
|
declare function polyFeatures(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, order?: number): WasmMatrix2dResult;
|
|
3374
4057
|
/**
|
|
3375
4058
|
* Locate zero-crossing indices of a signal (librosa.zero_crossings).
|
|
3376
4059
|
*/
|
|
4060
|
+
declare function zeroCrossings(request: ZeroCrossingsRequest): Int32Array;
|
|
3377
4061
|
declare function zeroCrossings(samples: Float32Array, threshold?: number, refMagnitude?: boolean, pad?: boolean, zeroPos?: boolean): Int32Array;
|
|
3378
4062
|
/**
|
|
3379
4063
|
* Estimate the global tuning offset from a set of frequencies
|
|
3380
4064
|
* (librosa.pitch_tuning). Returns a deviation in fractions of a bin.
|
|
3381
4065
|
*/
|
|
4066
|
+
declare function pitchTuning(request: PitchTuningRequest): number;
|
|
3382
4067
|
declare function pitchTuning(frequencies: Float32Array, resolution?: number, binsPerOctave?: number): number;
|
|
3383
4068
|
/**
|
|
3384
4069
|
* Estimate the tuning offset of an audio signal (librosa.estimate_tuning).
|
|
3385
4070
|
*/
|
|
4071
|
+
declare function estimateTuning(request: EstimateTuningRequest): number;
|
|
3386
4072
|
declare function estimateTuning(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, resolution?: number, binsPerOctave?: number): number;
|
|
3387
4073
|
/**
|
|
3388
4074
|
* Non-negative matrix factorisation of a flattened [nFeatures x nFrames]
|
|
3389
4075
|
* spectrogram (librosa.decompose.decompose). Returns the W and H factors.
|
|
3390
4076
|
*/
|
|
4077
|
+
declare function decompose(request: DecomposeRequest): WasmDecomposeResult;
|
|
3391
4078
|
declare function decompose(s: Float32Array, nFeatures: number, nFrames: number, nComponents: number, nIter?: number, beta?: number): WasmDecomposeResult;
|
|
3392
4079
|
/**
|
|
3393
4080
|
* Non-negative matrix factorisation with a selectable initialiser
|
|
@@ -3396,25 +4083,30 @@ declare function decompose(s: Float32Array, nFeatures: number, nFrames: number,
|
|
|
3396
4083
|
* or `'nndsvd'` (SVD-based warm start, which tends to converge in fewer
|
|
3397
4084
|
* iterations). Returns the W and H factors.
|
|
3398
4085
|
*/
|
|
4086
|
+
declare function decomposeWithInit(request: DecomposeWithInitRequest): WasmDecomposeResult;
|
|
3399
4087
|
declare function decomposeWithInit(s: Float32Array, nFeatures: number, nFrames: number, nComponents: number, nIter?: number, beta?: number, init?: 'random' | 'nndsvd'): WasmDecomposeResult;
|
|
3400
4088
|
/**
|
|
3401
4089
|
* Nearest-neighbour filtering of a flattened [nFeatures x nFrames] spectrogram
|
|
3402
4090
|
* (librosa.decompose.nn_filter).
|
|
3403
4091
|
*/
|
|
4092
|
+
declare function nnFilter(request: NnFilterRequest): WasmMatrix2dResult;
|
|
3404
4093
|
declare function nnFilter(s: Float32Array, nFeatures: number, nFrames: number, aggregate?: string, k?: number, width?: number): WasmMatrix2dResult;
|
|
3405
4094
|
/**
|
|
3406
4095
|
* Reorder/concatenate a signal by interval slices (librosa.effects.remix).
|
|
3407
4096
|
*
|
|
3408
4097
|
* @param intervals - Flat (start, end) sample pairs (even length).
|
|
3409
4098
|
*/
|
|
4099
|
+
declare function remix(request: RemixRequest): Float32Array;
|
|
3410
4100
|
declare function remix(samples: Float32Array, intervals: Int32Array | ArrayLike<number>, sampleRate?: number, alignZeros?: boolean): Float32Array;
|
|
3411
4101
|
/**
|
|
3412
4102
|
* Phase-vocoder time-scale modification (rate > 1 faster, < 1 slower).
|
|
3413
4103
|
*/
|
|
4104
|
+
declare function phaseVocoder(request: PhaseVocoderRequest): Float32Array;
|
|
3414
4105
|
declare function phaseVocoder(samples: Float32Array, rate: number, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3415
4106
|
/**
|
|
3416
4107
|
* HPSS into harmonic / percussive / residual signals.
|
|
3417
4108
|
*/
|
|
4109
|
+
declare function hpssWithResidual(request: HpssWithResidualRequest): WasmHpssWithResidualResult;
|
|
3418
4110
|
declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): WasmHpssWithResidualResult;
|
|
3419
4111
|
/**
|
|
3420
4112
|
* Channel-weighted multichannel integrated loudness + LRA (ITU-R BS.1770 /
|
|
@@ -3425,12 +4117,14 @@ declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, ke
|
|
|
3425
4117
|
* audio, and K-weighting is sample-rate dependent, so a wrong rate yields wrong
|
|
3426
4118
|
* loudness.
|
|
3427
4119
|
*/
|
|
4120
|
+
declare function lufsInterleaved(request: LufsInterleavedRequest): WasmLufsResult;
|
|
3428
4121
|
declare function lufsInterleaved(samples: Float32Array, channels: number, sampleRate?: number, options?: ValidateOptions): WasmLufsResult;
|
|
3429
4122
|
/**
|
|
3430
4123
|
* Standards-compliant EBU R128 loudness range (LRA) in LU. Pass the buffer's
|
|
3431
4124
|
* actual `sampleRate`: the default (22050) is non-standard and K-weighting is
|
|
3432
4125
|
* sample-rate dependent.
|
|
3433
4126
|
*/
|
|
4127
|
+
declare function ebur128LoudnessRange(request: Ebur128LoudnessRangeRequest): number;
|
|
3434
4128
|
declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number): number;
|
|
3435
4129
|
/**
|
|
3436
4130
|
* Compute spectral bandwidth.
|
|
@@ -3441,6 +4135,7 @@ declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number
|
|
|
3441
4135
|
* @param hopLength - Hop length (default: 512)
|
|
3442
4136
|
* @returns Spectral bandwidth in Hz for each frame
|
|
3443
4137
|
*/
|
|
4138
|
+
declare function spectralBandwidth(request: SpectralFrameRequest): Float32Array;
|
|
3444
4139
|
declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3445
4140
|
/**
|
|
3446
4141
|
* Compute spectral rolloff frequency.
|
|
@@ -3452,6 +4147,7 @@ declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, n
|
|
|
3452
4147
|
* @param rollPercent - Percentage threshold (default: 0.85)
|
|
3453
4148
|
* @returns Rolloff frequency in Hz for each frame
|
|
3454
4149
|
*/
|
|
4150
|
+
declare function spectralRolloff(request: SpectralRolloffRequest): Float32Array;
|
|
3455
4151
|
declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, rollPercent?: number): Float32Array;
|
|
3456
4152
|
/**
|
|
3457
4153
|
* Compute spectral flatness.
|
|
@@ -3462,6 +4158,7 @@ declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFf
|
|
|
3462
4158
|
* @param hopLength - Hop length (default: 512)
|
|
3463
4159
|
* @returns Spectral flatness for each frame (0 = tonal, 1 = noise-like)
|
|
3464
4160
|
*/
|
|
4161
|
+
declare function spectralFlatness(request: SpectralFrameRequest): Float32Array;
|
|
3465
4162
|
declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3466
4163
|
/**
|
|
3467
4164
|
* Compute zero crossing rate.
|
|
@@ -3472,6 +4169,7 @@ declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nF
|
|
|
3472
4169
|
* @param hopLength - Hop length (default: 512)
|
|
3473
4170
|
* @returns Zero crossing rate for each frame
|
|
3474
4171
|
*/
|
|
4172
|
+
declare function zeroCrossingRate(request: ZeroCrossingRateRequest): Float32Array;
|
|
3475
4173
|
declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
3476
4174
|
/**
|
|
3477
4175
|
* Compute RMS energy.
|
|
@@ -3482,9 +4180,70 @@ declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, fr
|
|
|
3482
4180
|
* @param hopLength - Hop length (default: 512)
|
|
3483
4181
|
* @returns RMS energy for each frame
|
|
3484
4182
|
*/
|
|
4183
|
+
declare function rmsEnergy(request: ZeroCrossingRateRequest): Float32Array;
|
|
3485
4184
|
declare function rmsEnergy(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
3486
4185
|
|
|
3487
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
|
+
}
|
|
3488
4247
|
/**
|
|
3489
4248
|
* Trim silence from beginning and end of audio.
|
|
3490
4249
|
*
|
|
@@ -3493,6 +4252,7 @@ type GuardedOptions$1 = ValidateOptions;
|
|
|
3493
4252
|
* @param thresholdDb - Silence threshold in dB (default: -60 dB)
|
|
3494
4253
|
* @returns Trimmed audio
|
|
3495
4254
|
*/
|
|
4255
|
+
declare function trim(request: TrimRequest): Float32Array;
|
|
3496
4256
|
declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: number, options?: GuardedOptions$1): Float32Array;
|
|
3497
4257
|
/**
|
|
3498
4258
|
* Compute Short-Time Fourier Transform (STFT).
|
|
@@ -3503,6 +4263,7 @@ declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: n
|
|
|
3503
4263
|
* @param hopLength - Hop length (default: 512)
|
|
3504
4264
|
* @returns STFT result with magnitude and power spectrograms
|
|
3505
4265
|
*/
|
|
4266
|
+
declare function stft(request: SpectrogramRequest): StftResult;
|
|
3506
4267
|
declare function stft(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): StftResult;
|
|
3507
4268
|
/**
|
|
3508
4269
|
* Compute STFT and return magnitude in decibels.
|
|
@@ -3513,6 +4274,11 @@ declare function stft(samples: Float32Array, sampleRate?: number, nFft?: number,
|
|
|
3513
4274
|
* @param hopLength - Hop length (default: 512)
|
|
3514
4275
|
* @returns STFT result with dB values
|
|
3515
4276
|
*/
|
|
4277
|
+
declare function stftDb(request: SpectrogramRequest): {
|
|
4278
|
+
nBins: number;
|
|
4279
|
+
nFrames: number;
|
|
4280
|
+
db: Float32Array;
|
|
4281
|
+
};
|
|
3516
4282
|
declare function stftDb(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): {
|
|
3517
4283
|
nBins: number;
|
|
3518
4284
|
nFrames: number;
|
|
@@ -3527,6 +4293,7 @@ declare function stftDb(samples: Float32Array, sampleRate?: number, nFft?: numbe
|
|
|
3527
4293
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3528
4294
|
* @returns Chroma result
|
|
3529
4295
|
*/
|
|
4296
|
+
declare function chromaCens(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3530
4297
|
declare function chromaCens(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3531
4298
|
/**
|
|
3532
4299
|
* Compute a constant-Q chromagram (librosa.feature.chroma_cqt).
|
|
@@ -3537,6 +4304,7 @@ declare function chromaCens(samples: Float32Array, sampleRate?: number, hopLengt
|
|
|
3537
4304
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3538
4305
|
* @returns Chroma result
|
|
3539
4306
|
*/
|
|
4307
|
+
declare function chromaCqt(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3540
4308
|
declare function chromaCqt(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3541
4309
|
/**
|
|
3542
4310
|
* Compute low-frequency bass chroma.
|
|
@@ -3547,6 +4315,7 @@ declare function chromaCqt(samples: Float32Array, sampleRate?: number, hopLength
|
|
|
3547
4315
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3548
4316
|
* @returns Chroma result
|
|
3549
4317
|
*/
|
|
4318
|
+
declare function bassChroma(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3550
4319
|
declare function bassChroma(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3551
4320
|
/**
|
|
3552
4321
|
* Compute Mel spectrogram.
|
|
@@ -3562,6 +4331,7 @@ declare function bassChroma(samples: Float32Array, sampleRate?: number, hopLengt
|
|
|
3562
4331
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3563
4332
|
* @returns Mel spectrogram result
|
|
3564
4333
|
*/
|
|
4334
|
+
declare function melSpectrogram(request: MelSpectrogramRequest): MelSpectrogramResult;
|
|
3565
4335
|
declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, fmin?: number, fmax?: number, htk?: boolean, options?: GuardedOptions$1): MelSpectrogramResult;
|
|
3566
4336
|
/**
|
|
3567
4337
|
* Compute MFCC (Mel-Frequency Cepstral Coefficients).
|
|
@@ -3578,6 +4348,7 @@ declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft
|
|
|
3578
4348
|
* @param lifter - Cepstral liftering coefficient (default: 0 = no liftering)
|
|
3579
4349
|
* @returns MFCC result
|
|
3580
4350
|
*/
|
|
4351
|
+
declare function mfcc(request: MfccRequest): MfccResult;
|
|
3581
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;
|
|
3582
4353
|
/**
|
|
3583
4354
|
* Approximate inverse of a Mel filterbank: Mel power spectrogram -> STFT power
|
|
@@ -3593,6 +4364,7 @@ declare function mfcc(samples: Float32Array, sampleRate?: number, nFft?: number,
|
|
|
3593
4364
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3594
4365
|
* @returns STFT power spectrogram result
|
|
3595
4366
|
*/
|
|
4367
|
+
declare function melToStft(request: MelToStftRequest): StftPowerResult;
|
|
3596
4368
|
declare function melToStft(melPower: Float32Array, nMels: number, nFrames: number, sampleRate?: number, nFft?: number, fmin?: number, fmax?: number, htk?: boolean, options?: GuardedOptions$1): StftPowerResult;
|
|
3597
4369
|
/**
|
|
3598
4370
|
* Reconstruct audio from a Mel power spectrogram via Griffin-Lim. Mirrors
|
|
@@ -3610,6 +4382,7 @@ declare function melToStft(melPower: Float32Array, nMels: number, nFrames: numbe
|
|
|
3610
4382
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3611
4383
|
* @returns Reconstructed audio samples (mono, float32)
|
|
3612
4384
|
*/
|
|
4385
|
+
declare function melToAudio(request: MelToAudioRequest): Float32Array;
|
|
3613
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;
|
|
3614
4387
|
/**
|
|
3615
4388
|
* Invert MFCC coefficients back to a Mel power spectrogram. Mirrors
|
|
@@ -3621,6 +4394,7 @@ declare function melToAudio(melPower: Float32Array, nMels: number, nFrames: numb
|
|
|
3621
4394
|
* @param nMels - Number of Mel bins to reconstruct (default: 128)
|
|
3622
4395
|
* @returns Mel power spectrogram result
|
|
3623
4396
|
*/
|
|
4397
|
+
declare function mfccToMel(request: MfccToMelRequest): MelPowerResult;
|
|
3624
4398
|
declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels?: number, options?: GuardedOptions$1): MelPowerResult;
|
|
3625
4399
|
/**
|
|
3626
4400
|
* Reconstruct audio directly from MFCC coefficients via Griffin-Lim. Mirrors
|
|
@@ -3639,6 +4413,7 @@ declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrame
|
|
|
3639
4413
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3640
4414
|
* @returns Reconstructed audio samples (mono, float32)
|
|
3641
4415
|
*/
|
|
4416
|
+
declare function mfccToAudio(request: MfccToAudioRequest): Float32Array;
|
|
3642
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;
|
|
3643
4418
|
/**
|
|
3644
4419
|
* Compute STFT chromagram (librosa.feature.chroma_stft).
|
|
@@ -3655,6 +4430,7 @@ declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFra
|
|
|
3655
4430
|
* @param hopLength - Hop length (default: 512)
|
|
3656
4431
|
* @returns Chroma features result
|
|
3657
4432
|
*/
|
|
4433
|
+
declare function chroma(request: SpectrogramRequest): ChromaResult;
|
|
3658
4434
|
declare function chroma(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3659
4435
|
|
|
3660
4436
|
interface SonareWorkletMeterSnapshot {
|
|
@@ -3834,6 +4610,27 @@ interface SonareEngineSyncClipsDeltaMessage {
|
|
|
3834
4610
|
upserts: EngineClip[];
|
|
3835
4611
|
removeIds: number[];
|
|
3836
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
|
+
}
|
|
3837
4634
|
interface SonareEngineSyncMidiClipsMessage {
|
|
3838
4635
|
type: 'syncMidiClips';
|
|
3839
4636
|
clips: EngineMidiClipSchedule[];
|
|
@@ -4030,7 +4827,7 @@ interface SonareEngineSyncExternalMidiClockMessage {
|
|
|
4030
4827
|
type: 'syncExternalMidiClock';
|
|
4031
4828
|
enabled: boolean;
|
|
4032
4829
|
}
|
|
4033
|
-
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;
|
|
4034
4831
|
|
|
4035
4832
|
declare class SonareRealtimeEngineNode {
|
|
4036
4833
|
readonly node: AudioWorkletNode;
|
|
@@ -4136,14 +4933,38 @@ interface MeteringDynamicRangeOptions extends ValidateOptions {
|
|
|
4136
4933
|
/** High percentile in [0,1] (negative = library default, 0.95). Default -1. */
|
|
4137
4934
|
highPercentile?: number;
|
|
4138
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;
|
|
4139
4956
|
declare function meteringPeakDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4957
|
+
declare function meteringRmsDb(request: MeteringSamplesRequest): number;
|
|
4140
4958
|
declare function meteringRmsDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4959
|
+
declare function meteringCrestFactorDb(request: MeteringSamplesRequest): number;
|
|
4141
4960
|
declare function meteringCrestFactorDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4961
|
+
declare function meteringDcOffset(request: MeteringSamplesRequest): number;
|
|
4142
4962
|
declare function meteringDcOffset(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4143
4963
|
/**
|
|
4144
4964
|
* Inter-sample (true) peak in dBFS. `oversampleFactor` must be a power of two
|
|
4145
4965
|
* in [1, 16]; pass 0 to use the library default (4).
|
|
4146
4966
|
*/
|
|
4967
|
+
declare function meteringTruePeakDb(request: MeteringTruePeakRequest): number;
|
|
4147
4968
|
declare function meteringTruePeakDb(samples: Float32Array, sampleRate?: number, oversampleFactor?: number, options?: ValidateOptions): number;
|
|
4148
4969
|
/**
|
|
4149
4970
|
* Detect contiguous runs of clipped samples.
|
|
@@ -4151,6 +4972,7 @@ declare function meteringTruePeakDb(samples: Float32Array, sampleRate?: number,
|
|
|
4151
4972
|
* @param threshold Linear absolute threshold (default 0.999).
|
|
4152
4973
|
* @param minRegionSamples Minimum run length to report (default 1).
|
|
4153
4974
|
*/
|
|
4975
|
+
declare function meteringDetectClipping(request: MeteringDetectClippingRequest): ClippingReport;
|
|
4154
4976
|
declare function meteringDetectClipping(samples: Float32Array, sampleRate?: number, options?: MeteringDetectClippingOptions): ClippingReport;
|
|
4155
4977
|
/**
|
|
4156
4978
|
* Sliding-window dynamic range. Pass 0 for window/hop to use the library
|
|
@@ -4158,6 +4980,7 @@ declare function meteringDetectClipping(samples: Float32Array, sampleRate?: numb
|
|
|
4158
4980
|
* "use the library default" (low=0.10, high=0.95) because 0 is a literal 0th
|
|
4159
4981
|
* percentile; omitted percentiles therefore default to -1.
|
|
4160
4982
|
*/
|
|
4983
|
+
declare function meteringDynamicRange(request: MeteringDynamicRangeRequest): DynamicRangeReport;
|
|
4161
4984
|
declare function meteringDynamicRange(samples: Float32Array, sampleRate?: number, options?: MeteringDynamicRangeOptions): DynamicRangeReport;
|
|
4162
4985
|
/** Mid/side vectorscope point series for a (left, right) stereo pair. */
|
|
4163
4986
|
interface VectorscopeReport {
|
|
@@ -4206,6 +5029,44 @@ interface WaveformPeakPyramidOptions extends ValidateOptions {
|
|
|
4206
5029
|
/** Bucket widths in frames, one per zoom level. Default [512, 1024, 2048, 4096]. */
|
|
4207
5030
|
samplesPerBucketLevels?: number[];
|
|
4208
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
|
+
}
|
|
4209
5070
|
/** Per-channel min/max waveform buckets. Arrays are channel-major. */
|
|
4210
5071
|
interface WaveformPeaksReport {
|
|
4211
5072
|
min: Float32Array;
|
|
@@ -4215,30 +5076,46 @@ interface WaveformPeaksReport {
|
|
|
4215
5076
|
samplesPerBucket: number;
|
|
4216
5077
|
}
|
|
4217
5078
|
/** Pearson correlation in [-1, 1] between two equal-length channels. */
|
|
5079
|
+
declare function meteringStereoCorrelation(request: MeteringStereoRequest): number;
|
|
4218
5080
|
declare function meteringStereoCorrelation(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4219
5081
|
/**
|
|
4220
5082
|
* Side / mid energy ratio, clamped to `[0, 2]`: 0 = pure mono, ~1 = wide
|
|
4221
5083
|
* stereo, 2 = fully decorrelated / out-of-phase.
|
|
4222
5084
|
*/
|
|
5085
|
+
declare function meteringStereoWidth(request: MeteringStereoRequest): number;
|
|
4223
5086
|
declare function meteringStereoWidth(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4224
|
-
/** Per-sample mid/side point series (one entry per input frame). */
|
|
4225
|
-
declare function meteringVectorscope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): VectorscopeReport;
|
|
4226
5087
|
/**
|
|
4227
|
-
*
|
|
4228
|
-
*
|
|
4229
|
-
*
|
|
4230
|
-
|
|
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.
|
|
4231
5100
|
*/
|
|
5101
|
+
declare function meteringVectorscopeDecimated(request: MeteringStereoDecimatedRequest): VectorscopeReport;
|
|
4232
5102
|
declare function meteringVectorscopeDecimated(left: Float32Array, right: Float32Array, sampleRate?: number, maxPoints?: number, options?: ValidateOptions): VectorscopeReport;
|
|
4233
|
-
/** Phase-scope point series plus summary stats. */
|
|
4234
|
-
declare function meteringPhaseScope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): PhaseScopeReport;
|
|
4235
5103
|
/**
|
|
4236
|
-
*
|
|
4237
|
-
*
|
|
4238
|
-
*
|
|
4239
|
-
*
|
|
4240
|
-
* decimated phase scope.
|
|
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.
|
|
4241
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.
|
|
5117
|
+
*/
|
|
5118
|
+
declare function meteringPhaseScopeDecimated(request: MeteringStereoDecimatedRequest): PhaseScopeReport;
|
|
4242
5119
|
declare function meteringPhaseScopeDecimated(left: Float32Array, right: Float32Array, sampleRate?: number, maxPoints?: number, options?: ValidateOptions): PhaseScopeReport;
|
|
4243
5120
|
/**
|
|
4244
5121
|
* Welch-averaged magnitude / power / dB spectrum over the WHOLE signal (split
|
|
@@ -4246,6 +5123,7 @@ declare function meteringPhaseScopeDecimated(left: Float32Array, right: Float32A
|
|
|
4246
5123
|
* are averaged). For a true single-frame snapshot, use
|
|
4247
5124
|
* {@link meteringSpectrumFrame}.
|
|
4248
5125
|
*/
|
|
5126
|
+
declare function meteringSpectrum(request: MeteringSpectrumRequest): SpectrumReport;
|
|
4249
5127
|
declare function meteringSpectrum(samples: Float32Array, sampleRate?: number, options?: SpectrumOptions & ValidateOptions): SpectrumReport;
|
|
4250
5128
|
/**
|
|
4251
5129
|
* True single-frame magnitude / power / dB spectrum (one Hann-windowed
|
|
@@ -4253,13 +5131,61 @@ declare function meteringSpectrum(samples: Float32Array, sampleRate?: number, op
|
|
|
4253
5131
|
* time-averaged like {@link meteringSpectrum}. The analysis frame spans
|
|
4254
5132
|
* `[frameOffset, frameOffset + nFft)`; samples past the end are zero-padded.
|
|
4255
5133
|
*/
|
|
5134
|
+
declare function meteringSpectrumFrame(request: MeteringSpectrumFrameRequest): SpectrumReport;
|
|
4256
5135
|
declare function meteringSpectrumFrame(samples: Float32Array, sampleRate?: number, frameOffset?: number, options?: SpectrumOptions & ValidateOptions): SpectrumReport;
|
|
4257
5136
|
/** Compute per-channel min/max waveform buckets from interleaved audio. */
|
|
5137
|
+
declare function waveformPeaks(request: WaveformPeaksRequest): WaveformPeaksReport;
|
|
4258
5138
|
declare function waveformPeaks(samples: Float32Array, channels: number, options?: WaveformPeaksOptions): WaveformPeaksReport;
|
|
4259
5139
|
/** Compute waveform peak buckets for several zoom levels. */
|
|
5140
|
+
declare function waveformPeakPyramid(request: WaveformPeakPyramidRequest): WaveformPeaksReport[];
|
|
4260
5141
|
declare function waveformPeakPyramid(samples: Float32Array, channels: number, options?: WaveformPeakPyramidOptions): WaveformPeaksReport[];
|
|
4261
5142
|
|
|
4262
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
|
+
}
|
|
4263
5189
|
/**
|
|
4264
5190
|
* Detect BPM from audio samples.
|
|
4265
5191
|
*
|
|
@@ -4267,6 +5193,7 @@ type GuardedOptions = ValidateOptions;
|
|
|
4267
5193
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4268
5194
|
* @returns Detected BPM
|
|
4269
5195
|
*/
|
|
5196
|
+
declare function detectBpm(request: SamplesRequest): number;
|
|
4270
5197
|
declare function detectBpm(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): number;
|
|
4271
5198
|
/**
|
|
4272
5199
|
* Detect musical key from audio samples.
|
|
@@ -4275,7 +5202,9 @@ declare function detectBpm(samples: Float32Array, sampleRate?: number, options?:
|
|
|
4275
5202
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4276
5203
|
* @returns Detected key
|
|
4277
5204
|
*/
|
|
5205
|
+
declare function detectKey(request: DetectKeyRequest): Key;
|
|
4278
5206
|
declare function detectKey(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): Key;
|
|
5207
|
+
declare function detectKeyCandidates(request: DetectKeyRequest): KeyCandidate[];
|
|
4279
5208
|
declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): KeyCandidate[];
|
|
4280
5209
|
/**
|
|
4281
5210
|
* Detect onset times from audio samples.
|
|
@@ -4284,6 +5213,7 @@ declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number,
|
|
|
4284
5213
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4285
5214
|
* @returns Array of onset times in seconds
|
|
4286
5215
|
*/
|
|
5216
|
+
declare function detectOnsets(request: SamplesRequest): Float32Array;
|
|
4287
5217
|
declare function detectOnsets(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4288
5218
|
/**
|
|
4289
5219
|
* Detect beat times from audio samples.
|
|
@@ -4292,6 +5222,7 @@ declare function detectOnsets(samples: Float32Array, sampleRate?: number, option
|
|
|
4292
5222
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4293
5223
|
* @returns Array of beat times in seconds
|
|
4294
5224
|
*/
|
|
5225
|
+
declare function detectBeats(request: SamplesRequest): Float32Array;
|
|
4295
5226
|
declare function detectBeats(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4296
5227
|
/**
|
|
4297
5228
|
* Detect downbeat times from audio samples.
|
|
@@ -4300,6 +5231,7 @@ declare function detectBeats(samples: Float32Array, sampleRate?: number, options
|
|
|
4300
5231
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4301
5232
|
* @returns Array of downbeat times in seconds
|
|
4302
5233
|
*/
|
|
5234
|
+
declare function detectDownbeats(request: SamplesRequest): Float32Array;
|
|
4303
5235
|
declare function detectDownbeats(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4304
5236
|
/**
|
|
4305
5237
|
* Detect chords from audio samples.
|
|
@@ -4309,6 +5241,7 @@ declare function detectDownbeats(samples: Float32Array, sampleRate?: number, opt
|
|
|
4309
5241
|
* @param options - Optional chord detection settings
|
|
4310
5242
|
* @returns Detected chord segments
|
|
4311
5243
|
*/
|
|
5244
|
+
declare function detectChords(request: DetectChordsRequest): ChordAnalysisResult;
|
|
4312
5245
|
declare function detectChords(samples: Float32Array, sampleRate?: number, options?: ChordDetectionOptions): ChordAnalysisResult;
|
|
4313
5246
|
/**
|
|
4314
5247
|
* Functional (Roman-numeral) harmonic analysis of the detected chord
|
|
@@ -4317,7 +5250,8 @@ declare function detectChords(samples: Float32Array, sampleRate?: number, option
|
|
|
4317
5250
|
*
|
|
4318
5251
|
* @returns One Roman-numeral label (e.g. "I", "IV", "V", "vi") per detected chord
|
|
4319
5252
|
*/
|
|
4320
|
-
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[];
|
|
4321
5255
|
/**
|
|
4322
5256
|
* Perform complete music analysis.
|
|
4323
5257
|
*
|
|
@@ -4333,8 +5267,11 @@ declare function chordFunctionalAnalysis(samples: Float32Array, keyRoot: PitchCl
|
|
|
4333
5267
|
* the UI responsive for long inputs, drive this from a Web Worker and use
|
|
4334
5268
|
* {@link analyzeWithProgress} to report progress.
|
|
4335
5269
|
*/
|
|
5270
|
+
declare function analyze(request: SamplesRequest): AnalysisResult;
|
|
4336
5271
|
declare function analyze(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): AnalysisResult;
|
|
5272
|
+
declare function analyzeImpulseResponse(request: AnalyzeImpulseResponseRequest): AcousticResult;
|
|
4337
5273
|
declare function analyzeImpulseResponse(samples: Float32Array, sampleRate?: number, nOctaveBands?: number): AcousticResult;
|
|
5274
|
+
declare function detectAcoustic(request: DetectAcousticRequest): AcousticResult;
|
|
4338
5275
|
declare function detectAcoustic(samples: Float32Array, sampleRate?: number, options?: AcousticOptions): AcousticResult;
|
|
4339
5276
|
/**
|
|
4340
5277
|
* Synthesize a room impulse response from shoebox geometry. `hasError` is true
|
|
@@ -4345,12 +5282,14 @@ declare function synthesizeRir(options?: RirSynthOptions): RirResult;
|
|
|
4345
5282
|
* Estimate an equivalent room (volume/dimensions/absorption/DRR) from a
|
|
4346
5283
|
* recording or impulse response.
|
|
4347
5284
|
*/
|
|
5285
|
+
declare function estimateRoom(request: EstimateRoomRequest): RoomEstimateResult;
|
|
4348
5286
|
declare function estimateRoom(samples: Float32Array, sampleRate?: number, options?: RoomEstimateOptions): RoomEstimateResult;
|
|
4349
5287
|
/**
|
|
4350
5288
|
* Morph a recording's reverberation toward a target room (creative FX, not
|
|
4351
5289
|
* dereverberation). Returns the morphed samples (input length plus the target
|
|
4352
5290
|
* room's reverb tail).
|
|
4353
5291
|
*/
|
|
5292
|
+
declare function roomMorph(request: RoomMorphRequest): Float32Array;
|
|
4354
5293
|
declare function roomMorph(samples: Float32Array, sampleRate: number, options?: RoomMorphOptions): Float32Array;
|
|
4355
5294
|
/**
|
|
4356
5295
|
* Perform complete music analysis with progress reporting.
|
|
@@ -4360,6 +5299,7 @@ declare function roomMorph(samples: Float32Array, sampleRate: number, options?:
|
|
|
4360
5299
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
4361
5300
|
* @returns Complete analysis result
|
|
4362
5301
|
*/
|
|
5302
|
+
declare function analyzeWithProgress(request: AnalyzeWithProgressRequest): AnalysisResult;
|
|
4363
5303
|
declare function analyzeWithProgress(samples: Float32Array, sampleRate: number | undefined, onProgress: ProgressCallback): AnalysisResult;
|
|
4364
5304
|
interface BpmCandidate {
|
|
4365
5305
|
bpm: number;
|
|
@@ -4416,19 +5356,23 @@ interface TimbreAnalysisResult extends TimbreFrame {
|
|
|
4416
5356
|
* Detailed BPM analysis (BPM, confidence, alternate candidates, autocorrelation,
|
|
4417
5357
|
* tempogram). Matches the Node `analyzeBpm` / Python `analyze_bpm` surface.
|
|
4418
5358
|
*/
|
|
5359
|
+
declare function analyzeBpm(request: AnalyzeBpmRequest): BpmAnalysisResult;
|
|
4419
5360
|
declare function analyzeBpm(samples: Float32Array, sampleRate?: number, options?: AnalyzeBpmOptions): BpmAnalysisResult;
|
|
4420
5361
|
/**
|
|
4421
5362
|
* Detailed rhythm analysis (time signature, groove, syncopation, beat intervals).
|
|
4422
5363
|
*/
|
|
5364
|
+
declare function analyzeRhythm(request: AnalyzeRhythmRequest): RhythmAnalysisResult;
|
|
4423
5365
|
declare function analyzeRhythm(samples: Float32Array, sampleRate?: number, options?: AnalyzeRhythmOptions): RhythmAnalysisResult;
|
|
4424
5366
|
/**
|
|
4425
5367
|
* Dynamics analysis (RMS, peak, crest factor, LRA, loudness curve).
|
|
4426
5368
|
*/
|
|
5369
|
+
declare function analyzeDynamics(request: AnalyzeDynamicsRequest): DynamicsAnalysisResult;
|
|
4427
5370
|
declare function analyzeDynamics(samples: Float32Array, sampleRate?: number, options?: AnalyzeDynamicsOptions): DynamicsAnalysisResult;
|
|
4428
5371
|
/**
|
|
4429
5372
|
* Timbre analysis (brightness/warmth/density/roughness/complexity plus spectral
|
|
4430
5373
|
* features and per-window timbre frames).
|
|
4431
5374
|
*/
|
|
5375
|
+
declare function analyzeTimbre(request: AnalyzeTimbreRequest): TimbreAnalysisResult;
|
|
4432
5376
|
declare function analyzeTimbre(samples: Float32Array, sampleRate?: number, options?: AnalyzeTimbreOptions): TimbreAnalysisResult;
|
|
4433
5377
|
/**
|
|
4434
5378
|
* Whether this WASM build was compiled with FFmpeg support. Mirrors Node /
|
|
@@ -4521,6 +5465,10 @@ interface FrameBuffer {
|
|
|
4521
5465
|
nFrames: number;
|
|
4522
5466
|
/** Number of mel bands; flat `mel` is `[nFrames * nMels]` row-major. */
|
|
4523
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;
|
|
4524
5472
|
timestamps: Float32Array;
|
|
4525
5473
|
/**
|
|
4526
5474
|
* Mel spectrogram in LINEAR power (not dB) — the raw per-frame mel energies.
|
|
@@ -4558,6 +5506,9 @@ interface StreamQuantizeConfig {
|
|
|
4558
5506
|
interface StreamFramesU8 {
|
|
4559
5507
|
nFrames: number;
|
|
4560
5508
|
nMels: number;
|
|
5509
|
+
nChroma: number;
|
|
5510
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5511
|
+
featureFlags: number;
|
|
4561
5512
|
timestamps: Float32Array;
|
|
4562
5513
|
/** Row-major `[nFrames * nMels]` mel in dB, quantized over `[melDbMin, melDbMax]`. */
|
|
4563
5514
|
mel: Uint8Array;
|
|
@@ -4570,6 +5521,9 @@ interface StreamFramesU8 {
|
|
|
4570
5521
|
interface StreamFramesI16 {
|
|
4571
5522
|
nFrames: number;
|
|
4572
5523
|
nMels: number;
|
|
5524
|
+
nChroma: number;
|
|
5525
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5526
|
+
featureFlags: number;
|
|
4573
5527
|
timestamps: Float32Array;
|
|
4574
5528
|
/** Row-major `[nFrames * nMels]` mel in dB, quantized over `[melDbMin, melDbMax]`. */
|
|
4575
5529
|
mel: Int16Array;
|
|
@@ -4602,13 +5556,14 @@ interface StreamConfig {
|
|
|
4602
5556
|
computeSpectral?: boolean;
|
|
4603
5557
|
emitEveryNFrames?: number;
|
|
4604
5558
|
magnitudeDownsample?: number;
|
|
4605
|
-
/** Maximum unread frames; overflow drops the
|
|
5559
|
+
/** Maximum unread frames; overflow drops the newly produced frame. */
|
|
4606
5560
|
maxPendingFrames?: number;
|
|
4607
5561
|
/** Maximum retained chord and bar progression entries; overflow drops oldest. */
|
|
4608
5562
|
maxProgressionEntries?: number;
|
|
4609
5563
|
keyUpdateIntervalSec?: number;
|
|
4610
5564
|
bpmUpdateIntervalSec?: number;
|
|
4611
5565
|
window?: number;
|
|
5566
|
+
/** @deprecated Must be 0 (Float32). Use readFramesU8/readFramesI16 explicitly. */
|
|
4612
5567
|
outputFormat?: number;
|
|
4613
5568
|
}
|
|
4614
5569
|
type StreamConfigDefaults = Required<StreamConfig>;
|
|
@@ -4634,6 +5589,16 @@ declare function streamAnalyzerConfigDefaults(): StreamConfigDefaults;
|
|
|
4634
5589
|
* console.log('Key:', stats.estimate.key);
|
|
4635
5590
|
* console.log('Chord progression:', stats.estimate.chordProgression);
|
|
4636
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.
|
|
4637
5602
|
*/
|
|
4638
5603
|
declare class StreamAnalyzer {
|
|
4639
5604
|
private analyzer;
|
|
@@ -4658,7 +5623,7 @@ declare class StreamAnalyzer {
|
|
|
4658
5623
|
*/
|
|
4659
5624
|
processWithOffset(samples: Float32Array, sampleOffset: number): void;
|
|
4660
5625
|
/**
|
|
4661
|
-
*
|
|
5626
|
+
* Drain any high-rate resampler tail, then zero-pad the final partial frame.
|
|
4662
5627
|
*/
|
|
4663
5628
|
finalize(): void;
|
|
4664
5629
|
/**
|
|
@@ -4773,6 +5738,7 @@ interface MixerRealtimeBuffer {
|
|
|
4773
5738
|
*/
|
|
4774
5739
|
declare class Mixer {
|
|
4775
5740
|
private mixer;
|
|
5741
|
+
private readonly blockSize;
|
|
4776
5742
|
private constructor();
|
|
4777
5743
|
/**
|
|
4778
5744
|
* Build a mixer from a scene JSON string.
|
|
@@ -5435,4 +6401,4 @@ declare function voiceCharacterPresetId(preset: VoicePresetId | number): string
|
|
|
5435
6401
|
*/
|
|
5436
6402
|
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig | null;
|
|
5437
6403
|
|
|
5438
|
-
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 ExternalMidiEvent, 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, 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, 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 };
|
|
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 };
|