@libraz/libsonare 1.5.2 → 1.5.4
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 +69 -725
- package/dist/index.d.ts +1155 -183
- package/dist/index.js +4924 -3935
- 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 +1141 -970
- package/dist/worklet.js.map +1 -1
- package/package.json +15 -3
- package/src/_chain_config.ts +46 -0
- package/src/audio.ts +24 -4
- package/src/codes.ts +27 -4
- package/src/effects_mastering.ts +25 -1
- package/src/effects_transform.ts +292 -46
- package/src/effects_voice_change.ts +46 -53
- package/src/feature_core.ts +316 -12
- package/src/feature_music.ts +371 -4
- 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 +370 -83
- 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 +30 -6
- package/src/project_internal.ts +12 -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/realtime_voice_changer.ts +79 -3
- package/src/sonare.js.d.ts +35 -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,24 +1250,27 @@ 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
|
*
|
|
1079
1258
|
* @param samples - Audio samples (mono, float32)
|
|
1080
|
-
* @param sampleRate - Sample rate in Hz
|
|
1259
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
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.
|
|
1087
1267
|
*
|
|
1088
1268
|
* @param samples - Audio samples (mono, float32)
|
|
1089
|
-
* @param sampleRate - Sample rate in Hz
|
|
1269
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
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,15 +1331,20 @@ 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
|
*
|
|
1154
1342
|
* @param samples - Audio samples (mono, float32)
|
|
1155
|
-
* @param sampleRate - Sample rate in Hz
|
|
1343
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
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;
|
|
@@ -2266,6 +2645,10 @@ declare class Project {
|
|
|
2266
2645
|
undo(): void;
|
|
2267
2646
|
/** Redo the most recently undone edit. */
|
|
2268
2647
|
redo(): void;
|
|
2648
|
+
/** Clear the undo/redo history without changing the current project state. */
|
|
2649
|
+
clearHistory(): void;
|
|
2650
|
+
/** Cap the undo history depth (clamped to >= 1); evicts oldest entries beyond the cap. */
|
|
2651
|
+
setMaxUndoDepth(depth: number): void;
|
|
2269
2652
|
/** Replace a MIDI clip's entire event list. */
|
|
2270
2653
|
setMidiEvents(clipId: number, events: ReadonlyArray<ProjectMidiEvent | readonly [number, number, number]>): void;
|
|
2271
2654
|
/** Import an in-memory SMF buffer; returns the first added clip id. */
|
|
@@ -2304,10 +2687,12 @@ declare class Project {
|
|
|
2304
2687
|
* or not a MIDI clip.
|
|
2305
2688
|
*/
|
|
2306
2689
|
validateMidiNotes(clipId: number): ProjectNotePairValidation;
|
|
2307
|
-
/**
|
|
2308
|
-
|
|
2309
|
-
/**
|
|
2310
|
-
|
|
2690
|
+
/** Return ranked tempo-octave and detected-meter candidates without editing. */
|
|
2691
|
+
analyzeTempo(audio: Float32Array, sampleRate: number): ProjectTempoCandidate[];
|
|
2692
|
+
/** Detect and install a ranked tempo candidate; optionally apply detected meter. */
|
|
2693
|
+
autoTempo(audio: Float32Array, sampleRate: number, candidateIndex?: number, applyTimeSignatures?: boolean): number;
|
|
2694
|
+
/** Snap to a bar (`division=0`), beat (`1`), or beat subdivision (`2+`). */
|
|
2695
|
+
snapToGrid(ppq: number, strength?: number, division?: number): number;
|
|
2311
2696
|
/** Compile the project into a renderable timeline, surfacing diagnostics. */
|
|
2312
2697
|
compile(): ProjectCompileResult;
|
|
2313
2698
|
/**
|
|
@@ -2761,6 +3146,11 @@ declare class RealtimeEngine {
|
|
|
2761
3146
|
graphNodeCount(): number;
|
|
2762
3147
|
graphConnectionCount(): number;
|
|
2763
3148
|
setClips(clips: EngineClip[]): void;
|
|
3149
|
+
/**
|
|
3150
|
+
* Returns the PCM generated for a tempo-sync clip by the control-thread
|
|
3151
|
+
* setter, or `null` when the clip did not require a tempo-sync bake.
|
|
3152
|
+
*/
|
|
3153
|
+
prebakedClipChannels(clipId: number): Float32Array[] | null;
|
|
2764
3154
|
clipCount(): number;
|
|
2765
3155
|
setTrackLanes(lanes: Array<number | EngineTrackLane>): void;
|
|
2766
3156
|
/**
|
|
@@ -3046,69 +3436,333 @@ declare class SonareError extends Error {
|
|
|
3046
3436
|
/** Type guard: whether a caught value is a libsonare {@link SonareError}. */
|
|
3047
3437
|
declare function isSonareError(value: unknown): value is SonareError;
|
|
3048
3438
|
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3439
|
+
interface DbConversionRequest {
|
|
3440
|
+
values: Float32Array;
|
|
3441
|
+
ref?: number;
|
|
3442
|
+
amin?: number;
|
|
3443
|
+
topDb?: number;
|
|
3444
|
+
}
|
|
3445
|
+
interface SilenceRequest {
|
|
3446
|
+
samples: Float32Array;
|
|
3447
|
+
topDb?: number;
|
|
3448
|
+
frameLength?: number;
|
|
3449
|
+
hopLength?: number;
|
|
3450
|
+
}
|
|
3451
|
+
interface FrameSignalRequest {
|
|
3452
|
+
samples: Float32Array;
|
|
3453
|
+
frameLength: number;
|
|
3454
|
+
hopLength: number;
|
|
3455
|
+
}
|
|
3456
|
+
/** Canonical request form for pre/de-emphasis filters. */
|
|
3457
|
+
interface EmphasisRequest {
|
|
3458
|
+
samples: Float32Array;
|
|
3459
|
+
coef?: number;
|
|
3460
|
+
zi?: number;
|
|
3461
|
+
}
|
|
3462
|
+
/** Canonical request form for centering or extending a vector. */
|
|
3463
|
+
interface PadCenterRequest {
|
|
3464
|
+
values: Float32Array;
|
|
3465
|
+
targetSize: number;
|
|
3466
|
+
padValue?: number;
|
|
3467
|
+
}
|
|
3468
|
+
/** Canonical request form for resizing a vector. */
|
|
3469
|
+
interface FixLengthRequest {
|
|
3470
|
+
values: Float32Array;
|
|
3471
|
+
targetSize: number;
|
|
3472
|
+
padValue?: number;
|
|
3473
|
+
}
|
|
3474
|
+
/** Canonical request form for bounding a frame-index vector. */
|
|
3475
|
+
interface FixFramesRequest {
|
|
3476
|
+
frames: Int32Array;
|
|
3477
|
+
xMin?: number;
|
|
3478
|
+
xMax?: number;
|
|
3479
|
+
pad?: boolean;
|
|
3480
|
+
}
|
|
3481
|
+
/** Canonical request form for peak selection. */
|
|
3482
|
+
interface PeakPickRequest {
|
|
3483
|
+
values: Float32Array;
|
|
3484
|
+
preMax: number;
|
|
3485
|
+
postMax: number;
|
|
3486
|
+
preAvg: number;
|
|
3487
|
+
postAvg: number;
|
|
3488
|
+
delta: number;
|
|
3489
|
+
wait: number;
|
|
3490
|
+
}
|
|
3491
|
+
/** Canonical request form for vector normalization. */
|
|
3492
|
+
interface VectorNormalizeRequest {
|
|
3493
|
+
values: Float32Array;
|
|
3494
|
+
normType?: number;
|
|
3495
|
+
threshold?: number;
|
|
3496
|
+
}
|
|
3497
|
+
/** Canonical request form for tonal centroid projection. */
|
|
3498
|
+
interface TonnetzRequest {
|
|
3499
|
+
chromagram: Float32Array;
|
|
3500
|
+
nChroma: number;
|
|
3501
|
+
nFrames: number;
|
|
3502
|
+
}
|
|
3503
|
+
interface PcenRequest {
|
|
3504
|
+
values: Float32Array;
|
|
3505
|
+
nBins: number;
|
|
3506
|
+
nFrames: number;
|
|
3507
|
+
options?: Record<string, number>;
|
|
3508
|
+
}
|
|
3509
|
+
interface TempogramRequest {
|
|
3510
|
+
onsetEnvelope: Float32Array;
|
|
3511
|
+
sampleRate?: number;
|
|
3512
|
+
hopLength?: number;
|
|
3513
|
+
winLength?: number;
|
|
3514
|
+
mode?: TempogramMode;
|
|
3515
|
+
}
|
|
3516
|
+
interface CyclicTempogramRequest {
|
|
3517
|
+
onsetEnvelope: Float32Array;
|
|
3518
|
+
sampleRate?: number;
|
|
3519
|
+
hopLength?: number;
|
|
3520
|
+
winLength?: number;
|
|
3521
|
+
bpmMin?: number;
|
|
3522
|
+
nBins?: number;
|
|
3523
|
+
}
|
|
3524
|
+
interface PlpRequest {
|
|
3525
|
+
onsetEnvelope: Float32Array;
|
|
3526
|
+
sampleRate?: number;
|
|
3527
|
+
hopLength?: number;
|
|
3528
|
+
tempoMin?: number;
|
|
3529
|
+
tempoMax?: number;
|
|
3530
|
+
winLength?: number;
|
|
3531
|
+
}
|
|
3052
3532
|
/**
|
|
3053
|
-
*
|
|
3533
|
+
* Convert frequency in Hz to Mel scale.
|
|
3054
3534
|
*
|
|
3055
|
-
* @param
|
|
3056
|
-
* @
|
|
3057
|
-
* @returns NNLS chroma result
|
|
3535
|
+
* @param hz - Frequency in Hz
|
|
3536
|
+
* @returns Mel frequency
|
|
3058
3537
|
*/
|
|
3059
|
-
declare function
|
|
3538
|
+
declare function hzToMel(hz: number): number;
|
|
3060
3539
|
/**
|
|
3061
|
-
*
|
|
3540
|
+
* Convert Mel scale to frequency in Hz.
|
|
3062
3541
|
*
|
|
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
|
|
3542
|
+
* @param mel - Mel frequency
|
|
3543
|
+
* @returns Frequency in Hz
|
|
3070
3544
|
*/
|
|
3071
|
-
declare function
|
|
3545
|
+
declare function melToHz(mel: number): number;
|
|
3072
3546
|
/**
|
|
3073
|
-
*
|
|
3547
|
+
* Convert frequency in Hz to MIDI note number.
|
|
3074
3548
|
*
|
|
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
|
|
3549
|
+
* @param hz - Frequency in Hz
|
|
3550
|
+
* @returns MIDI note number (A4 = 440 Hz = 69)
|
|
3082
3551
|
*/
|
|
3083
|
-
declare function
|
|
3552
|
+
declare function hzToMidi(hz: number): number;
|
|
3084
3553
|
/**
|
|
3085
|
-
*
|
|
3554
|
+
* Convert MIDI note number to frequency in Hz.
|
|
3086
3555
|
*
|
|
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
|
|
3556
|
+
* @param midi - MIDI note number
|
|
3557
|
+
* @returns Frequency in Hz
|
|
3094
3558
|
*/
|
|
3095
|
-
declare function
|
|
3559
|
+
declare function midiToHz(midi: number): number;
|
|
3096
3560
|
/**
|
|
3097
|
-
*
|
|
3561
|
+
* Convert frequency in Hz to note name.
|
|
3098
3562
|
*
|
|
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)
|
|
3563
|
+
* @param hz - Frequency in Hz
|
|
3564
|
+
* @returns Note name (e.g., "A4", "C#5")
|
|
3107
3565
|
*/
|
|
3108
|
-
declare function
|
|
3109
|
-
/**
|
|
3110
|
-
|
|
3566
|
+
declare function hzToNote(hz: number): string;
|
|
3567
|
+
/**
|
|
3568
|
+
* Convert note name to frequency in Hz.
|
|
3569
|
+
*
|
|
3570
|
+
* @param note - Note name (e.g., "A4", "C#5")
|
|
3571
|
+
* @returns Frequency in Hz
|
|
3572
|
+
*/
|
|
3573
|
+
declare function noteToHz(note: string): number;
|
|
3574
|
+
/**
|
|
3575
|
+
* Convert frame index to time in seconds.
|
|
3576
|
+
*
|
|
3577
|
+
* @param frames - Frame index
|
|
3578
|
+
* @param sr - Sample rate in Hz (default: 22050)
|
|
3579
|
+
* @param hopLength - Hop length in samples (default: 512)
|
|
3580
|
+
* @returns Time in seconds
|
|
3581
|
+
*/
|
|
3582
|
+
declare function framesToTime(frames: number, sr?: number, hopLength?: number): number;
|
|
3583
|
+
/**
|
|
3584
|
+
* Convert time in seconds to frame index.
|
|
3585
|
+
*
|
|
3586
|
+
* @param time - Time in seconds
|
|
3587
|
+
* @param sr - Sample rate in Hz (default: 22050)
|
|
3588
|
+
* @param hopLength - Hop length in samples (default: 512)
|
|
3589
|
+
* @returns Frame index
|
|
3590
|
+
*/
|
|
3591
|
+
declare function timeToFrames(time: number, sr?: number, hopLength?: number): number;
|
|
3592
|
+
declare function framesToSamples(frames: number, hopLength?: number, nFft?: number): number;
|
|
3593
|
+
declare function samplesToFrames(samples: number, hopLength?: number, nFft?: number): number;
|
|
3594
|
+
declare function powerToDb(request: DbConversionRequest): Float32Array;
|
|
3595
|
+
declare function powerToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3596
|
+
declare function amplitudeToDb(request: DbConversionRequest): Float32Array;
|
|
3597
|
+
declare function amplitudeToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
3598
|
+
declare function dbToPower(values: Float32Array, ref?: number): Float32Array;
|
|
3599
|
+
declare function dbToAmplitude(values: Float32Array, ref?: number): Float32Array;
|
|
3600
|
+
declare function preemphasis(request: EmphasisRequest): Float32Array;
|
|
3601
|
+
declare function preemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3602
|
+
declare function deemphasis(request: EmphasisRequest): Float32Array;
|
|
3603
|
+
declare function deemphasis(samples: Float32Array, coef?: number, zi?: number): Float32Array;
|
|
3604
|
+
declare function trimSilence(request: SilenceRequest): WasmTrimResult;
|
|
3605
|
+
declare function trimSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): WasmTrimResult;
|
|
3606
|
+
declare function splitSilence(request: SilenceRequest): Int32Array;
|
|
3607
|
+
declare function splitSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): Int32Array;
|
|
3608
|
+
declare function frameSignal(request: FrameSignalRequest): WasmFrameResult;
|
|
3609
|
+
declare function frameSignal(samples: Float32Array, frameLength: number, hopLength: number): WasmFrameResult;
|
|
3610
|
+
declare function padCenter(request: PadCenterRequest): Float32Array;
|
|
3611
|
+
declare function padCenter(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3612
|
+
declare function fixLength(request: FixLengthRequest): Float32Array;
|
|
3613
|
+
declare function fixLength(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3614
|
+
declare function fixFrames(request: FixFramesRequest): Int32Array;
|
|
3615
|
+
declare function fixFrames(frames: Int32Array, xMin?: number, xMax?: number, pad?: boolean): Int32Array;
|
|
3616
|
+
declare function peakPick(request: PeakPickRequest): Int32Array;
|
|
3617
|
+
declare function peakPick(values: Float32Array, preMax: number, postMax: number, preAvg: number, postAvg: number, delta: number, wait: number): Int32Array;
|
|
3618
|
+
declare function vectorNormalize(request: VectorNormalizeRequest): Float32Array;
|
|
3619
|
+
declare function vectorNormalize(values: Float32Array, normType?: number, threshold?: number): Float32Array;
|
|
3620
|
+
declare function pcen(request: PcenRequest): Float32Array;
|
|
3621
|
+
declare function pcen(values: Float32Array, nBins: number, nFrames: number, options?: Record<string, number>): Float32Array;
|
|
3622
|
+
declare function tonnetz(request: TonnetzRequest): Float32Array;
|
|
3623
|
+
declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
|
|
3624
|
+
declare function tempogram(request: TempogramRequest): WasmTempogramResult;
|
|
3625
|
+
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
|
|
3626
|
+
declare function cyclicTempogram(request: CyclicTempogramRequest): WasmCyclicTempogramResult;
|
|
3627
|
+
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
|
|
3628
|
+
declare function plp(request: PlpRequest): Float32Array;
|
|
3629
|
+
declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, tempoMin?: number, tempoMax?: number, winLength?: number): Float32Array;
|
|
3630
|
+
|
|
3631
|
+
type GuardedOptions$2 = ValidateOptions;
|
|
3632
|
+
type AnalyzeSectionsGuardedOptions = AnalyzeSectionsOptions & ValidateOptions;
|
|
3633
|
+
type MelodyGuardedOptions = MelodyOptions & ValidateOptions;
|
|
3634
|
+
/** Canonical request form shared by the Constant-Q transform variants. */
|
|
3635
|
+
interface CqtRequest extends GuardedOptions$2 {
|
|
3636
|
+
samples: Float32Array;
|
|
3637
|
+
sampleRate?: number;
|
|
3638
|
+
hopLength?: number;
|
|
3639
|
+
fmin?: number;
|
|
3640
|
+
nBins?: number;
|
|
3641
|
+
binsPerOctave?: number;
|
|
3642
|
+
}
|
|
3643
|
+
/** Canonical request form for {@link vqt}. */
|
|
3644
|
+
interface VqtRequest extends CqtRequest {
|
|
3645
|
+
gamma?: number;
|
|
3646
|
+
}
|
|
3647
|
+
interface OnsetEnvelopeRequest extends GuardedOptions$2 {
|
|
3648
|
+
samples: Float32Array;
|
|
3649
|
+
sampleRate?: number;
|
|
3650
|
+
nFft?: number;
|
|
3651
|
+
hopLength?: number;
|
|
3652
|
+
nMels?: number;
|
|
3653
|
+
}
|
|
3654
|
+
interface OnsetStrengthMultiRequest extends OnsetEnvelopeRequest {
|
|
3655
|
+
nBands?: number;
|
|
3656
|
+
}
|
|
3657
|
+
interface FourierTempogramRequest extends GuardedOptions$2 {
|
|
3658
|
+
onsetEnvelope: Float32Array;
|
|
3659
|
+
sampleRate?: number;
|
|
3660
|
+
hopLength?: number;
|
|
3661
|
+
winLength?: number;
|
|
3662
|
+
}
|
|
3663
|
+
interface TempogramRatioRequest extends GuardedOptions$2 {
|
|
3664
|
+
tempogramData: Float32Array;
|
|
3665
|
+
winLength?: number;
|
|
3666
|
+
sampleRate?: number;
|
|
3667
|
+
hopLength?: number;
|
|
3668
|
+
factors?: Float32Array | number[];
|
|
3669
|
+
}
|
|
3670
|
+
interface CqtToAudioRequest extends GuardedOptions$2 {
|
|
3671
|
+
magnitude: Float32Array;
|
|
3672
|
+
nBins: number;
|
|
3673
|
+
nFrames: number;
|
|
3674
|
+
sampleRate?: number;
|
|
3675
|
+
hopLength?: number;
|
|
3676
|
+
fmin?: number;
|
|
3677
|
+
binsPerOctave?: number;
|
|
3678
|
+
nIter?: number;
|
|
3679
|
+
}
|
|
3680
|
+
interface VqtToAudioRequest extends CqtToAudioRequest {
|
|
3681
|
+
gamma?: number;
|
|
3682
|
+
}
|
|
3683
|
+
interface AnalyzeSectionsRequest extends AnalyzeSectionsGuardedOptions {
|
|
3684
|
+
samples: Float32Array;
|
|
3685
|
+
sampleRate?: number;
|
|
3686
|
+
}
|
|
3687
|
+
interface AnalyzeMelodyRequest extends MelodyGuardedOptions {
|
|
3688
|
+
samples: Float32Array;
|
|
3689
|
+
sampleRate?: number;
|
|
3690
|
+
}
|
|
3691
|
+
interface LufsRequest extends ValidateOptions {
|
|
3692
|
+
samples: Float32Array;
|
|
3693
|
+
sampleRate?: number;
|
|
3694
|
+
}
|
|
3695
|
+
interface NnlsChromaRequest extends GuardedOptions$2 {
|
|
3696
|
+
samples: Float32Array;
|
|
3697
|
+
sampleRate?: number;
|
|
3698
|
+
}
|
|
3699
|
+
/**
|
|
3700
|
+
* Compute NNLS (non-negative least squares) chromagram.
|
|
3701
|
+
*
|
|
3702
|
+
* @param samples - Audio samples (mono, float32)
|
|
3703
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3704
|
+
* @returns NNLS chroma result
|
|
3705
|
+
*/
|
|
3706
|
+
declare function nnlsChroma(request: NnlsChromaRequest): WasmNnlsChromaResult;
|
|
3707
|
+
declare function nnlsChroma(samples: Float32Array, sampleRate?: number, options?: GuardedOptions$2): WasmNnlsChromaResult;
|
|
3708
|
+
/**
|
|
3709
|
+
* Compute the Constant-Q Transform magnitude.
|
|
3710
|
+
*
|
|
3711
|
+
* @param samples - Audio samples (mono, float32)
|
|
3712
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3713
|
+
* @param hopLength - Hop length (default: 512)
|
|
3714
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3715
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3716
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3717
|
+
* @returns CQT magnitude result
|
|
3718
|
+
*/
|
|
3719
|
+
declare function cqt(request: CqtRequest): CqtResult;
|
|
3720
|
+
declare function cqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, options?: GuardedOptions$2): CqtResult;
|
|
3721
|
+
/**
|
|
3722
|
+
* Compute the pseudo Constant-Q Transform magnitude.
|
|
3723
|
+
*
|
|
3724
|
+
* @param samples - Audio samples (mono, float32)
|
|
3725
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3726
|
+
* @param hopLength - Hop length (default: 512)
|
|
3727
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3728
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3729
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3730
|
+
* @returns CQT magnitude result
|
|
3731
|
+
*/
|
|
3732
|
+
declare function pseudoCqt(request: CqtRequest): CqtResult;
|
|
3733
|
+
declare function pseudoCqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, options?: GuardedOptions$2): CqtResult;
|
|
3734
|
+
/**
|
|
3735
|
+
* Compute the hybrid Constant-Q Transform magnitude.
|
|
3736
|
+
*
|
|
3737
|
+
* @param samples - Audio samples (mono, float32)
|
|
3738
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3739
|
+
* @param hopLength - Hop length (default: 512)
|
|
3740
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3741
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3742
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3743
|
+
* @returns CQT magnitude result
|
|
3744
|
+
*/
|
|
3745
|
+
declare function hybridCqt(request: CqtRequest): CqtResult;
|
|
3746
|
+
declare function hybridCqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, options?: GuardedOptions$2): CqtResult;
|
|
3747
|
+
/**
|
|
3748
|
+
* Compute the Variable-Q Transform magnitude (gamma controls Q).
|
|
3749
|
+
*
|
|
3750
|
+
* @param samples - Audio samples (mono, float32)
|
|
3751
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
3752
|
+
* @param hopLength - Hop length (default: 512)
|
|
3753
|
+
* @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
|
|
3754
|
+
* @param nBins - Number of frequency bins (default: 84)
|
|
3755
|
+
* @param binsPerOctave - Bins per octave (default: 12)
|
|
3756
|
+
* @param gamma - Bandwidth offset; 0 is equivalent to CQT (default: 0)
|
|
3757
|
+
* @returns VQT magnitude result (same shape as CQT)
|
|
3758
|
+
*/
|
|
3759
|
+
declare function vqt(request: VqtRequest): CqtResult;
|
|
3760
|
+
declare function vqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, gamma?: number, options?: GuardedOptions$2): CqtResult;
|
|
3761
|
+
/** Reconstruct mono audio from row-major CQT magnitude via Griffin-Lim. */
|
|
3762
|
+
declare function cqtToAudio(request: CqtToAudioRequest): Float32Array;
|
|
3763
|
+
declare function cqtToAudio(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, hopLength?: number, fmin?: number, binsPerOctave?: number, nIter?: number, options?: GuardedOptions$2): Float32Array;
|
|
3111
3764
|
/** Reconstruct mono audio from row-major VQT magnitude via Griffin-Lim. */
|
|
3765
|
+
declare function vqtToAudio(request: VqtToAudioRequest): Float32Array;
|
|
3112
3766
|
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;
|
|
3113
3767
|
/**
|
|
3114
3768
|
* Detect song-structure sections (intro/verse/chorus/...).
|
|
@@ -3120,6 +3774,7 @@ declare function vqtToAudio(magnitude: Float32Array, nBins: number, nFrames: num
|
|
|
3120
3774
|
* @param minSectionSec - Minimum section duration in seconds (default: 4.0)
|
|
3121
3775
|
* @returns Array of detected sections
|
|
3122
3776
|
*/
|
|
3777
|
+
declare function analyzeSections(request: AnalyzeSectionsRequest): Section[];
|
|
3123
3778
|
declare function analyzeSections(samples: Float32Array, sampleRate?: number, options?: AnalyzeSectionsGuardedOptions): Section[];
|
|
3124
3779
|
/** Options for {@link analyzeMelody}. All fields are optional. */
|
|
3125
3780
|
interface MelodyOptions {
|
|
@@ -3153,6 +3808,7 @@ interface MelodyOptions {
|
|
|
3153
3808
|
* @param options - Tracker + tuning options ({@link MelodyOptions})
|
|
3154
3809
|
* @returns Melody contour with per-frame pitch points and summary stats
|
|
3155
3810
|
*/
|
|
3811
|
+
declare function analyzeMelody(request: AnalyzeMelodyRequest): MelodyResult;
|
|
3156
3812
|
declare function analyzeMelody(samples: Float32Array, sampleRate?: number, options?: MelodyGuardedOptions): MelodyResult;
|
|
3157
3813
|
/**
|
|
3158
3814
|
* Compute the onset strength envelope.
|
|
@@ -3164,6 +3820,7 @@ declare function analyzeMelody(samples: Float32Array, sampleRate?: number, optio
|
|
|
3164
3820
|
* @param nMels - Number of Mel bands (default: 128)
|
|
3165
3821
|
* @returns Onset envelope for each frame
|
|
3166
3822
|
*/
|
|
3823
|
+
declare function onsetEnvelope(request: OnsetEnvelopeRequest): Float32Array;
|
|
3167
3824
|
declare function onsetEnvelope(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, options?: GuardedOptions$2): Float32Array;
|
|
3168
3825
|
/**
|
|
3169
3826
|
* Compute multi-band onset strength envelopes.
|
|
@@ -3176,6 +3833,7 @@ declare function onsetEnvelope(samples: Float32Array, sampleRate?: number, nFft?
|
|
|
3176
3833
|
* @param nBands - Number of onset bands (default: 3)
|
|
3177
3834
|
* @returns Multi-band onset matrix
|
|
3178
3835
|
*/
|
|
3836
|
+
declare function onsetStrengthMulti(request: OnsetStrengthMultiRequest): OnsetStrengthMultiResult;
|
|
3179
3837
|
declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, nBands?: number, options?: GuardedOptions$2): OnsetStrengthMultiResult;
|
|
3180
3838
|
/**
|
|
3181
3839
|
* Compute the Fourier tempogram from an onset envelope.
|
|
@@ -3186,6 +3844,7 @@ declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number,
|
|
|
3186
3844
|
* @param winLength - Window length in frames (default: 384)
|
|
3187
3845
|
* @returns Fourier tempogram result
|
|
3188
3846
|
*/
|
|
3847
|
+
declare function fourierTempogram(request: FourierTempogramRequest): WasmFourierTempogramResult;
|
|
3189
3848
|
declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, options?: GuardedOptions$2): WasmFourierTempogramResult;
|
|
3190
3849
|
/**
|
|
3191
3850
|
* Compute tempogram ratio features.
|
|
@@ -3198,6 +3857,7 @@ declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: numb
|
|
|
3198
3857
|
* default {0.5, 1, 2, 3, 4} is used.
|
|
3199
3858
|
* @returns Tempogram ratio features (one value per factor)
|
|
3200
3859
|
*/
|
|
3860
|
+
declare function tempogramRatio(request: TempogramRatioRequest): Float32Array;
|
|
3201
3861
|
declare function tempogramRatio(tempogramData: Float32Array, winLength?: number, sampleRate?: number, hopLength?: number, factors?: Float32Array | number[], options?: GuardedOptions$2): Float32Array;
|
|
3202
3862
|
/**
|
|
3203
3863
|
* Measure loudness (EBU R128 / ITU-R BS.1770).
|
|
@@ -3208,6 +3868,7 @@ declare function tempogramRatio(tempogramData: Float32Array, winLength?: number,
|
|
|
3208
3868
|
* dependent and a wrong rate yields wrong loudness.
|
|
3209
3869
|
* @returns Loudness measurement result
|
|
3210
3870
|
*/
|
|
3871
|
+
declare function lufs(request: LufsRequest): LufsResult;
|
|
3211
3872
|
declare function lufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): LufsResult;
|
|
3212
3873
|
/**
|
|
3213
3874
|
* Compute the momentary loudness (LUFS) over time.
|
|
@@ -3217,6 +3878,7 @@ declare function lufs(samples: Float32Array, sampleRate?: number, options?: Vali
|
|
|
3217
3878
|
* K-weighting is sample-rate dependent; pass the buffer's actual rate.
|
|
3218
3879
|
* @returns Momentary LUFS values over time
|
|
3219
3880
|
*/
|
|
3881
|
+
declare function momentaryLufs(request: LufsRequest): Float32Array;
|
|
3220
3882
|
declare function momentaryLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
3221
3883
|
/**
|
|
3222
3884
|
* Compute the short-term loudness (LUFS) over time.
|
|
@@ -3226,90 +3888,9 @@ declare function momentaryLufs(samples: Float32Array, sampleRate?: number, optio
|
|
|
3226
3888
|
* K-weighting is sample-rate dependent; pass the buffer's actual rate.
|
|
3227
3889
|
* @returns Short-term LUFS values over time
|
|
3228
3890
|
*/
|
|
3891
|
+
declare function shortTermLufs(request: LufsRequest): Float32Array;
|
|
3229
3892
|
declare function shortTermLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
3230
3893
|
|
|
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
3894
|
/**
|
|
3314
3895
|
* Detect pitch using YIN algorithm.
|
|
3315
3896
|
*
|
|
@@ -3323,6 +3904,17 @@ declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength
|
|
|
3323
3904
|
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
3324
3905
|
* @returns Pitch detection result
|
|
3325
3906
|
*/
|
|
3907
|
+
interface PitchYinRequest {
|
|
3908
|
+
samples: Float32Array;
|
|
3909
|
+
sampleRate?: number;
|
|
3910
|
+
frameLength?: number;
|
|
3911
|
+
hopLength?: number;
|
|
3912
|
+
fmin?: number;
|
|
3913
|
+
fmax?: number;
|
|
3914
|
+
threshold?: number;
|
|
3915
|
+
fillNa?: boolean;
|
|
3916
|
+
}
|
|
3917
|
+
declare function pitchYin(request: PitchYinRequest): PitchResult;
|
|
3326
3918
|
declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3327
3919
|
/**
|
|
3328
3920
|
* Detect pitch using pYIN algorithm (probabilistic YIN with HMM smoothing).
|
|
@@ -3337,6 +3929,9 @@ declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLengt
|
|
|
3337
3929
|
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
3338
3930
|
* @returns Pitch detection result
|
|
3339
3931
|
*/
|
|
3932
|
+
interface PitchPyinRequest extends PitchYinRequest {
|
|
3933
|
+
}
|
|
3934
|
+
declare function pitchPyin(request: PitchPyinRequest): PitchResult;
|
|
3340
3935
|
declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3341
3936
|
|
|
3342
3937
|
/**
|
|
@@ -3347,8 +3942,97 @@ declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLeng
|
|
|
3347
3942
|
* @param targetSr - Target sample rate in Hz
|
|
3348
3943
|
* @returns Resampled audio
|
|
3349
3944
|
*/
|
|
3945
|
+
interface ResampleRequest {
|
|
3946
|
+
samples: Float32Array;
|
|
3947
|
+
srcSr: number;
|
|
3948
|
+
targetSr: number;
|
|
3949
|
+
}
|
|
3950
|
+
declare function resample(request: ResampleRequest): Float32Array;
|
|
3350
3951
|
declare function resample(samples: Float32Array, srcSr: number, targetSr: number): Float32Array;
|
|
3351
3952
|
|
|
3953
|
+
/** Canonical request form for frame-based spectral feature extraction. */
|
|
3954
|
+
interface SpectralFrameRequest {
|
|
3955
|
+
samples: Float32Array;
|
|
3956
|
+
sampleRate?: number;
|
|
3957
|
+
nFft?: number;
|
|
3958
|
+
hopLength?: number;
|
|
3959
|
+
}
|
|
3960
|
+
interface SpectralRolloffRequest extends SpectralFrameRequest {
|
|
3961
|
+
rollPercent?: number;
|
|
3962
|
+
}
|
|
3963
|
+
interface ZeroCrossingRateRequest {
|
|
3964
|
+
samples: Float32Array;
|
|
3965
|
+
sampleRate?: number;
|
|
3966
|
+
frameLength?: number;
|
|
3967
|
+
hopLength?: number;
|
|
3968
|
+
}
|
|
3969
|
+
interface DecomposeRequest {
|
|
3970
|
+
s: Float32Array;
|
|
3971
|
+
nFeatures: number;
|
|
3972
|
+
nFrames: number;
|
|
3973
|
+
nComponents: number;
|
|
3974
|
+
nIter?: number;
|
|
3975
|
+
beta?: number;
|
|
3976
|
+
}
|
|
3977
|
+
interface DecomposeWithInitRequest extends DecomposeRequest {
|
|
3978
|
+
init?: 'random' | 'nndsvd';
|
|
3979
|
+
}
|
|
3980
|
+
interface SpectralContrastRequest extends SpectralFrameRequest {
|
|
3981
|
+
nBands?: number;
|
|
3982
|
+
fmin?: number;
|
|
3983
|
+
quantile?: number;
|
|
3984
|
+
}
|
|
3985
|
+
interface PolyFeaturesRequest extends SpectralFrameRequest {
|
|
3986
|
+
order?: number;
|
|
3987
|
+
}
|
|
3988
|
+
interface ZeroCrossingsRequest {
|
|
3989
|
+
samples: Float32Array;
|
|
3990
|
+
threshold?: number;
|
|
3991
|
+
refMagnitude?: boolean;
|
|
3992
|
+
pad?: boolean;
|
|
3993
|
+
zeroPos?: boolean;
|
|
3994
|
+
}
|
|
3995
|
+
interface PitchTuningRequest {
|
|
3996
|
+
frequencies: Float32Array;
|
|
3997
|
+
resolution?: number;
|
|
3998
|
+
binsPerOctave?: number;
|
|
3999
|
+
}
|
|
4000
|
+
interface EstimateTuningRequest extends SpectralFrameRequest {
|
|
4001
|
+
resolution?: number;
|
|
4002
|
+
binsPerOctave?: number;
|
|
4003
|
+
}
|
|
4004
|
+
interface NnFilterRequest {
|
|
4005
|
+
s: Float32Array;
|
|
4006
|
+
nFeatures: number;
|
|
4007
|
+
nFrames: number;
|
|
4008
|
+
aggregate?: string;
|
|
4009
|
+
k?: number;
|
|
4010
|
+
width?: number;
|
|
4011
|
+
}
|
|
4012
|
+
interface RemixRequest {
|
|
4013
|
+
samples: Float32Array;
|
|
4014
|
+
intervals: Int32Array | ArrayLike<number>;
|
|
4015
|
+
sampleRate?: number;
|
|
4016
|
+
alignZeros?: boolean;
|
|
4017
|
+
}
|
|
4018
|
+
interface PhaseVocoderRequest extends SpectralFrameRequest {
|
|
4019
|
+
rate: number;
|
|
4020
|
+
}
|
|
4021
|
+
interface HpssWithResidualRequest {
|
|
4022
|
+
samples: Float32Array;
|
|
4023
|
+
sampleRate?: number;
|
|
4024
|
+
kernelHarmonic?: number;
|
|
4025
|
+
kernelPercussive?: number;
|
|
4026
|
+
}
|
|
4027
|
+
interface LufsInterleavedRequest extends ValidateOptions {
|
|
4028
|
+
samples: Float32Array;
|
|
4029
|
+
channels: number;
|
|
4030
|
+
sampleRate?: number;
|
|
4031
|
+
}
|
|
4032
|
+
interface Ebur128LoudnessRangeRequest extends ValidateOptions {
|
|
4033
|
+
samples: Float32Array;
|
|
4034
|
+
sampleRate?: number;
|
|
4035
|
+
}
|
|
3352
4036
|
/**
|
|
3353
4037
|
* Compute spectral centroid (center of mass of spectrum).
|
|
3354
4038
|
*
|
|
@@ -3358,36 +4042,43 @@ declare function resample(samples: Float32Array, srcSr: number, targetSr: number
|
|
|
3358
4042
|
* @param hopLength - Hop length (default: 512)
|
|
3359
4043
|
* @returns Spectral centroid in Hz for each frame
|
|
3360
4044
|
*/
|
|
4045
|
+
declare function spectralCentroid(request: SpectralFrameRequest): Float32Array;
|
|
3361
4046
|
declare function spectralCentroid(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3362
4047
|
/**
|
|
3363
4048
|
* Compute spectral contrast (librosa.feature.spectral_contrast).
|
|
3364
4049
|
*
|
|
3365
4050
|
* @returns Matrix2d of shape (nBands + 1) x nFrames.
|
|
3366
4051
|
*/
|
|
4052
|
+
declare function spectralContrast(request: SpectralContrastRequest): WasmMatrix2dResult;
|
|
3367
4053
|
declare function spectralContrast(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nBands?: number, fmin?: number, quantile?: number): WasmMatrix2dResult;
|
|
3368
4054
|
/**
|
|
3369
4055
|
* Fit per-frame polynomial coefficients (librosa.feature.poly_features).
|
|
3370
4056
|
*
|
|
3371
4057
|
* @returns Matrix2d of shape (order + 1) x nFrames.
|
|
3372
4058
|
*/
|
|
4059
|
+
declare function polyFeatures(request: PolyFeaturesRequest): WasmMatrix2dResult;
|
|
3373
4060
|
declare function polyFeatures(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, order?: number): WasmMatrix2dResult;
|
|
3374
4061
|
/**
|
|
3375
4062
|
* Locate zero-crossing indices of a signal (librosa.zero_crossings).
|
|
3376
4063
|
*/
|
|
4064
|
+
declare function zeroCrossings(request: ZeroCrossingsRequest): Int32Array;
|
|
3377
4065
|
declare function zeroCrossings(samples: Float32Array, threshold?: number, refMagnitude?: boolean, pad?: boolean, zeroPos?: boolean): Int32Array;
|
|
3378
4066
|
/**
|
|
3379
4067
|
* Estimate the global tuning offset from a set of frequencies
|
|
3380
4068
|
* (librosa.pitch_tuning). Returns a deviation in fractions of a bin.
|
|
3381
4069
|
*/
|
|
4070
|
+
declare function pitchTuning(request: PitchTuningRequest): number;
|
|
3382
4071
|
declare function pitchTuning(frequencies: Float32Array, resolution?: number, binsPerOctave?: number): number;
|
|
3383
4072
|
/**
|
|
3384
4073
|
* Estimate the tuning offset of an audio signal (librosa.estimate_tuning).
|
|
3385
4074
|
*/
|
|
4075
|
+
declare function estimateTuning(request: EstimateTuningRequest): number;
|
|
3386
4076
|
declare function estimateTuning(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, resolution?: number, binsPerOctave?: number): number;
|
|
3387
4077
|
/**
|
|
3388
4078
|
* Non-negative matrix factorisation of a flattened [nFeatures x nFrames]
|
|
3389
4079
|
* spectrogram (librosa.decompose.decompose). Returns the W and H factors.
|
|
3390
4080
|
*/
|
|
4081
|
+
declare function decompose(request: DecomposeRequest): WasmDecomposeResult;
|
|
3391
4082
|
declare function decompose(s: Float32Array, nFeatures: number, nFrames: number, nComponents: number, nIter?: number, beta?: number): WasmDecomposeResult;
|
|
3392
4083
|
/**
|
|
3393
4084
|
* Non-negative matrix factorisation with a selectable initialiser
|
|
@@ -3396,25 +4087,30 @@ declare function decompose(s: Float32Array, nFeatures: number, nFrames: number,
|
|
|
3396
4087
|
* or `'nndsvd'` (SVD-based warm start, which tends to converge in fewer
|
|
3397
4088
|
* iterations). Returns the W and H factors.
|
|
3398
4089
|
*/
|
|
4090
|
+
declare function decomposeWithInit(request: DecomposeWithInitRequest): WasmDecomposeResult;
|
|
3399
4091
|
declare function decomposeWithInit(s: Float32Array, nFeatures: number, nFrames: number, nComponents: number, nIter?: number, beta?: number, init?: 'random' | 'nndsvd'): WasmDecomposeResult;
|
|
3400
4092
|
/**
|
|
3401
4093
|
* Nearest-neighbour filtering of a flattened [nFeatures x nFrames] spectrogram
|
|
3402
4094
|
* (librosa.decompose.nn_filter).
|
|
3403
4095
|
*/
|
|
4096
|
+
declare function nnFilter(request: NnFilterRequest): WasmMatrix2dResult;
|
|
3404
4097
|
declare function nnFilter(s: Float32Array, nFeatures: number, nFrames: number, aggregate?: string, k?: number, width?: number): WasmMatrix2dResult;
|
|
3405
4098
|
/**
|
|
3406
4099
|
* Reorder/concatenate a signal by interval slices (librosa.effects.remix).
|
|
3407
4100
|
*
|
|
3408
4101
|
* @param intervals - Flat (start, end) sample pairs (even length).
|
|
3409
4102
|
*/
|
|
4103
|
+
declare function remix(request: RemixRequest): Float32Array;
|
|
3410
4104
|
declare function remix(samples: Float32Array, intervals: Int32Array | ArrayLike<number>, sampleRate?: number, alignZeros?: boolean): Float32Array;
|
|
3411
4105
|
/**
|
|
3412
4106
|
* Phase-vocoder time-scale modification (rate > 1 faster, < 1 slower).
|
|
3413
4107
|
*/
|
|
4108
|
+
declare function phaseVocoder(request: PhaseVocoderRequest): Float32Array;
|
|
3414
4109
|
declare function phaseVocoder(samples: Float32Array, rate: number, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3415
4110
|
/**
|
|
3416
4111
|
* HPSS into harmonic / percussive / residual signals.
|
|
3417
4112
|
*/
|
|
4113
|
+
declare function hpssWithResidual(request: HpssWithResidualRequest): WasmHpssWithResidualResult;
|
|
3418
4114
|
declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): WasmHpssWithResidualResult;
|
|
3419
4115
|
/**
|
|
3420
4116
|
* Channel-weighted multichannel integrated loudness + LRA (ITU-R BS.1770 /
|
|
@@ -3425,12 +4121,14 @@ declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, ke
|
|
|
3425
4121
|
* audio, and K-weighting is sample-rate dependent, so a wrong rate yields wrong
|
|
3426
4122
|
* loudness.
|
|
3427
4123
|
*/
|
|
4124
|
+
declare function lufsInterleaved(request: LufsInterleavedRequest): WasmLufsResult;
|
|
3428
4125
|
declare function lufsInterleaved(samples: Float32Array, channels: number, sampleRate?: number, options?: ValidateOptions): WasmLufsResult;
|
|
3429
4126
|
/**
|
|
3430
4127
|
* Standards-compliant EBU R128 loudness range (LRA) in LU. Pass the buffer's
|
|
3431
4128
|
* actual `sampleRate`: the default (22050) is non-standard and K-weighting is
|
|
3432
4129
|
* sample-rate dependent.
|
|
3433
4130
|
*/
|
|
4131
|
+
declare function ebur128LoudnessRange(request: Ebur128LoudnessRangeRequest): number;
|
|
3434
4132
|
declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number): number;
|
|
3435
4133
|
/**
|
|
3436
4134
|
* Compute spectral bandwidth.
|
|
@@ -3441,6 +4139,7 @@ declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number
|
|
|
3441
4139
|
* @param hopLength - Hop length (default: 512)
|
|
3442
4140
|
* @returns Spectral bandwidth in Hz for each frame
|
|
3443
4141
|
*/
|
|
4142
|
+
declare function spectralBandwidth(request: SpectralFrameRequest): Float32Array;
|
|
3444
4143
|
declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3445
4144
|
/**
|
|
3446
4145
|
* Compute spectral rolloff frequency.
|
|
@@ -3452,6 +4151,7 @@ declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, n
|
|
|
3452
4151
|
* @param rollPercent - Percentage threshold (default: 0.85)
|
|
3453
4152
|
* @returns Rolloff frequency in Hz for each frame
|
|
3454
4153
|
*/
|
|
4154
|
+
declare function spectralRolloff(request: SpectralRolloffRequest): Float32Array;
|
|
3455
4155
|
declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, rollPercent?: number): Float32Array;
|
|
3456
4156
|
/**
|
|
3457
4157
|
* Compute spectral flatness.
|
|
@@ -3462,6 +4162,7 @@ declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFf
|
|
|
3462
4162
|
* @param hopLength - Hop length (default: 512)
|
|
3463
4163
|
* @returns Spectral flatness for each frame (0 = tonal, 1 = noise-like)
|
|
3464
4164
|
*/
|
|
4165
|
+
declare function spectralFlatness(request: SpectralFrameRequest): Float32Array;
|
|
3465
4166
|
declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
3466
4167
|
/**
|
|
3467
4168
|
* Compute zero crossing rate.
|
|
@@ -3472,6 +4173,7 @@ declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nF
|
|
|
3472
4173
|
* @param hopLength - Hop length (default: 512)
|
|
3473
4174
|
* @returns Zero crossing rate for each frame
|
|
3474
4175
|
*/
|
|
4176
|
+
declare function zeroCrossingRate(request: ZeroCrossingRateRequest): Float32Array;
|
|
3475
4177
|
declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
3476
4178
|
/**
|
|
3477
4179
|
* Compute RMS energy.
|
|
@@ -3482,9 +4184,70 @@ declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, fr
|
|
|
3482
4184
|
* @param hopLength - Hop length (default: 512)
|
|
3483
4185
|
* @returns RMS energy for each frame
|
|
3484
4186
|
*/
|
|
4187
|
+
declare function rmsEnergy(request: ZeroCrossingRateRequest): Float32Array;
|
|
3485
4188
|
declare function rmsEnergy(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
3486
4189
|
|
|
3487
4190
|
type GuardedOptions$1 = ValidateOptions;
|
|
4191
|
+
/** Canonical request form for basic frame-based spectrogram features. */
|
|
4192
|
+
interface SpectrogramRequest extends GuardedOptions$1 {
|
|
4193
|
+
samples: Float32Array;
|
|
4194
|
+
sampleRate?: number;
|
|
4195
|
+
nFft?: number;
|
|
4196
|
+
hopLength?: number;
|
|
4197
|
+
}
|
|
4198
|
+
interface ChromaSpectrogramRequest extends GuardedOptions$1 {
|
|
4199
|
+
samples: Float32Array;
|
|
4200
|
+
sampleRate?: number;
|
|
4201
|
+
hopLength?: number;
|
|
4202
|
+
nChroma?: number;
|
|
4203
|
+
}
|
|
4204
|
+
interface MelSpectrogramRequest extends SpectrogramRequest {
|
|
4205
|
+
nMels?: number;
|
|
4206
|
+
fmin?: number;
|
|
4207
|
+
fmax?: number;
|
|
4208
|
+
htk?: boolean;
|
|
4209
|
+
}
|
|
4210
|
+
interface MfccRequest extends MelSpectrogramRequest {
|
|
4211
|
+
nMfcc?: number;
|
|
4212
|
+
lifter?: number;
|
|
4213
|
+
}
|
|
4214
|
+
interface MfccToMelRequest extends GuardedOptions$1 {
|
|
4215
|
+
mfccCoefficients: Float32Array;
|
|
4216
|
+
nMfcc: number;
|
|
4217
|
+
nFrames: number;
|
|
4218
|
+
nMels?: number;
|
|
4219
|
+
}
|
|
4220
|
+
/** Canonical request form for reconstruction from a Mel power spectrogram. */
|
|
4221
|
+
interface MelToStftRequest extends GuardedOptions$1 {
|
|
4222
|
+
melPower: Float32Array;
|
|
4223
|
+
nMels: number;
|
|
4224
|
+
nFrames: number;
|
|
4225
|
+
sampleRate?: number;
|
|
4226
|
+
nFft?: number;
|
|
4227
|
+
fmin?: number;
|
|
4228
|
+
fmax?: number;
|
|
4229
|
+
htk?: boolean;
|
|
4230
|
+
}
|
|
4231
|
+
/** Canonical request form for Griffin-Lim reconstruction from Mel power. */
|
|
4232
|
+
interface MelToAudioRequest extends MelToStftRequest {
|
|
4233
|
+
hopLength?: number;
|
|
4234
|
+
nIter?: number;
|
|
4235
|
+
}
|
|
4236
|
+
/** Canonical request form for Griffin-Lim reconstruction from MFCCs. */
|
|
4237
|
+
interface MfccToAudioRequest extends MfccToMelRequest {
|
|
4238
|
+
sampleRate?: number;
|
|
4239
|
+
nFft?: number;
|
|
4240
|
+
hopLength?: number;
|
|
4241
|
+
fmin?: number;
|
|
4242
|
+
fmax?: number;
|
|
4243
|
+
nIter?: number;
|
|
4244
|
+
htk?: boolean;
|
|
4245
|
+
}
|
|
4246
|
+
interface TrimRequest extends GuardedOptions$1 {
|
|
4247
|
+
samples: Float32Array;
|
|
4248
|
+
sampleRate: number;
|
|
4249
|
+
thresholdDb?: number;
|
|
4250
|
+
}
|
|
3488
4251
|
/**
|
|
3489
4252
|
* Trim silence from beginning and end of audio.
|
|
3490
4253
|
*
|
|
@@ -3493,6 +4256,7 @@ type GuardedOptions$1 = ValidateOptions;
|
|
|
3493
4256
|
* @param thresholdDb - Silence threshold in dB (default: -60 dB)
|
|
3494
4257
|
* @returns Trimmed audio
|
|
3495
4258
|
*/
|
|
4259
|
+
declare function trim(request: TrimRequest): Float32Array;
|
|
3496
4260
|
declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: number, options?: GuardedOptions$1): Float32Array;
|
|
3497
4261
|
/**
|
|
3498
4262
|
* Compute Short-Time Fourier Transform (STFT).
|
|
@@ -3503,6 +4267,7 @@ declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: n
|
|
|
3503
4267
|
* @param hopLength - Hop length (default: 512)
|
|
3504
4268
|
* @returns STFT result with magnitude and power spectrograms
|
|
3505
4269
|
*/
|
|
4270
|
+
declare function stft(request: SpectrogramRequest): StftResult;
|
|
3506
4271
|
declare function stft(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): StftResult;
|
|
3507
4272
|
/**
|
|
3508
4273
|
* Compute STFT and return magnitude in decibels.
|
|
@@ -3513,6 +4278,11 @@ declare function stft(samples: Float32Array, sampleRate?: number, nFft?: number,
|
|
|
3513
4278
|
* @param hopLength - Hop length (default: 512)
|
|
3514
4279
|
* @returns STFT result with dB values
|
|
3515
4280
|
*/
|
|
4281
|
+
declare function stftDb(request: SpectrogramRequest): {
|
|
4282
|
+
nBins: number;
|
|
4283
|
+
nFrames: number;
|
|
4284
|
+
db: Float32Array;
|
|
4285
|
+
};
|
|
3516
4286
|
declare function stftDb(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): {
|
|
3517
4287
|
nBins: number;
|
|
3518
4288
|
nFrames: number;
|
|
@@ -3527,6 +4297,7 @@ declare function stftDb(samples: Float32Array, sampleRate?: number, nFft?: numbe
|
|
|
3527
4297
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3528
4298
|
* @returns Chroma result
|
|
3529
4299
|
*/
|
|
4300
|
+
declare function chromaCens(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3530
4301
|
declare function chromaCens(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3531
4302
|
/**
|
|
3532
4303
|
* Compute a constant-Q chromagram (librosa.feature.chroma_cqt).
|
|
@@ -3537,6 +4308,7 @@ declare function chromaCens(samples: Float32Array, sampleRate?: number, hopLengt
|
|
|
3537
4308
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3538
4309
|
* @returns Chroma result
|
|
3539
4310
|
*/
|
|
4311
|
+
declare function chromaCqt(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3540
4312
|
declare function chromaCqt(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3541
4313
|
/**
|
|
3542
4314
|
* Compute low-frequency bass chroma.
|
|
@@ -3547,6 +4319,7 @@ declare function chromaCqt(samples: Float32Array, sampleRate?: number, hopLength
|
|
|
3547
4319
|
* @param nChroma - Number of chroma bins (default: 12)
|
|
3548
4320
|
* @returns Chroma result
|
|
3549
4321
|
*/
|
|
4322
|
+
declare function bassChroma(request: ChromaSpectrogramRequest): ChromaResult;
|
|
3550
4323
|
declare function bassChroma(samples: Float32Array, sampleRate?: number, hopLength?: number, nChroma?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3551
4324
|
/**
|
|
3552
4325
|
* Compute Mel spectrogram.
|
|
@@ -3562,6 +4335,7 @@ declare function bassChroma(samples: Float32Array, sampleRate?: number, hopLengt
|
|
|
3562
4335
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3563
4336
|
* @returns Mel spectrogram result
|
|
3564
4337
|
*/
|
|
4338
|
+
declare function melSpectrogram(request: MelSpectrogramRequest): MelSpectrogramResult;
|
|
3565
4339
|
declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, fmin?: number, fmax?: number, htk?: boolean, options?: GuardedOptions$1): MelSpectrogramResult;
|
|
3566
4340
|
/**
|
|
3567
4341
|
* Compute MFCC (Mel-Frequency Cepstral Coefficients).
|
|
@@ -3578,6 +4352,7 @@ declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft
|
|
|
3578
4352
|
* @param lifter - Cepstral liftering coefficient (default: 0 = no liftering)
|
|
3579
4353
|
* @returns MFCC result
|
|
3580
4354
|
*/
|
|
4355
|
+
declare function mfcc(request: MfccRequest): MfccResult;
|
|
3581
4356
|
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
4357
|
/**
|
|
3583
4358
|
* Approximate inverse of a Mel filterbank: Mel power spectrogram -> STFT power
|
|
@@ -3593,6 +4368,7 @@ declare function mfcc(samples: Float32Array, sampleRate?: number, nFft?: number,
|
|
|
3593
4368
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3594
4369
|
* @returns STFT power spectrogram result
|
|
3595
4370
|
*/
|
|
4371
|
+
declare function melToStft(request: MelToStftRequest): StftPowerResult;
|
|
3596
4372
|
declare function melToStft(melPower: Float32Array, nMels: number, nFrames: number, sampleRate?: number, nFft?: number, fmin?: number, fmax?: number, htk?: boolean, options?: GuardedOptions$1): StftPowerResult;
|
|
3597
4373
|
/**
|
|
3598
4374
|
* Reconstruct audio from a Mel power spectrogram via Griffin-Lim. Mirrors
|
|
@@ -3610,6 +4386,7 @@ declare function melToStft(melPower: Float32Array, nMels: number, nFrames: numbe
|
|
|
3610
4386
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3611
4387
|
* @returns Reconstructed audio samples (mono, float32)
|
|
3612
4388
|
*/
|
|
4389
|
+
declare function melToAudio(request: MelToAudioRequest): Float32Array;
|
|
3613
4390
|
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
4391
|
/**
|
|
3615
4392
|
* Invert MFCC coefficients back to a Mel power spectrogram. Mirrors
|
|
@@ -3621,6 +4398,7 @@ declare function melToAudio(melPower: Float32Array, nMels: number, nFrames: numb
|
|
|
3621
4398
|
* @param nMels - Number of Mel bins to reconstruct (default: 128)
|
|
3622
4399
|
* @returns Mel power spectrogram result
|
|
3623
4400
|
*/
|
|
4401
|
+
declare function mfccToMel(request: MfccToMelRequest): MelPowerResult;
|
|
3624
4402
|
declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels?: number, options?: GuardedOptions$1): MelPowerResult;
|
|
3625
4403
|
/**
|
|
3626
4404
|
* Reconstruct audio directly from MFCC coefficients via Griffin-Lim. Mirrors
|
|
@@ -3639,6 +4417,7 @@ declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrame
|
|
|
3639
4417
|
* @param htk - Use the HTK Mel formula instead of Slaney (default: false)
|
|
3640
4418
|
* @returns Reconstructed audio samples (mono, float32)
|
|
3641
4419
|
*/
|
|
4420
|
+
declare function mfccToAudio(request: MfccToAudioRequest): Float32Array;
|
|
3642
4421
|
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
4422
|
/**
|
|
3644
4423
|
* Compute STFT chromagram (librosa.feature.chroma_stft).
|
|
@@ -3655,6 +4434,7 @@ declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFra
|
|
|
3655
4434
|
* @param hopLength - Hop length (default: 512)
|
|
3656
4435
|
* @returns Chroma features result
|
|
3657
4436
|
*/
|
|
4437
|
+
declare function chroma(request: SpectrogramRequest): ChromaResult;
|
|
3658
4438
|
declare function chroma(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, options?: GuardedOptions$1): ChromaResult;
|
|
3659
4439
|
|
|
3660
4440
|
interface SonareWorkletMeterSnapshot {
|
|
@@ -3834,6 +4614,27 @@ interface SonareEngineSyncClipsDeltaMessage {
|
|
|
3834
4614
|
upserts: EngineClip[];
|
|
3835
4615
|
removeIds: number[];
|
|
3836
4616
|
}
|
|
4617
|
+
/** Begins a paged, pre-baked clip transfer. PCM pages follow in FIFO order. */
|
|
4618
|
+
interface SonareEngineSyncClipPageProviderMessage {
|
|
4619
|
+
type: 'syncClipPageProvider';
|
|
4620
|
+
clipId: number;
|
|
4621
|
+
clip: EngineClip;
|
|
4622
|
+
numChannels: number;
|
|
4623
|
+
numSamples: number;
|
|
4624
|
+
pageFrames: number;
|
|
4625
|
+
}
|
|
4626
|
+
/** Supplies one bounded PCM page for a pending pre-baked clip transfer. */
|
|
4627
|
+
interface SonareEngineSyncClipPageMessage {
|
|
4628
|
+
type: 'syncClipPage';
|
|
4629
|
+
clipId: number;
|
|
4630
|
+
pageIndex: number;
|
|
4631
|
+
channels: Float32Array[];
|
|
4632
|
+
}
|
|
4633
|
+
/** Makes a fully supplied paged clip visible to the audio engine. */
|
|
4634
|
+
interface SonareEngineSyncClipPageCommitMessage {
|
|
4635
|
+
type: 'syncClipPageCommit';
|
|
4636
|
+
clipId: number;
|
|
4637
|
+
}
|
|
3837
4638
|
interface SonareEngineSyncMidiClipsMessage {
|
|
3838
4639
|
type: 'syncMidiClips';
|
|
3839
4640
|
clips: EngineMidiClipSchedule[];
|
|
@@ -4030,7 +4831,7 @@ interface SonareEngineSyncExternalMidiClockMessage {
|
|
|
4030
4831
|
type: 'syncExternalMidiClock';
|
|
4031
4832
|
enabled: boolean;
|
|
4032
4833
|
}
|
|
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;
|
|
4834
|
+
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
4835
|
|
|
4035
4836
|
declare class SonareRealtimeEngineNode {
|
|
4036
4837
|
readonly node: AudioWorkletNode;
|
|
@@ -4136,14 +4937,38 @@ interface MeteringDynamicRangeOptions extends ValidateOptions {
|
|
|
4136
4937
|
/** High percentile in [0,1] (negative = library default, 0.95). Default -1. */
|
|
4137
4938
|
highPercentile?: number;
|
|
4138
4939
|
}
|
|
4940
|
+
/** Canonical request form for single-channel meter readings. */
|
|
4941
|
+
interface MeteringSamplesRequest extends ValidateOptions {
|
|
4942
|
+
samples: Float32Array;
|
|
4943
|
+
sampleRate?: number;
|
|
4944
|
+
}
|
|
4945
|
+
/** Canonical request form for true-peak analysis. */
|
|
4946
|
+
interface MeteringTruePeakRequest extends MeteringSamplesRequest {
|
|
4947
|
+
oversampleFactor?: number;
|
|
4948
|
+
}
|
|
4949
|
+
/** Canonical request form for clipping analysis. */
|
|
4950
|
+
interface MeteringDetectClippingRequest extends MeteringDetectClippingOptions {
|
|
4951
|
+
samples: Float32Array;
|
|
4952
|
+
sampleRate?: number;
|
|
4953
|
+
}
|
|
4954
|
+
/** Canonical request form for dynamic-range analysis. */
|
|
4955
|
+
interface MeteringDynamicRangeRequest extends MeteringDynamicRangeOptions {
|
|
4956
|
+
samples: Float32Array;
|
|
4957
|
+
sampleRate?: number;
|
|
4958
|
+
}
|
|
4959
|
+
declare function meteringPeakDb(request: MeteringSamplesRequest): number;
|
|
4139
4960
|
declare function meteringPeakDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4961
|
+
declare function meteringRmsDb(request: MeteringSamplesRequest): number;
|
|
4140
4962
|
declare function meteringRmsDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4963
|
+
declare function meteringCrestFactorDb(request: MeteringSamplesRequest): number;
|
|
4141
4964
|
declare function meteringCrestFactorDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4965
|
+
declare function meteringDcOffset(request: MeteringSamplesRequest): number;
|
|
4142
4966
|
declare function meteringDcOffset(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4143
4967
|
/**
|
|
4144
4968
|
* Inter-sample (true) peak in dBFS. `oversampleFactor` must be a power of two
|
|
4145
4969
|
* in [1, 16]; pass 0 to use the library default (4).
|
|
4146
4970
|
*/
|
|
4971
|
+
declare function meteringTruePeakDb(request: MeteringTruePeakRequest): number;
|
|
4147
4972
|
declare function meteringTruePeakDb(samples: Float32Array, sampleRate?: number, oversampleFactor?: number, options?: ValidateOptions): number;
|
|
4148
4973
|
/**
|
|
4149
4974
|
* Detect contiguous runs of clipped samples.
|
|
@@ -4151,6 +4976,7 @@ declare function meteringTruePeakDb(samples: Float32Array, sampleRate?: number,
|
|
|
4151
4976
|
* @param threshold Linear absolute threshold (default 0.999).
|
|
4152
4977
|
* @param minRegionSamples Minimum run length to report (default 1).
|
|
4153
4978
|
*/
|
|
4979
|
+
declare function meteringDetectClipping(request: MeteringDetectClippingRequest): ClippingReport;
|
|
4154
4980
|
declare function meteringDetectClipping(samples: Float32Array, sampleRate?: number, options?: MeteringDetectClippingOptions): ClippingReport;
|
|
4155
4981
|
/**
|
|
4156
4982
|
* Sliding-window dynamic range. Pass 0 for window/hop to use the library
|
|
@@ -4158,6 +4984,7 @@ declare function meteringDetectClipping(samples: Float32Array, sampleRate?: numb
|
|
|
4158
4984
|
* "use the library default" (low=0.10, high=0.95) because 0 is a literal 0th
|
|
4159
4985
|
* percentile; omitted percentiles therefore default to -1.
|
|
4160
4986
|
*/
|
|
4987
|
+
declare function meteringDynamicRange(request: MeteringDynamicRangeRequest): DynamicRangeReport;
|
|
4161
4988
|
declare function meteringDynamicRange(samples: Float32Array, sampleRate?: number, options?: MeteringDynamicRangeOptions): DynamicRangeReport;
|
|
4162
4989
|
/** Mid/side vectorscope point series for a (left, right) stereo pair. */
|
|
4163
4990
|
interface VectorscopeReport {
|
|
@@ -4206,6 +5033,44 @@ interface WaveformPeakPyramidOptions extends ValidateOptions {
|
|
|
4206
5033
|
/** Bucket widths in frames, one per zoom level. Default [512, 1024, 2048, 4096]. */
|
|
4207
5034
|
samplesPerBucketLevels?: number[];
|
|
4208
5035
|
}
|
|
5036
|
+
/** Canonical request form for stereo meter readings. */
|
|
5037
|
+
interface MeteringStereoRequest extends ValidateOptions {
|
|
5038
|
+
left: Float32Array;
|
|
5039
|
+
right: Float32Array;
|
|
5040
|
+
sampleRate?: number;
|
|
5041
|
+
}
|
|
5042
|
+
/** Canonical request form for display-decimated stereo scopes. */
|
|
5043
|
+
interface MeteringStereoDecimatedRequest extends MeteringStereoRequest {
|
|
5044
|
+
maxPoints?: number;
|
|
5045
|
+
}
|
|
5046
|
+
/** Options for the scope functions (mirrors the Node `ScopeOptions`). */
|
|
5047
|
+
interface ScopeOptions extends ValidateOptions {
|
|
5048
|
+
/**
|
|
5049
|
+
* Upper bound on the returned point count. Omit / `0` (or a value `>= length`)
|
|
5050
|
+
* yields one point per input sample; otherwise the point cloud is
|
|
5051
|
+
* deterministically decimated to at most `maxPoints` points for display.
|
|
5052
|
+
*/
|
|
5053
|
+
maxPoints?: number;
|
|
5054
|
+
}
|
|
5055
|
+
/** Canonical request form for whole-signal spectrum analysis. */
|
|
5056
|
+
interface MeteringSpectrumRequest extends SpectrumOptions, ValidateOptions {
|
|
5057
|
+
samples: Float32Array;
|
|
5058
|
+
sampleRate?: number;
|
|
5059
|
+
}
|
|
5060
|
+
/** Canonical request form for a single spectrum frame. */
|
|
5061
|
+
interface MeteringSpectrumFrameRequest extends MeteringSpectrumRequest {
|
|
5062
|
+
frameOffset?: number;
|
|
5063
|
+
}
|
|
5064
|
+
/** Canonical request form for waveform bucket generation. */
|
|
5065
|
+
interface WaveformPeaksRequest extends WaveformPeaksOptions {
|
|
5066
|
+
samples: Float32Array;
|
|
5067
|
+
channels: number;
|
|
5068
|
+
}
|
|
5069
|
+
/** Canonical request form for multi-resolution waveform bucket generation. */
|
|
5070
|
+
interface WaveformPeakPyramidRequest extends WaveformPeakPyramidOptions {
|
|
5071
|
+
samples: Float32Array;
|
|
5072
|
+
channels: number;
|
|
5073
|
+
}
|
|
4209
5074
|
/** Per-channel min/max waveform buckets. Arrays are channel-major. */
|
|
4210
5075
|
interface WaveformPeaksReport {
|
|
4211
5076
|
min: Float32Array;
|
|
@@ -4215,30 +5080,48 @@ interface WaveformPeaksReport {
|
|
|
4215
5080
|
samplesPerBucket: number;
|
|
4216
5081
|
}
|
|
4217
5082
|
/** Pearson correlation in [-1, 1] between two equal-length channels. */
|
|
5083
|
+
declare function meteringStereoCorrelation(request: MeteringStereoRequest): number;
|
|
4218
5084
|
declare function meteringStereoCorrelation(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
4219
5085
|
/**
|
|
4220
|
-
* Side / mid energy ratio
|
|
4221
|
-
*
|
|
5086
|
+
* Side / mid energy ratio in `[0, +Infinity)`: 0 = pure mono, ~1 = wide stereo,
|
|
5087
|
+
* larger = increasingly decorrelated / out-of-phase. The value is unbounded and
|
|
5088
|
+
* returns `Infinity` when the mid channel is silent (a mono-collapsed / fully
|
|
5089
|
+
* out-of-phase signal).
|
|
4222
5090
|
*/
|
|
5091
|
+
declare function meteringStereoWidth(request: MeteringStereoRequest): number;
|
|
4223
5092
|
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
5093
|
/**
|
|
4227
|
-
*
|
|
4228
|
-
*
|
|
4229
|
-
*
|
|
4230
|
-
|
|
5094
|
+
* Mid/side vectorscope point series. By default emits one point per input
|
|
5095
|
+
* sample; pass `maxPoints` to get a display-sized decimated point set (matching
|
|
5096
|
+
* the Node `meteringVectorscope` shape).
|
|
5097
|
+
*/
|
|
5098
|
+
declare function meteringVectorscope(request: MeteringStereoDecimatedRequest): VectorscopeReport;
|
|
5099
|
+
declare function meteringVectorscope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ScopeOptions): VectorscopeReport;
|
|
5100
|
+
/**
|
|
5101
|
+
* Display-sized mid/side vectorscope.
|
|
5102
|
+
*
|
|
5103
|
+
* @deprecated Pass `maxPoints` to {@link meteringVectorscope} instead; it now
|
|
5104
|
+
* folds `maxPoints` into the request, matching the Node surface. This alias is
|
|
5105
|
+
* kept for backward compatibility and simply delegates.
|
|
4231
5106
|
*/
|
|
5107
|
+
declare function meteringVectorscopeDecimated(request: MeteringStereoDecimatedRequest): VectorscopeReport;
|
|
4232
5108
|
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
5109
|
/**
|
|
4236
|
-
*
|
|
4237
|
-
*
|
|
4238
|
-
*
|
|
4239
|
-
*
|
|
4240
|
-
|
|
5110
|
+
* Phase-scope point series plus summary stats. By default emits one point per
|
|
5111
|
+
* input sample; pass `maxPoints` to decimate the point cloud for display
|
|
5112
|
+
* (matching the Node `meteringPhaseScope` shape). The summary stats are always
|
|
5113
|
+
* computed over the full-resolution signal.
|
|
5114
|
+
*/
|
|
5115
|
+
declare function meteringPhaseScope(request: MeteringStereoDecimatedRequest): PhaseScopeReport;
|
|
5116
|
+
declare function meteringPhaseScope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ScopeOptions): PhaseScopeReport;
|
|
5117
|
+
/**
|
|
5118
|
+
* Display-sized phase scope.
|
|
5119
|
+
*
|
|
5120
|
+
* @deprecated Pass `maxPoints` to {@link meteringPhaseScope} instead; it now
|
|
5121
|
+
* folds `maxPoints` into the request, matching the Node surface. This alias is
|
|
5122
|
+
* kept for backward compatibility and simply delegates.
|
|
4241
5123
|
*/
|
|
5124
|
+
declare function meteringPhaseScopeDecimated(request: MeteringStereoDecimatedRequest): PhaseScopeReport;
|
|
4242
5125
|
declare function meteringPhaseScopeDecimated(left: Float32Array, right: Float32Array, sampleRate?: number, maxPoints?: number, options?: ValidateOptions): PhaseScopeReport;
|
|
4243
5126
|
/**
|
|
4244
5127
|
* Welch-averaged magnitude / power / dB spectrum over the WHOLE signal (split
|
|
@@ -4246,6 +5129,7 @@ declare function meteringPhaseScopeDecimated(left: Float32Array, right: Float32A
|
|
|
4246
5129
|
* are averaged). For a true single-frame snapshot, use
|
|
4247
5130
|
* {@link meteringSpectrumFrame}.
|
|
4248
5131
|
*/
|
|
5132
|
+
declare function meteringSpectrum(request: MeteringSpectrumRequest): SpectrumReport;
|
|
4249
5133
|
declare function meteringSpectrum(samples: Float32Array, sampleRate?: number, options?: SpectrumOptions & ValidateOptions): SpectrumReport;
|
|
4250
5134
|
/**
|
|
4251
5135
|
* True single-frame magnitude / power / dB spectrum (one Hann-windowed
|
|
@@ -4253,13 +5137,61 @@ declare function meteringSpectrum(samples: Float32Array, sampleRate?: number, op
|
|
|
4253
5137
|
* time-averaged like {@link meteringSpectrum}. The analysis frame spans
|
|
4254
5138
|
* `[frameOffset, frameOffset + nFft)`; samples past the end are zero-padded.
|
|
4255
5139
|
*/
|
|
5140
|
+
declare function meteringSpectrumFrame(request: MeteringSpectrumFrameRequest): SpectrumReport;
|
|
4256
5141
|
declare function meteringSpectrumFrame(samples: Float32Array, sampleRate?: number, frameOffset?: number, options?: SpectrumOptions & ValidateOptions): SpectrumReport;
|
|
4257
5142
|
/** Compute per-channel min/max waveform buckets from interleaved audio. */
|
|
5143
|
+
declare function waveformPeaks(request: WaveformPeaksRequest): WaveformPeaksReport;
|
|
4258
5144
|
declare function waveformPeaks(samples: Float32Array, channels: number, options?: WaveformPeaksOptions): WaveformPeaksReport;
|
|
4259
5145
|
/** Compute waveform peak buckets for several zoom levels. */
|
|
5146
|
+
declare function waveformPeakPyramid(request: WaveformPeakPyramidRequest): WaveformPeaksReport[];
|
|
4260
5147
|
declare function waveformPeakPyramid(samples: Float32Array, channels: number, options?: WaveformPeakPyramidOptions): WaveformPeaksReport[];
|
|
4261
5148
|
|
|
4262
5149
|
type GuardedOptions = ValidateOptions;
|
|
5150
|
+
/** Canonical request form for one-shot analysis functions. */
|
|
5151
|
+
interface SamplesRequest extends GuardedOptions {
|
|
5152
|
+
samples: Float32Array;
|
|
5153
|
+
sampleRate?: number;
|
|
5154
|
+
}
|
|
5155
|
+
/** Canonical request form for key detection functions. */
|
|
5156
|
+
interface DetectKeyRequest extends KeyDetectionOptions, SamplesRequest {
|
|
5157
|
+
}
|
|
5158
|
+
/** Canonical request form for analysis with synchronous progress reporting. */
|
|
5159
|
+
interface AnalyzeWithProgressRequest extends SamplesRequest {
|
|
5160
|
+
onProgress: ProgressCallback;
|
|
5161
|
+
}
|
|
5162
|
+
/** Canonical request form for chord detection. */
|
|
5163
|
+
interface DetectChordsRequest extends ChordDetectionOptions, SamplesRequest {
|
|
5164
|
+
}
|
|
5165
|
+
/** Canonical request form for functional chord analysis. */
|
|
5166
|
+
interface ChordFunctionalAnalysisRequest extends DetectChordsRequest {
|
|
5167
|
+
keyRoot: PitchClass;
|
|
5168
|
+
/** Musical mode; defaults to {@link Mode.Major}. */
|
|
5169
|
+
keyMode?: Mode;
|
|
5170
|
+
}
|
|
5171
|
+
/** Canonical request form for impulse-response analysis. */
|
|
5172
|
+
interface AnalyzeImpulseResponseRequest extends SamplesRequest {
|
|
5173
|
+
nOctaveBands?: number;
|
|
5174
|
+
}
|
|
5175
|
+
/** Canonical request form for acoustic analysis. */
|
|
5176
|
+
interface DetectAcousticRequest extends AcousticOptions, SamplesRequest {
|
|
5177
|
+
}
|
|
5178
|
+
/** Canonical request form for equivalent-room estimation. */
|
|
5179
|
+
interface EstimateRoomRequest extends RoomEstimateOptions, SamplesRequest {
|
|
5180
|
+
}
|
|
5181
|
+
/** Canonical request form for room-reverb morphing. */
|
|
5182
|
+
interface RoomMorphRequest extends RoomMorphOptions, GuardedOptions {
|
|
5183
|
+
samples: Float32Array;
|
|
5184
|
+
sampleRate: number;
|
|
5185
|
+
}
|
|
5186
|
+
/** Canonical request forms for detailed music-analysis APIs. */
|
|
5187
|
+
interface AnalyzeBpmRequest extends AnalyzeBpmOptions, SamplesRequest {
|
|
5188
|
+
}
|
|
5189
|
+
interface AnalyzeRhythmRequest extends AnalyzeRhythmOptions, SamplesRequest {
|
|
5190
|
+
}
|
|
5191
|
+
interface AnalyzeDynamicsRequest extends AnalyzeDynamicsOptions, SamplesRequest {
|
|
5192
|
+
}
|
|
5193
|
+
interface AnalyzeTimbreRequest extends AnalyzeTimbreOptions, SamplesRequest {
|
|
5194
|
+
}
|
|
4263
5195
|
/**
|
|
4264
5196
|
* Detect BPM from audio samples.
|
|
4265
5197
|
*
|
|
@@ -4267,6 +5199,7 @@ type GuardedOptions = ValidateOptions;
|
|
|
4267
5199
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4268
5200
|
* @returns Detected BPM
|
|
4269
5201
|
*/
|
|
5202
|
+
declare function detectBpm(request: SamplesRequest): number;
|
|
4270
5203
|
declare function detectBpm(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): number;
|
|
4271
5204
|
/**
|
|
4272
5205
|
* Detect musical key from audio samples.
|
|
@@ -4275,7 +5208,9 @@ declare function detectBpm(samples: Float32Array, sampleRate?: number, options?:
|
|
|
4275
5208
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4276
5209
|
* @returns Detected key
|
|
4277
5210
|
*/
|
|
5211
|
+
declare function detectKey(request: DetectKeyRequest): Key;
|
|
4278
5212
|
declare function detectKey(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): Key;
|
|
5213
|
+
declare function detectKeyCandidates(request: DetectKeyRequest): KeyCandidate[];
|
|
4279
5214
|
declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): KeyCandidate[];
|
|
4280
5215
|
/**
|
|
4281
5216
|
* Detect onset times from audio samples.
|
|
@@ -4284,6 +5219,7 @@ declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number,
|
|
|
4284
5219
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4285
5220
|
* @returns Array of onset times in seconds
|
|
4286
5221
|
*/
|
|
5222
|
+
declare function detectOnsets(request: SamplesRequest): Float32Array;
|
|
4287
5223
|
declare function detectOnsets(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4288
5224
|
/**
|
|
4289
5225
|
* Detect beat times from audio samples.
|
|
@@ -4292,6 +5228,7 @@ declare function detectOnsets(samples: Float32Array, sampleRate?: number, option
|
|
|
4292
5228
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4293
5229
|
* @returns Array of beat times in seconds
|
|
4294
5230
|
*/
|
|
5231
|
+
declare function detectBeats(request: SamplesRequest): Float32Array;
|
|
4295
5232
|
declare function detectBeats(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4296
5233
|
/**
|
|
4297
5234
|
* Detect downbeat times from audio samples.
|
|
@@ -4300,6 +5237,7 @@ declare function detectBeats(samples: Float32Array, sampleRate?: number, options
|
|
|
4300
5237
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
4301
5238
|
* @returns Array of downbeat times in seconds
|
|
4302
5239
|
*/
|
|
5240
|
+
declare function detectDownbeats(request: SamplesRequest): Float32Array;
|
|
4303
5241
|
declare function detectDownbeats(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
4304
5242
|
/**
|
|
4305
5243
|
* Detect chords from audio samples.
|
|
@@ -4309,6 +5247,7 @@ declare function detectDownbeats(samples: Float32Array, sampleRate?: number, opt
|
|
|
4309
5247
|
* @param options - Optional chord detection settings
|
|
4310
5248
|
* @returns Detected chord segments
|
|
4311
5249
|
*/
|
|
5250
|
+
declare function detectChords(request: DetectChordsRequest): ChordAnalysisResult;
|
|
4312
5251
|
declare function detectChords(samples: Float32Array, sampleRate?: number, options?: ChordDetectionOptions): ChordAnalysisResult;
|
|
4313
5252
|
/**
|
|
4314
5253
|
* Functional (Roman-numeral) harmonic analysis of the detected chord
|
|
@@ -4317,7 +5256,8 @@ declare function detectChords(samples: Float32Array, sampleRate?: number, option
|
|
|
4317
5256
|
*
|
|
4318
5257
|
* @returns One Roman-numeral label (e.g. "I", "IV", "V", "vi") per detected chord
|
|
4319
5258
|
*/
|
|
4320
|
-
declare function chordFunctionalAnalysis(
|
|
5259
|
+
declare function chordFunctionalAnalysis(request: ChordFunctionalAnalysisRequest): string[];
|
|
5260
|
+
declare function chordFunctionalAnalysis(samples: Float32Array, keyRoot: PitchClass, keyMode?: Mode, sampleRate?: number, options?: ChordDetectionOptions): string[];
|
|
4321
5261
|
/**
|
|
4322
5262
|
* Perform complete music analysis.
|
|
4323
5263
|
*
|
|
@@ -4333,8 +5273,11 @@ declare function chordFunctionalAnalysis(samples: Float32Array, keyRoot: PitchCl
|
|
|
4333
5273
|
* the UI responsive for long inputs, drive this from a Web Worker and use
|
|
4334
5274
|
* {@link analyzeWithProgress} to report progress.
|
|
4335
5275
|
*/
|
|
5276
|
+
declare function analyze(request: SamplesRequest): AnalysisResult;
|
|
4336
5277
|
declare function analyze(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): AnalysisResult;
|
|
5278
|
+
declare function analyzeImpulseResponse(request: AnalyzeImpulseResponseRequest): AcousticResult;
|
|
4337
5279
|
declare function analyzeImpulseResponse(samples: Float32Array, sampleRate?: number, nOctaveBands?: number): AcousticResult;
|
|
5280
|
+
declare function detectAcoustic(request: DetectAcousticRequest): AcousticResult;
|
|
4338
5281
|
declare function detectAcoustic(samples: Float32Array, sampleRate?: number, options?: AcousticOptions): AcousticResult;
|
|
4339
5282
|
/**
|
|
4340
5283
|
* Synthesize a room impulse response from shoebox geometry. `hasError` is true
|
|
@@ -4345,12 +5288,14 @@ declare function synthesizeRir(options?: RirSynthOptions): RirResult;
|
|
|
4345
5288
|
* Estimate an equivalent room (volume/dimensions/absorption/DRR) from a
|
|
4346
5289
|
* recording or impulse response.
|
|
4347
5290
|
*/
|
|
5291
|
+
declare function estimateRoom(request: EstimateRoomRequest): RoomEstimateResult;
|
|
4348
5292
|
declare function estimateRoom(samples: Float32Array, sampleRate?: number, options?: RoomEstimateOptions): RoomEstimateResult;
|
|
4349
5293
|
/**
|
|
4350
5294
|
* Morph a recording's reverberation toward a target room (creative FX, not
|
|
4351
5295
|
* dereverberation). Returns the morphed samples (input length plus the target
|
|
4352
5296
|
* room's reverb tail).
|
|
4353
5297
|
*/
|
|
5298
|
+
declare function roomMorph(request: RoomMorphRequest): Float32Array;
|
|
4354
5299
|
declare function roomMorph(samples: Float32Array, sampleRate: number, options?: RoomMorphOptions): Float32Array;
|
|
4355
5300
|
/**
|
|
4356
5301
|
* Perform complete music analysis with progress reporting.
|
|
@@ -4360,6 +5305,7 @@ declare function roomMorph(samples: Float32Array, sampleRate: number, options?:
|
|
|
4360
5305
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
4361
5306
|
* @returns Complete analysis result
|
|
4362
5307
|
*/
|
|
5308
|
+
declare function analyzeWithProgress(request: AnalyzeWithProgressRequest): AnalysisResult;
|
|
4363
5309
|
declare function analyzeWithProgress(samples: Float32Array, sampleRate: number | undefined, onProgress: ProgressCallback): AnalysisResult;
|
|
4364
5310
|
interface BpmCandidate {
|
|
4365
5311
|
bpm: number;
|
|
@@ -4416,19 +5362,23 @@ interface TimbreAnalysisResult extends TimbreFrame {
|
|
|
4416
5362
|
* Detailed BPM analysis (BPM, confidence, alternate candidates, autocorrelation,
|
|
4417
5363
|
* tempogram). Matches the Node `analyzeBpm` / Python `analyze_bpm` surface.
|
|
4418
5364
|
*/
|
|
5365
|
+
declare function analyzeBpm(request: AnalyzeBpmRequest): BpmAnalysisResult;
|
|
4419
5366
|
declare function analyzeBpm(samples: Float32Array, sampleRate?: number, options?: AnalyzeBpmOptions): BpmAnalysisResult;
|
|
4420
5367
|
/**
|
|
4421
5368
|
* Detailed rhythm analysis (time signature, groove, syncopation, beat intervals).
|
|
4422
5369
|
*/
|
|
5370
|
+
declare function analyzeRhythm(request: AnalyzeRhythmRequest): RhythmAnalysisResult;
|
|
4423
5371
|
declare function analyzeRhythm(samples: Float32Array, sampleRate?: number, options?: AnalyzeRhythmOptions): RhythmAnalysisResult;
|
|
4424
5372
|
/**
|
|
4425
5373
|
* Dynamics analysis (RMS, peak, crest factor, LRA, loudness curve).
|
|
4426
5374
|
*/
|
|
5375
|
+
declare function analyzeDynamics(request: AnalyzeDynamicsRequest): DynamicsAnalysisResult;
|
|
4427
5376
|
declare function analyzeDynamics(samples: Float32Array, sampleRate?: number, options?: AnalyzeDynamicsOptions): DynamicsAnalysisResult;
|
|
4428
5377
|
/**
|
|
4429
5378
|
* Timbre analysis (brightness/warmth/density/roughness/complexity plus spectral
|
|
4430
5379
|
* features and per-window timbre frames).
|
|
4431
5380
|
*/
|
|
5381
|
+
declare function analyzeTimbre(request: AnalyzeTimbreRequest): TimbreAnalysisResult;
|
|
4432
5382
|
declare function analyzeTimbre(samples: Float32Array, sampleRate?: number, options?: AnalyzeTimbreOptions): TimbreAnalysisResult;
|
|
4433
5383
|
/**
|
|
4434
5384
|
* Whether this WASM build was compiled with FFmpeg support. Mirrors Node /
|
|
@@ -4521,6 +5471,10 @@ interface FrameBuffer {
|
|
|
4521
5471
|
nFrames: number;
|
|
4522
5472
|
/** Number of mel bands; flat `mel` is `[nFrames * nMels]` row-major. */
|
|
4523
5473
|
nMels: number;
|
|
5474
|
+
/** Chroma stride: 12 when enabled, otherwise 0. */
|
|
5475
|
+
nChroma: number;
|
|
5476
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5477
|
+
featureFlags: number;
|
|
4524
5478
|
timestamps: Float32Array;
|
|
4525
5479
|
/**
|
|
4526
5480
|
* Mel spectrogram in LINEAR power (not dB) — the raw per-frame mel energies.
|
|
@@ -4558,6 +5512,9 @@ interface StreamQuantizeConfig {
|
|
|
4558
5512
|
interface StreamFramesU8 {
|
|
4559
5513
|
nFrames: number;
|
|
4560
5514
|
nMels: number;
|
|
5515
|
+
nChroma: number;
|
|
5516
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5517
|
+
featureFlags: number;
|
|
4561
5518
|
timestamps: Float32Array;
|
|
4562
5519
|
/** Row-major `[nFrames * nMels]` mel in dB, quantized over `[melDbMin, melDbMax]`. */
|
|
4563
5520
|
mel: Uint8Array;
|
|
@@ -4570,6 +5527,9 @@ interface StreamFramesU8 {
|
|
|
4570
5527
|
interface StreamFramesI16 {
|
|
4571
5528
|
nFrames: number;
|
|
4572
5529
|
nMels: number;
|
|
5530
|
+
nChroma: number;
|
|
5531
|
+
/** MEL=1, CHROMA=2, ONSET=4, SPECTRAL=8. */
|
|
5532
|
+
featureFlags: number;
|
|
4573
5533
|
timestamps: Float32Array;
|
|
4574
5534
|
/** Row-major `[nFrames * nMels]` mel in dB, quantized over `[melDbMin, melDbMax]`. */
|
|
4575
5535
|
mel: Int16Array;
|
|
@@ -4602,13 +5562,14 @@ interface StreamConfig {
|
|
|
4602
5562
|
computeSpectral?: boolean;
|
|
4603
5563
|
emitEveryNFrames?: number;
|
|
4604
5564
|
magnitudeDownsample?: number;
|
|
4605
|
-
/** Maximum unread frames; overflow drops the
|
|
5565
|
+
/** Maximum unread frames; overflow drops the newly produced frame. */
|
|
4606
5566
|
maxPendingFrames?: number;
|
|
4607
5567
|
/** Maximum retained chord and bar progression entries; overflow drops oldest. */
|
|
4608
5568
|
maxProgressionEntries?: number;
|
|
4609
5569
|
keyUpdateIntervalSec?: number;
|
|
4610
5570
|
bpmUpdateIntervalSec?: number;
|
|
4611
5571
|
window?: number;
|
|
5572
|
+
/** @deprecated Must be 0 (Float32). Use readFramesU8/readFramesI16 explicitly. */
|
|
4612
5573
|
outputFormat?: number;
|
|
4613
5574
|
}
|
|
4614
5575
|
type StreamConfigDefaults = Required<StreamConfig>;
|
|
@@ -4634,6 +5595,16 @@ declare function streamAnalyzerConfigDefaults(): StreamConfigDefaults;
|
|
|
4634
5595
|
* console.log('Key:', stats.estimate.key);
|
|
4635
5596
|
* console.log('Chord progression:', stats.estimate.chordProgression);
|
|
4636
5597
|
* ```
|
|
5598
|
+
*
|
|
5599
|
+
* The native analyzer supports one serialized producer (`process`,
|
|
5600
|
+
* `processWithOffset`, or `finalize`) concurrently with one serialized consumer
|
|
5601
|
+
* (`availableFrames`, a `readFrames*` method, `stats`, `frameCount`, or
|
|
5602
|
+
* `currentTime`) when a threaded WASM host shares the native instance.
|
|
5603
|
+
* Publication is allocation-free release/acquire. `reset`, setters, and
|
|
5604
|
+
* deletion require both roles to be stopped. A full pending ring drops the
|
|
5605
|
+
* newly produced output frame while analysis totals keep advancing. Ordinary
|
|
5606
|
+
* browser builds remain single-threaded unless the host explicitly provisions
|
|
5607
|
+
* shared-memory worker support.
|
|
4637
5608
|
*/
|
|
4638
5609
|
declare class StreamAnalyzer {
|
|
4639
5610
|
private analyzer;
|
|
@@ -4658,7 +5629,7 @@ declare class StreamAnalyzer {
|
|
|
4658
5629
|
*/
|
|
4659
5630
|
processWithOffset(samples: Float32Array, sampleOffset: number): void;
|
|
4660
5631
|
/**
|
|
4661
|
-
*
|
|
5632
|
+
* Drain any high-rate resampler tail, then zero-pad the final partial frame.
|
|
4662
5633
|
*/
|
|
4663
5634
|
finalize(): void;
|
|
4664
5635
|
/**
|
|
@@ -4773,6 +5744,7 @@ interface MixerRealtimeBuffer {
|
|
|
4773
5744
|
*/
|
|
4774
5745
|
declare class Mixer {
|
|
4775
5746
|
private mixer;
|
|
5747
|
+
private readonly blockSize;
|
|
4776
5748
|
private constructor();
|
|
4777
5749
|
/**
|
|
4778
5750
|
* Build a mixer from a scene JSON string.
|
|
@@ -5056,7 +6028,7 @@ declare class RealtimeVoiceChanger {
|
|
|
5056
6028
|
constructor(config?: RealtimeVoiceChangerConfigInput);
|
|
5057
6029
|
prepare(sampleRate: number, maxBlockSize?: number, channels?: number): void;
|
|
5058
6030
|
reset(): void;
|
|
5059
|
-
setConfig(config: RealtimeVoiceChangerConfigInput): void;
|
|
6031
|
+
setConfig(config: RealtimeVoiceChangerConfigInput | RealtimeVoiceChangerPodConfig): void;
|
|
5060
6032
|
configJson(): string;
|
|
5061
6033
|
latencySamples(): number;
|
|
5062
6034
|
processMono(samples: Float32Array): Float32Array;
|
|
@@ -5435,4 +6407,4 @@ declare function voiceCharacterPresetId(preset: VoicePresetId | number): string
|
|
|
5435
6407
|
*/
|
|
5436
6408
|
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig | null;
|
|
5437
6409
|
|
|
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 };
|
|
6410
|
+
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 };
|