@libraz/libsonare 1.5.5 → 1.7.0
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 +109 -20
- package/dist/analysis.d.ts +5809 -0
- package/dist/analysis.js +2574 -0
- package/dist/analysis.js.map +1 -0
- package/dist/index.d.ts +884 -55
- package/dist/index.js +1302 -292
- package/dist/index.js.map +1 -1
- package/dist/schemas/realtime-voice-changer-preset-pack.schema.json +27 -0
- package/dist/schemas/realtime-voice-changer-preset.schema.json +140 -0
- package/dist/sonare-analysis.js +2 -0
- package/dist/sonare-analysis.wasm +0 -0
- package/dist/sonare.js +1 -1
- package/dist/sonare.wasm +0 -0
- package/dist/worker.d.ts +65 -0
- package/dist/worker.js +734 -0
- package/dist/worker.js.map +1 -0
- package/dist/worklet.d.ts +628 -88
- package/dist/worklet.js +1816 -266
- package/dist/worklet.js.map +1 -1
- package/package.json +23 -11
- package/src/_chain_config.ts +5 -3
- package/src/analysis.ts +137 -0
- package/src/analysis_helpers.ts +40 -29
- package/src/audio.ts +7 -2
- package/src/clip_page_streamer.ts +62 -8
- package/src/codes.ts +87 -64
- package/src/effects_mastering.ts +1 -0
- package/src/effects_transform.ts +179 -10
- package/src/errors.ts +1 -0
- package/src/feature_core.ts +140 -2
- package/src/feature_music.ts +25 -3
- package/src/feature_pitch.ts +70 -1
- package/src/feature_spectral.ts +295 -7
- package/src/feature_spectrogram.ts +203 -3
- package/src/features.ts +16 -1
- package/src/index.ts +120 -8
- package/src/mastering_chain.ts +20 -8
- package/src/mastering_core.ts +5 -0
- package/src/mastering_dynamics.ts +7 -1
- package/src/metering.ts +6 -1
- package/src/mixer.ts +3 -3
- package/src/opfs_clip_pages.ts +26 -1
- package/src/project.ts +13 -0
- package/src/project_class.ts +204 -23
- package/src/project_internal.ts +38 -34
- package/src/project_types.ts +114 -11
- package/src/public_types.ts +68 -0
- package/src/public_types_mastering.ts +22 -0
- package/src/public_types_mixing.ts +27 -2
- package/src/public_types_music.ts +9 -0
- package/src/public_types_realtime.ts +23 -5
- package/src/public_types_spectral.ts +33 -0
- package/src/quick_analysis.ts +46 -10
- package/src/realtime_engine.ts +167 -6
- package/src/realtime_voice_changer.ts +51 -77
- package/src/sonare-analysis.js.d.ts +8 -0
- package/src/sonare.js.d.ts +340 -6
- package/src/stream_analyzer.ts +6 -1
- package/src/streaming_processors.ts +15 -0
- package/src/web_midi.ts +46 -11
- package/src/worker.ts +196 -0
- package/src/worker_client.ts +352 -0
- package/src/worker_protocol.ts +59 -0
- package/src/worklet/engine-automation.ts +2 -1
- package/src/worklet/engine-capture-facade.ts +13 -4
- package/src/worklet/engine-clips.ts +12 -3
- package/src/worklet/engine-node.ts +264 -21
- package/src/worklet/engine-offline.ts +7 -2
- package/src/worklet/engine-parameter-facade.ts +55 -5
- package/src/worklet/engine-processor.ts +435 -62
- package/src/worklet/engine-register.ts +9 -1
- package/src/worklet/engine-strips.ts +19 -3
- package/src/worklet/engine-sync.ts +2 -6
- package/src/worklet/engine-tempo-facade.ts +8 -6
- package/src/worklet/engine.ts +390 -13
- package/src/worklet/guards.ts +121 -8
- package/src/worklet/messages.ts +166 -8
- package/src/worklet/protocol.ts +305 -17
- package/src/worklet/voice-changer-processor.ts +12 -15
- package/src/worklet.ts +20 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProgressCallback, WasmNnlsChromaResult,
|
|
1
|
+
import { ProgressCallback, WasmNnlsChromaResult, WasmExternalMidiEvent, WasmEngineTransportState, WasmEngineTempoSegment, WasmEngineTimeSignatureSegment, WasmEngineParameterInfo, WasmEngineAutomationPoint, WasmEngineMarker, WasmEngineMetronomeConfig, WasmEngineGraphSpec, WasmEngineClip, WasmClipPageRequest, 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
|
/**
|
|
@@ -404,6 +404,24 @@ interface StageGainReduction {
|
|
|
404
404
|
*/
|
|
405
405
|
gainReductionDb: number;
|
|
406
406
|
}
|
|
407
|
+
/** Existing EBU R128 measurements captured before or after mastering. */
|
|
408
|
+
interface MasteringLoudnessSummary {
|
|
409
|
+
integratedLufs: number;
|
|
410
|
+
maxMomentaryLufs: number;
|
|
411
|
+
maxShortTermLufs: number;
|
|
412
|
+
truePeakDbtp: number;
|
|
413
|
+
loudnessRange: number;
|
|
414
|
+
}
|
|
415
|
+
/** Compact explanation of how an offline mastering chain changed a program. */
|
|
416
|
+
interface MasteringReport {
|
|
417
|
+
before: MasteringLoudnessSummary;
|
|
418
|
+
after: MasteringLoudnessSummary;
|
|
419
|
+
appliedGainDb: number;
|
|
420
|
+
maxGainReductionDb: number;
|
|
421
|
+
loudnessTargetLimited: boolean;
|
|
422
|
+
/** 32 logarithmically-spaced after-minus-before spectral energy deltas (dB). */
|
|
423
|
+
bandEnergyDeltaDb: Float32Array;
|
|
424
|
+
}
|
|
407
425
|
interface MasteringChainResult {
|
|
408
426
|
/** Latency-compensated offline output; no separate latency field is reported. */
|
|
409
427
|
samples: Float32Array;
|
|
@@ -424,6 +442,7 @@ interface MasteringChainResult {
|
|
|
424
442
|
loudnessTargetLimited: boolean;
|
|
425
443
|
/** Per-stage gain reductions for the dynamics/maximizer stages (a subset of `stages`). */
|
|
426
444
|
stageGainReductions: StageGainReduction[];
|
|
445
|
+
report: MasteringReport;
|
|
427
446
|
}
|
|
428
447
|
interface MasteringChainStereoResult {
|
|
429
448
|
left: Float32Array;
|
|
@@ -438,6 +457,7 @@ interface MasteringChainStereoResult {
|
|
|
438
457
|
outputLra: number;
|
|
439
458
|
loudnessTargetLimited: boolean;
|
|
440
459
|
stageGainReductions: StageGainReduction[];
|
|
460
|
+
report: MasteringReport;
|
|
441
461
|
}
|
|
442
462
|
/**
|
|
443
463
|
* @deprecated Use {@link MasteringChainStereoResult}. Retained as an alias for
|
|
@@ -455,7 +475,7 @@ interface MasteringStereoResult {
|
|
|
455
475
|
latencySamples: number;
|
|
456
476
|
}
|
|
457
477
|
|
|
458
|
-
type PanMode = 'balance' | 'stereoPan' | 'stereo-pan' | 'dualPan' | 'dual-pan' | number;
|
|
478
|
+
type PanMode = 'balance' | 'pan' | 'stereoPan' | 'stereo-pan' | 'dualPan' | 'dual-pan' | number;
|
|
459
479
|
/**
|
|
460
480
|
* Surround pan position for a strip feeding a >2-channel bus. Phase 1 honors
|
|
461
481
|
* `azimuth`/`divergence`/`lfe`; `elevation`/`distance` are reserved. All fields
|
|
@@ -527,9 +547,15 @@ interface MixerProcessResult {
|
|
|
527
547
|
type AutomationCurve = 'linear' | 'exponential' | 'hold' | 's-curve';
|
|
528
548
|
/**
|
|
529
549
|
* Pan law applied when computing left/right gains from a pan position
|
|
530
|
-
* (see {@link Mixer.setPanLaw}).
|
|
550
|
+
* (see {@link Mixer.setPanLaw}). On mono strips it changes the centre gain;
|
|
551
|
+
* on stereo Balance strips it changes only the far-channel taper, while centre
|
|
552
|
+
* remains unity. Maps to the underlying integer code.
|
|
531
553
|
*/
|
|
532
554
|
type PanLaw = 'const3dB' | 'const4.5dB' | 'const6dB' | 'linear0dB';
|
|
555
|
+
/** Accepted pan-law name aliases for mixer and realtime-engine inputs. */
|
|
556
|
+
type PanLawName = PanLaw | 'const-3db' | '-3db' | 'const-4.5db' | '-4.5db' | 'const-6db' | '-6db' | 'linear-0db' | 'linear' | '0db';
|
|
557
|
+
/** Pan-law name or raw C ABI ordinal. */
|
|
558
|
+
type PanLawInput = PanLawName | number;
|
|
533
559
|
/**
|
|
534
560
|
* Meter tap point for reading a strip's meter snapshot
|
|
535
561
|
* (see {@link Mixer.meterTap} and {@link Mixer.stripMeter}).
|
|
@@ -810,6 +836,12 @@ interface TimeSignature {
|
|
|
810
836
|
denominator: number;
|
|
811
837
|
confidence: number;
|
|
812
838
|
}
|
|
839
|
+
/** Existing tempo-estimator hypothesis retained by unified analysis. */
|
|
840
|
+
interface BpmHypothesis {
|
|
841
|
+
value: number;
|
|
842
|
+
confidence: number;
|
|
843
|
+
relation: 'primary' | 'half' | 'double' | 'other';
|
|
844
|
+
}
|
|
813
845
|
/**
|
|
814
846
|
* Rhythm features
|
|
815
847
|
*/
|
|
@@ -836,8 +868,10 @@ interface MelodyContour {
|
|
|
836
868
|
interface AnalysisResult {
|
|
837
869
|
bpm: number;
|
|
838
870
|
bpmConfidence: number;
|
|
871
|
+
bpmCandidates: BpmHypothesis[];
|
|
839
872
|
key: Key;
|
|
840
873
|
timeSignature: TimeSignature;
|
|
874
|
+
timeSignatureCandidates: TimeSignature[];
|
|
841
875
|
beatTimes: Float32Array;
|
|
842
876
|
beats: Beat[];
|
|
843
877
|
chords: Chord[];
|
|
@@ -931,14 +965,21 @@ interface EqMatchOptions {
|
|
|
931
965
|
maxBands?: number;
|
|
932
966
|
}
|
|
933
967
|
type VoicePresetId = 'neutral-monitor' | 'bright-idol' | 'soft-whisper' | 'deep-narrator' | 'robot-mascot' | 'dark-villain';
|
|
934
|
-
|
|
968
|
+
type VoicePresetCategory = 'monitor' | 'bright' | 'soft' | 'deep' | 'robot' | 'dark' | 'custom';
|
|
969
|
+
interface RealtimeVoiceChangerPresetMetadata {
|
|
935
970
|
schemaVersion: 1;
|
|
936
|
-
id
|
|
937
|
-
name
|
|
971
|
+
id: string;
|
|
972
|
+
name: string;
|
|
938
973
|
description?: string;
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
974
|
+
category: VoicePresetCategory;
|
|
975
|
+
}
|
|
976
|
+
type RealtimeVoiceChangerPreset = (RealtimeVoiceChangerPresetMetadata & {
|
|
977
|
+
dsp: Record<string, unknown>;
|
|
978
|
+
macros?: never;
|
|
979
|
+
}) | (RealtimeVoiceChangerPresetMetadata & {
|
|
980
|
+
macros: Record<string, number>;
|
|
981
|
+
dsp?: never;
|
|
982
|
+
});
|
|
942
983
|
type RealtimeVoiceChangerConfigInput = VoicePresetId | RealtimeVoiceChangerPreset;
|
|
943
984
|
/**
|
|
944
985
|
* Flat (POD) realtime voice-changer configuration. Keys are camelCase to match
|
|
@@ -1152,6 +1193,35 @@ interface PitchResult {
|
|
|
1152
1193
|
medianF0: number;
|
|
1153
1194
|
meanF0: number;
|
|
1154
1195
|
}
|
|
1196
|
+
/** Per-bin pitch candidates and peak magnitudes from spectral piptrack. */
|
|
1197
|
+
interface PiptrackResult {
|
|
1198
|
+
nBins: number;
|
|
1199
|
+
nFrames: number;
|
|
1200
|
+
pitches: Float32Array;
|
|
1201
|
+
magnitudes: Float32Array;
|
|
1202
|
+
}
|
|
1203
|
+
/** Magnitude and reassigned time/frequency coordinates for every STFT bin. */
|
|
1204
|
+
interface ReassignedSpectrogramResult {
|
|
1205
|
+
nBins: number;
|
|
1206
|
+
nFrames: number;
|
|
1207
|
+
magnitude: Float32Array;
|
|
1208
|
+
times: Float32Array;
|
|
1209
|
+
frequencies: Float32Array;
|
|
1210
|
+
}
|
|
1211
|
+
/** Row-major matrix returned by librosa.segment-compatible APIs. */
|
|
1212
|
+
interface SegmentMatrix {
|
|
1213
|
+
rows: number;
|
|
1214
|
+
cols: number;
|
|
1215
|
+
values: Float32Array;
|
|
1216
|
+
}
|
|
1217
|
+
/** One stable monophonic note region segmented from an F0 track. */
|
|
1218
|
+
interface NoteSegment {
|
|
1219
|
+
frameStart: number;
|
|
1220
|
+
frameEnd: number;
|
|
1221
|
+
startSeconds: number;
|
|
1222
|
+
endSeconds: number;
|
|
1223
|
+
medianCents: number;
|
|
1224
|
+
}
|
|
1155
1225
|
/**
|
|
1156
1226
|
* Loudness measurement result (EBU R128 / ITU-R BS.1770)
|
|
1157
1227
|
*/
|
|
@@ -1176,12 +1246,77 @@ interface HpssResult {
|
|
|
1176
1246
|
sampleRate: number;
|
|
1177
1247
|
}
|
|
1178
1248
|
|
|
1249
|
+
/** Runtime capabilities reported by the loaded libsonare build. */
|
|
1250
|
+
interface SonareCapabilities {
|
|
1251
|
+
version: string;
|
|
1252
|
+
abi: {
|
|
1253
|
+
project: number;
|
|
1254
|
+
engine: number;
|
|
1255
|
+
};
|
|
1256
|
+
platform: string;
|
|
1257
|
+
features: {
|
|
1258
|
+
mastering: boolean;
|
|
1259
|
+
mixing: boolean;
|
|
1260
|
+
fx: boolean;
|
|
1261
|
+
ffmpeg: boolean;
|
|
1262
|
+
};
|
|
1263
|
+
decode: {
|
|
1264
|
+
builtin: string[];
|
|
1265
|
+
ffmpeg: string[];
|
|
1266
|
+
};
|
|
1267
|
+
simd: string;
|
|
1268
|
+
hardwareConcurrency: number;
|
|
1269
|
+
}
|
|
1270
|
+
/** One parameter descriptor in the cross-surface capability catalog. */
|
|
1271
|
+
interface CapabilityCatalogParameter {
|
|
1272
|
+
name: string;
|
|
1273
|
+
id: number;
|
|
1274
|
+
rtSafe: boolean;
|
|
1275
|
+
type: 'boolean' | 'number';
|
|
1276
|
+
min: number | null;
|
|
1277
|
+
max: number | null;
|
|
1278
|
+
default: boolean | number | null;
|
|
1279
|
+
unit: string | null;
|
|
1280
|
+
}
|
|
1281
|
+
/** One named mastering processor and its host-facing capabilities. */
|
|
1282
|
+
interface CapabilityCatalogProcessor {
|
|
1283
|
+
id: string;
|
|
1284
|
+
kind: 'realtime' | 'offline' | 'pair';
|
|
1285
|
+
realtimeInsertable: boolean;
|
|
1286
|
+
stereoOnly: boolean;
|
|
1287
|
+
latencySamples: number;
|
|
1288
|
+
tailSamples: number;
|
|
1289
|
+
/** Coarse realtime work estimate, or null when the processor is not an insert. */
|
|
1290
|
+
realtimeCost: 'low' | 'moderate' | 'high' | null;
|
|
1291
|
+
channelPolicy: 'multichannel' | 'stereoPairOnly' | 'perChannel' | 'passthrough';
|
|
1292
|
+
category: string;
|
|
1293
|
+
params: CapabilityCatalogParameter[];
|
|
1294
|
+
}
|
|
1295
|
+
/** Built-in preset names grouped by feature family. */
|
|
1296
|
+
interface CapabilityCatalogPresets {
|
|
1297
|
+
mastering: string[];
|
|
1298
|
+
synth: string[];
|
|
1299
|
+
mixingScene: string[];
|
|
1300
|
+
voiceChanger: string[];
|
|
1301
|
+
}
|
|
1302
|
+
/** Complete runtime catalog exposed by {@link capabilityCatalog}. */
|
|
1303
|
+
interface CapabilityCatalog {
|
|
1304
|
+
version: string;
|
|
1305
|
+
abi: SonareCapabilities['abi'];
|
|
1306
|
+
processors: CapabilityCatalogProcessor[];
|
|
1307
|
+
presets: CapabilityCatalogPresets;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
type NormalizeMode = 'peak' | 'rms';
|
|
1179
1311
|
/** Canonical request form for HPSS. */
|
|
1180
1312
|
interface HpssRequest {
|
|
1181
1313
|
samples: Float32Array;
|
|
1182
1314
|
sampleRate?: number;
|
|
1183
1315
|
kernelHarmonic?: number;
|
|
1184
1316
|
kernelPercussive?: number;
|
|
1317
|
+
nFft?: number;
|
|
1318
|
+
hopLength?: number;
|
|
1319
|
+
hardMask?: boolean;
|
|
1185
1320
|
}
|
|
1186
1321
|
interface HarmonicRequest extends ValidateOptions {
|
|
1187
1322
|
samples: Float32Array;
|
|
@@ -1195,11 +1330,15 @@ interface TimeStretchRequest extends ValidateOptions {
|
|
|
1195
1330
|
samples: Float32Array;
|
|
1196
1331
|
sampleRate?: number;
|
|
1197
1332
|
rate: number;
|
|
1333
|
+
nFft?: number;
|
|
1334
|
+
hopLength?: number;
|
|
1198
1335
|
}
|
|
1199
1336
|
interface PitchShiftRequest extends ValidateOptions {
|
|
1200
1337
|
samples: Float32Array;
|
|
1201
1338
|
sampleRate?: number;
|
|
1202
1339
|
semitones: number;
|
|
1340
|
+
nFft?: number;
|
|
1341
|
+
hopLength?: number;
|
|
1203
1342
|
}
|
|
1204
1343
|
interface PitchCorrectToMidiRequest extends ValidateOptions {
|
|
1205
1344
|
samples: Float32Array;
|
|
@@ -1234,6 +1373,7 @@ interface NormalizeRequest extends ValidateOptions {
|
|
|
1234
1373
|
samples: Float32Array;
|
|
1235
1374
|
sampleRate?: number;
|
|
1236
1375
|
targetDb?: number;
|
|
1376
|
+
mode?: NormalizeMode;
|
|
1237
1377
|
}
|
|
1238
1378
|
interface SpectralEditRequest extends SpectralEditOptions, ValidateOptions {
|
|
1239
1379
|
samples: Float32Array;
|
|
@@ -1250,7 +1390,7 @@ interface SpectralEditRequest extends SpectralEditOptions, ValidateOptions {
|
|
|
1250
1390
|
* @returns Separated harmonic and percussive components
|
|
1251
1391
|
*/
|
|
1252
1392
|
declare function hpss(request: HpssRequest): HpssResult;
|
|
1253
|
-
declare function hpss(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): HpssResult;
|
|
1393
|
+
declare function hpss(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number, nFft?: number, hopLength?: number, hardMask?: boolean): HpssResult;
|
|
1254
1394
|
/**
|
|
1255
1395
|
* Extract harmonic component from audio.
|
|
1256
1396
|
*
|
|
@@ -1279,6 +1419,7 @@ declare function percussive(samples: Float32Array, sampleRate?: number, options?
|
|
|
1279
1419
|
*/
|
|
1280
1420
|
declare function timeStretch(request: TimeStretchRequest): Float32Array;
|
|
1281
1421
|
declare function timeStretch(samples: Float32Array, sampleRate: number, rate: number, options?: ValidateOptions): Float32Array;
|
|
1422
|
+
declare function timeStretch(samples: Float32Array, sampleRate: number, rate: number, nFft?: number, hopLength?: number, options?: ValidateOptions): Float32Array;
|
|
1282
1423
|
/**
|
|
1283
1424
|
* Pitch-shift audio without changing duration.
|
|
1284
1425
|
*
|
|
@@ -1289,6 +1430,7 @@ declare function timeStretch(samples: Float32Array, sampleRate: number, rate: nu
|
|
|
1289
1430
|
*/
|
|
1290
1431
|
declare function pitchShift(request: PitchShiftRequest): Float32Array;
|
|
1291
1432
|
declare function pitchShift(samples: Float32Array, sampleRate: number, semitones: number, options?: ValidateOptions): Float32Array;
|
|
1433
|
+
declare function pitchShift(samples: Float32Array, sampleRate: number, semitones: number, nFft?: number, hopLength?: number, options?: ValidateOptions): Float32Array;
|
|
1292
1434
|
/**
|
|
1293
1435
|
* Pitch-correct audio from a current MIDI note to a target MIDI note.
|
|
1294
1436
|
*
|
|
@@ -1360,15 +1502,18 @@ declare function noteStretch(samples: Float32Array, sampleRate?: number, options
|
|
|
1360
1502
|
declare function noteMove(request: NoteMoveRequest): Float32Array;
|
|
1361
1503
|
declare function noteMove(samples: Float32Array, sampleRate?: number, options?: NoteMoveOptions & ValidateOptions): Float32Array;
|
|
1362
1504
|
/**
|
|
1363
|
-
* Normalize audio to target peak level.
|
|
1505
|
+
* Normalize audio to a target peak or RMS level.
|
|
1364
1506
|
*
|
|
1365
1507
|
* @param samples - Audio samples (mono, float32)
|
|
1366
1508
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1367
|
-
* @param targetDb - Finite target at or below 0 dBFS (default: 0 dB = full scale)
|
|
1509
|
+
* @param targetDb - Finite target at or below 0 dBFS (default: 0 dB = full scale).
|
|
1510
|
+
* For `mode: 'peak'`, this is the peak target; for `mode: 'rms'`, this is the RMS target.
|
|
1511
|
+
* @param mode - Normalization mode: `'peak'` (default) or `'rms'`.
|
|
1368
1512
|
* @returns Normalized audio
|
|
1369
1513
|
*/
|
|
1370
1514
|
declare function normalize(request: NormalizeRequest): Float32Array;
|
|
1371
1515
|
declare function normalize(samples: Float32Array, sampleRate: number, targetDb?: number, options?: ValidateOptions): Float32Array;
|
|
1516
|
+
declare function normalize(samples: Float32Array, sampleRate: number, targetDb?: number, mode?: NormalizeMode, options?: ValidateOptions): Float32Array;
|
|
1372
1517
|
/**
|
|
1373
1518
|
* Apply region-based spectral edits (gain/attenuate/mute/heal) to mono audio.
|
|
1374
1519
|
*
|
|
@@ -1442,6 +1587,7 @@ interface MasteringChainRequest {
|
|
|
1442
1587
|
sampleRate?: number;
|
|
1443
1588
|
config?: MasteringChainConfig;
|
|
1444
1589
|
onProgress?: ProgressCallback;
|
|
1590
|
+
cancel?: () => boolean;
|
|
1445
1591
|
}
|
|
1446
1592
|
interface MasteringChainStereoRequest {
|
|
1447
1593
|
left: Float32Array;
|
|
@@ -1449,6 +1595,7 @@ interface MasteringChainStereoRequest {
|
|
|
1449
1595
|
sampleRate?: number;
|
|
1450
1596
|
config?: MasteringChainConfig;
|
|
1451
1597
|
onProgress?: ProgressCallback;
|
|
1598
|
+
cancel?: () => boolean;
|
|
1452
1599
|
}
|
|
1453
1600
|
/** Canonical request form for one-shot preset mastering. */
|
|
1454
1601
|
interface MasterAudioRequest {
|
|
@@ -1457,6 +1604,7 @@ interface MasterAudioRequest {
|
|
|
1457
1604
|
preset?: MasteringPreset;
|
|
1458
1605
|
overrides?: MasteringChainConfig;
|
|
1459
1606
|
onProgress?: ProgressCallback;
|
|
1607
|
+
cancel?: () => boolean;
|
|
1460
1608
|
}
|
|
1461
1609
|
/** Canonical request form for one-shot stereo preset mastering. */
|
|
1462
1610
|
interface MasterAudioStereoRequest {
|
|
@@ -1466,6 +1614,7 @@ interface MasterAudioStereoRequest {
|
|
|
1466
1614
|
preset?: MasteringPreset;
|
|
1467
1615
|
overrides?: MasteringChainConfig;
|
|
1468
1616
|
onProgress?: ProgressCallback;
|
|
1617
|
+
cancel?: () => boolean;
|
|
1469
1618
|
}
|
|
1470
1619
|
/**
|
|
1471
1620
|
* Apply a configurable mastering chain in WASM.
|
|
@@ -1666,6 +1815,8 @@ declare function masteringInsertParamInfo(name: string): MasteringInsertParamInf
|
|
|
1666
1815
|
* "perChannel"/"passthrough" are reserved and unused by the current catalog.
|
|
1667
1816
|
*/
|
|
1668
1817
|
type MasteringChannelPolicy = 'multichannel' | 'stereoPairOnly' | 'perChannel' | 'passthrough';
|
|
1818
|
+
/** Coarse algorithmic work estimate for a realtime insert; not a benchmark. */
|
|
1819
|
+
type MasteringRealtimeCost = 'low' | 'moderate' | 'high';
|
|
1669
1820
|
/** One processor's realtime/offline/pair classification in the catalog. */
|
|
1670
1821
|
interface MasteringProcessorCatalogEntry {
|
|
1671
1822
|
/** Processor id (the name used for scene inserts / named processors). */
|
|
@@ -1690,6 +1841,8 @@ interface MasteringProcessorCatalogEntry {
|
|
|
1690
1841
|
* offline, dry-only, and no-tail processors.
|
|
1691
1842
|
*/
|
|
1692
1843
|
tailSamples: number;
|
|
1844
|
+
/** Coarse realtime work estimate, or null when the processor is not an insert. */
|
|
1845
|
+
realtimeCost: MasteringRealtimeCost | null;
|
|
1693
1846
|
/**
|
|
1694
1847
|
* How the mixer wraps the processor on a >2-channel (surround) bus insert:
|
|
1695
1848
|
* "multichannel" (one full-buffer call) or "stereoPairOnly" (front L/R pair,
|
|
@@ -2024,7 +2177,12 @@ declare class Audio {
|
|
|
2024
2177
|
* mixed down to mono to match the `Audio` wrapper contract.
|
|
2025
2178
|
*/
|
|
2026
2179
|
static fromMemoryWithBrowserFallback(bytes: Uint8Array, options?: BrowserAudioDecodeOptions): Promise<Audio>;
|
|
2027
|
-
/**
|
|
2180
|
+
/**
|
|
2181
|
+
* A copy of the raw audio samples. Mirrors Node's `getData()` contract: the
|
|
2182
|
+
* returned array is independent of the Audio's internal buffer, so mutating
|
|
2183
|
+
* it (or transferring it to a Worker) does not affect subsequent facade
|
|
2184
|
+
* calls, which all read the internal snapshot directly.
|
|
2185
|
+
*/
|
|
2028
2186
|
get data(): Float32Array;
|
|
2029
2187
|
/** Number of samples. */
|
|
2030
2188
|
get length(): number;
|
|
@@ -2101,6 +2259,26 @@ interface ProjectBounceOptions {
|
|
|
2101
2259
|
/** Host-instrument PDC (latency) fed to the compiler. */
|
|
2102
2260
|
instrumentLatencySamples?: number;
|
|
2103
2261
|
}
|
|
2262
|
+
/** One decoded output from a host-owned source-separation model. */
|
|
2263
|
+
interface ExternalSeparatedStem {
|
|
2264
|
+
name: string;
|
|
2265
|
+
/** Optional host metadata; it does not change DSP. */
|
|
2266
|
+
role?: string;
|
|
2267
|
+
layout: 'mono' | 'stereo' | 1 | 2;
|
|
2268
|
+
planarSamples: Float32Array[];
|
|
2269
|
+
/** Absolute project-rate frame at which this stem begins. */
|
|
2270
|
+
startFrame?: number;
|
|
2271
|
+
}
|
|
2272
|
+
/** Request for {@link Project.importExternalStems}. */
|
|
2273
|
+
interface ExternalSeparatedStemImportRequest {
|
|
2274
|
+
sampleRate: number;
|
|
2275
|
+
stems: ExternalSeparatedStem[];
|
|
2276
|
+
}
|
|
2277
|
+
/** Ids of the normal tracks and clips created by the import. */
|
|
2278
|
+
interface ExternalSeparatedStemImportResult {
|
|
2279
|
+
trackIds: number[];
|
|
2280
|
+
clipIds: number[];
|
|
2281
|
+
}
|
|
2104
2282
|
/**
|
|
2105
2283
|
* Marker kind ordinals. Mirrors `SonareMarkerKind` in `src/sonare_c_types.h`;
|
|
2106
2284
|
* the values are part of the ABI and must not be renumbered.
|
|
@@ -2127,8 +2305,47 @@ interface ProjectMarker {
|
|
|
2127
2305
|
/** Key signature only: false = major, true = minor. */
|
|
2128
2306
|
keyMinor?: boolean;
|
|
2129
2307
|
}
|
|
2308
|
+
/** Read-only stored project track returned by {@link Project.trackByIndex}. */
|
|
2309
|
+
interface ProjectTrack {
|
|
2310
|
+
id: number;
|
|
2311
|
+
kind: number;
|
|
2312
|
+
midiDestinationId: number;
|
|
2313
|
+
gain: number;
|
|
2314
|
+
pan: number;
|
|
2315
|
+
mute: boolean;
|
|
2316
|
+
solo: boolean;
|
|
2317
|
+
name: string;
|
|
2318
|
+
}
|
|
2319
|
+
/** Read-only stored project clip returned by {@link Project.clipByIndex}. */
|
|
2320
|
+
interface ProjectClip {
|
|
2321
|
+
id: number;
|
|
2322
|
+
trackId: number;
|
|
2323
|
+
sourceId: number;
|
|
2324
|
+
sourceKind: number;
|
|
2325
|
+
startPpq: number;
|
|
2326
|
+
lengthPpq: number;
|
|
2327
|
+
sourceOffsetPpq: number;
|
|
2328
|
+
gain: number;
|
|
2329
|
+
loopMode: number;
|
|
2330
|
+
loopLengthPpq: number;
|
|
2331
|
+
}
|
|
2332
|
+
/** Read-only stored project source returned by {@link Project.sourceByIndex}. */
|
|
2333
|
+
interface ProjectSource {
|
|
2334
|
+
id: number;
|
|
2335
|
+
kind: number;
|
|
2336
|
+
channelCount: number;
|
|
2337
|
+
storageHandleId: number;
|
|
2338
|
+
sampleRateHint: number;
|
|
2339
|
+
nameOrUri: string;
|
|
2340
|
+
/** Owning content hash for audio sources; empty for MIDI sources. */
|
|
2341
|
+
contentHash: string;
|
|
2342
|
+
/** External source-separation role for audio sources; empty for MIDI sources. */
|
|
2343
|
+
externalStemRole: string;
|
|
2344
|
+
}
|
|
2345
|
+
/** Names accepted by the minimal built-in oscillator synth. */
|
|
2346
|
+
declare const BUILTIN_SYNTH_WAVEFORMS: readonly ["sine", "saw", "sawtooth", "square", "triangle"];
|
|
2130
2347
|
/** Oscillator waveform for the built-in synth. */
|
|
2131
|
-
type BuiltinSynthWaveform =
|
|
2348
|
+
type BuiltinSynthWaveform = (typeof BUILTIN_SYNTH_WAVEFORMS)[number] | 0 | 1 | 2 | 3;
|
|
2132
2349
|
/**
|
|
2133
2350
|
* Built-in synth patch + MIDI routing for
|
|
2134
2351
|
* {@link Project.bounceWithBuiltinInstrument}. Every field is optional; a
|
|
@@ -2173,6 +2390,8 @@ interface Sf2InstrumentConfig {
|
|
|
2173
2390
|
gain?: number;
|
|
2174
2391
|
/** Max simultaneous voices (0 => 48, clamped to [1, 64]). */
|
|
2175
2392
|
polyphony?: number;
|
|
2393
|
+
/** Prefer dedicated physical models for covered melodic GM programs. Defaults to false; drums stay SF2-first. */
|
|
2394
|
+
preferModelForModeledFamilies?: boolean;
|
|
2176
2395
|
}
|
|
2177
2396
|
/** Source backend a resolved MIDI program renders through. */
|
|
2178
2397
|
type SourceBackend = 'sf2' | 'synth';
|
|
@@ -2202,6 +2421,7 @@ declare const SYNTH_MOD_DESTINATIONS: readonly ["none", "pitch-cents", "cutoff-c
|
|
|
2202
2421
|
interface SynthEnumTables {
|
|
2203
2422
|
engineModes: string[];
|
|
2204
2423
|
waveforms: string[];
|
|
2424
|
+
builtinWaveforms: string[];
|
|
2205
2425
|
filterModels: string[];
|
|
2206
2426
|
filterOutputs: string[];
|
|
2207
2427
|
bodyTypes: string[];
|
|
@@ -2253,6 +2473,8 @@ interface SynthPatch {
|
|
|
2253
2473
|
* `(destination_id, patch)` bindings instead. Defaults to `0`.
|
|
2254
2474
|
*/
|
|
2255
2475
|
destinationId?: number;
|
|
2476
|
+
/** Resolve MIDI channels from incoming GM bank/program changes; defaults to false. */
|
|
2477
|
+
useGmPrograms?: boolean;
|
|
2256
2478
|
/** Base preset name (see {@link synthPresetNames}); omit for the init patch. */
|
|
2257
2479
|
preset?: string;
|
|
2258
2480
|
engineMode?: SynthEngineMode | number;
|
|
@@ -2301,7 +2523,7 @@ interface SynthPatch {
|
|
|
2301
2523
|
busDrive?: number;
|
|
2302
2524
|
}
|
|
2303
2525
|
/** Clip fade-curve for {@link Project.setClipFade}. */
|
|
2304
|
-
type ProjectFadeCurve = 'linear' | 'equal-power' | 'equal_power' | 'equalPower' | 'exponential' | 'logarithmic' | 0 | 1 | 2 | 3;
|
|
2526
|
+
type ProjectFadeCurve = 'linear' | 'equal-power' | 'equal_power' | 'equalPower' | 'equalpower' | 'exponential' | 'exp' | 'logarithmic' | 'log' | 0 | 1 | 2 | 3;
|
|
2305
2527
|
/** One clip fade region for {@link Project.setClipFade}. */
|
|
2306
2528
|
interface ProjectClipFade {
|
|
2307
2529
|
/** Fade length in PPQ (>= 0; 0 = no fade). */
|
|
@@ -2355,12 +2577,31 @@ interface ProjectAutomationPoint {
|
|
|
2355
2577
|
/** Curve to the next breakpoint (default `'linear'`). */
|
|
2356
2578
|
curve?: ProjectAutomationCurve;
|
|
2357
2579
|
}
|
|
2580
|
+
/**
|
|
2581
|
+
* Persistent target classification for an automation lane.
|
|
2582
|
+
*
|
|
2583
|
+
* The numeric ordinals mirror `SonareAutomationTargetKind`; the string names
|
|
2584
|
+
* are the public WASM spellings accepted by the project facade.
|
|
2585
|
+
*/
|
|
2586
|
+
declare const AutomationTargetKind: {
|
|
2587
|
+
readonly opaque: 0;
|
|
2588
|
+
readonly trackFaderDb: 1;
|
|
2589
|
+
readonly trackPan: 2;
|
|
2590
|
+
};
|
|
2591
|
+
/** Accepted automation target kind name or ABI ordinal. */
|
|
2592
|
+
type ProjectAutomationTargetKind = 'opaque' | 'track-fader-db' | 'track-pan' | 0 | 1 | 2;
|
|
2593
|
+
/** Numeric aliases matching the C-ABI enum names. */
|
|
2594
|
+
declare const PROJECT_AUTOMATION_TARGET_OPAQUE: 0;
|
|
2595
|
+
declare const PROJECT_AUTOMATION_TARGET_TRACK_FADER_DB: 1;
|
|
2596
|
+
declare const PROJECT_AUTOMATION_TARGET_TRACK_PAN: 2;
|
|
2358
2597
|
/** Automation-lane descriptor for {@link Project.addAutomationLane}. */
|
|
2359
2598
|
interface ProjectAutomationLaneDesc {
|
|
2360
|
-
/** Host-defined id of the parameter the lane drives. */
|
|
2599
|
+
/** Host-defined, non-zero id of the parameter the lane drives (zero is reserved). */
|
|
2361
2600
|
targetParamId: number;
|
|
2362
2601
|
/** Breakpoints (stored verbatim). */
|
|
2363
2602
|
points: ReadonlyArray<ProjectAutomationPoint>;
|
|
2603
|
+
/** Optional persistent target classification; omission retains the legacy opaque route. */
|
|
2604
|
+
targetKind?: ProjectAutomationTargetKind;
|
|
2364
2605
|
}
|
|
2365
2606
|
/** One tempo segment for {@link Project.setTempoSegments}. */
|
|
2366
2607
|
interface ProjectTempoSegment {
|
|
@@ -2416,6 +2657,21 @@ interface ProjectChordSymbol {
|
|
|
2416
2657
|
/** True at a modulation boundary. */
|
|
2417
2658
|
modulationBoundary?: boolean;
|
|
2418
2659
|
}
|
|
2660
|
+
/** Descriptor accepted by {@link Project.setAssistSidecar}. */
|
|
2661
|
+
interface ProjectAssistSidecarInput {
|
|
2662
|
+
/** Non-empty module id key. */
|
|
2663
|
+
moduleId: string;
|
|
2664
|
+
/** Module-defined schema version. Defaults to `0`. */
|
|
2665
|
+
schemaVersion?: number;
|
|
2666
|
+
/** Target track id (`0` = project scope). Defaults to `0`. */
|
|
2667
|
+
targetTrackId?: number;
|
|
2668
|
+
/** Region start in PPQ. Defaults to `0`. */
|
|
2669
|
+
regionStartPpq?: number;
|
|
2670
|
+
/** Region end in PPQ. Defaults to `0`. */
|
|
2671
|
+
regionEndPpq?: number;
|
|
2672
|
+
/** Opaque module-owned payload bytes. Defaults to an empty payload. */
|
|
2673
|
+
payload?: Uint8Array;
|
|
2674
|
+
}
|
|
2419
2675
|
/** Assist sidecar snapshot returned by {@link Project.getAssistSidecar}. */
|
|
2420
2676
|
interface ProjectAssistSidecar {
|
|
2421
2677
|
moduleId: string;
|
|
@@ -2565,6 +2821,8 @@ interface ProjectDeserializeResult {
|
|
|
2565
2821
|
declare class Project {
|
|
2566
2822
|
private native;
|
|
2567
2823
|
constructor();
|
|
2824
|
+
/** Create a new empty project. */
|
|
2825
|
+
static create(): Project;
|
|
2568
2826
|
/** Pack a MIDI 1.0 note-on event accepted by {@link setMidiEvents}. */
|
|
2569
2827
|
static midiNoteOn(ppq: number, group: number, channel: number, note: number, velocity: number): ProjectMidiEvent;
|
|
2570
2828
|
/** Pack a MIDI 1.0 note-off event accepted by {@link setMidiEvents}. */
|
|
@@ -2631,6 +2889,8 @@ declare class Project {
|
|
|
2631
2889
|
addTrack(desc?: ProjectTrackDesc): number;
|
|
2632
2890
|
/** Add an audio or MIDI clip and return its allocated clip id. */
|
|
2633
2891
|
addClip(desc: ProjectClipDesc): number;
|
|
2892
|
+
/** Import host-separated PCM through the normal audio-track/clip path. */
|
|
2893
|
+
importExternalStems(request: ExternalSeparatedStemImportRequest): ExternalSeparatedStemImportResult;
|
|
2634
2894
|
/** Split captured loop-recording audio into takes and add one clip. */
|
|
2635
2895
|
addLoopRecordingTakes(desc: ProjectLoopRecordingDesc): ProjectLoopRecordingResult;
|
|
2636
2896
|
/** Create a MIDI track + clip; returns `{ trackId, clipId }`. */
|
|
@@ -2655,7 +2915,11 @@ declare class Project {
|
|
|
2655
2915
|
* Route a track's MIDI to host-instrument `destinationId` (0 = default). The
|
|
2656
2916
|
* compiler stamps every MIDI clip on the track with this id so the engine
|
|
2657
2917
|
* dispatches its events to the instrument registered for that destination.
|
|
2658
|
-
* Routes through an undoable edit command.
|
|
2918
|
+
* Routes through an undoable edit command. Builtin, NativeSynth, and SF2
|
|
2919
|
+
* instruments retain source-track provenance inside a shared destination
|
|
2920
|
+
* voice pool. With only zero-latency instruments bound, live lanes and
|
|
2921
|
+
* channel-strip bounces remain aligned. Configure one live lane per source
|
|
2922
|
+
* track that needs strip processing.
|
|
2659
2923
|
*/
|
|
2660
2924
|
setTrackMidiDestination(trackId: number, destinationId: number): void;
|
|
2661
2925
|
/** Set a track's linear playback gain (1.0 = unity; >= 0) via an undoable edit. */
|
|
@@ -2674,6 +2938,8 @@ declare class Project {
|
|
|
2674
2938
|
clearHistory(): void;
|
|
2675
2939
|
/** Cap the undo history depth (clamped to >= 1); evicts oldest entries beyond the cap. */
|
|
2676
2940
|
setMaxUndoDepth(depth: number): void;
|
|
2941
|
+
/** Set the combined undo/redo history byte cap. Zero disables retention. */
|
|
2942
|
+
setMaxHistoryBytes(bytes: number): void;
|
|
2677
2943
|
/** Replace a MIDI clip's entire event list. */
|
|
2678
2944
|
setMidiEvents(clipId: number, events: ReadonlyArray<ProjectMidiEvent | readonly [number, number, number]>): void;
|
|
2679
2945
|
/**
|
|
@@ -2771,8 +3037,11 @@ declare class Project {
|
|
|
2771
3037
|
* Karplus-Strong / modal / additive / percussion / extended-waveguide-piano
|
|
2772
3038
|
* engines plus the realism layer). Pass a {@link SynthPatch}, a preset-name
|
|
2773
3039
|
* string (`'saw-lead'` / `'va:saw-lead'`; see {@link synthPresetNames}), or
|
|
2774
|
-
* an array of either; each object entry may carry
|
|
2775
|
-
*
|
|
3040
|
+
* an array of either; each object entry may carry `destinationId` (default
|
|
3041
|
+
* 0) and `useGmPrograms` (default `false`) binding conveniences, neither of
|
|
3042
|
+
* which is part of the NativeSynth patch itself. When enabled, MIDI program
|
|
3043
|
+
* changes select the corresponding General MIDI voice while the patch remains
|
|
3044
|
+
* the fallback.
|
|
2776
3045
|
* Because the parameter defaults to `{}`, omission and explicit `undefined`
|
|
2777
3046
|
* both create one default binding. Use an explicitly empty array `[]` (or
|
|
2778
3047
|
* runtime `null`) for zero bindings. Unknown preset names throw.
|
|
@@ -2820,6 +3089,12 @@ declare class Project {
|
|
|
2820
3089
|
setClipGain(clipId: number, gain: number): void;
|
|
2821
3090
|
/** Set a clip's fade-in / fade-out regions (undoable). */
|
|
2822
3091
|
setClipFade(clipId: number, fadeIn?: ProjectClipFade, fadeOut?: ProjectClipFade): void;
|
|
3092
|
+
/** Audio source ids that need decoded PCM after deserialization. */
|
|
3093
|
+
unresolvedAudioSourceIds(): number[];
|
|
3094
|
+
/** Register decoded interleaved PCM for an existing audio source (undoable). */
|
|
3095
|
+
setSourceAudio(sourceId: number, audio: Float32Array, channels: number, sampleRate: number): void;
|
|
3096
|
+
/** Replace an audio source's metadata strings as one undoable edit. */
|
|
3097
|
+
setAudioSourceMetadata(sourceId: number, contentHash: string, externalStemRole: string): void;
|
|
2823
3098
|
/** Replace a clip's take list and active take id (undoable). */
|
|
2824
3099
|
setClipTakes(clipId: number, takes: ReadonlyArray<ProjectClipTake>, activeTakeId?: number): void;
|
|
2825
3100
|
/** Replace a clip's comp segments (undoable). */
|
|
@@ -2840,22 +3115,31 @@ declare class Project {
|
|
|
2840
3115
|
renameTrack(trackId: number, name: string): void;
|
|
2841
3116
|
/** Set a track's mixer-strip binding + output target (undoable; omit / '' clears). */
|
|
2842
3117
|
setTrackRoute(trackId: number, channelStripRef?: string, outputTarget?: string): void;
|
|
2843
|
-
/** Append an automation lane
|
|
3118
|
+
/** Append an automation lane; returns its stable target parameter id (undoable). */
|
|
2844
3119
|
addAutomationLane(trackId: number, desc: ProjectAutomationLaneDesc): number;
|
|
2845
|
-
/** Replace
|
|
2846
|
-
editAutomationLane(trackId: number,
|
|
2847
|
-
/** Remove
|
|
2848
|
-
removeAutomationLane(trackId: number,
|
|
3120
|
+
/** Replace the lane identified by its stable target parameter id (undoable). */
|
|
3121
|
+
editAutomationLane(trackId: number, targetParamId: number, desc: ProjectAutomationLaneDesc): void;
|
|
3122
|
+
/** Remove the lane identified by its stable target parameter id (undoable). */
|
|
3123
|
+
removeAutomationLane(trackId: number, targetParamId: number): void;
|
|
2849
3124
|
/** Replace the project's key annotation stream (undoable). */
|
|
2850
3125
|
annotateKeys(keys: ReadonlyArray<ProjectKeySegment>): void;
|
|
2851
3126
|
/** Replace the project's chord-symbol annotation stream (undoable). */
|
|
2852
3127
|
annotateChords(chords: ReadonlyArray<ProjectChordSymbol>): void;
|
|
2853
|
-
/**
|
|
3128
|
+
/**
|
|
3129
|
+
* Add or update an opaque assist sidecar via an undoable edit.
|
|
3130
|
+
*
|
|
3131
|
+
* The descriptor form is the canonical API and matches the Node binding;
|
|
3132
|
+
* the positional form remains available for compatibility with the original
|
|
3133
|
+
* WASM facade.
|
|
3134
|
+
*/
|
|
3135
|
+
setAssistSidecar(sidecar: ProjectAssistSidecarInput): void;
|
|
2854
3136
|
setAssistSidecar(moduleId: string, schemaVersion: number, targetTrackId: number, regionStartPpq: number, regionEndPpq: number, payload: Uint8Array): void;
|
|
2855
3137
|
/** Number of assist sidecars currently stored on the project. */
|
|
2856
3138
|
assistSidecarCount(): number;
|
|
2857
3139
|
/** Read one assist sidecar by stable project order. */
|
|
2858
3140
|
getAssistSidecar(index: number): ProjectAssistSidecar;
|
|
3141
|
+
/** Read every stored assist sidecar in the same order as the index getter. */
|
|
3142
|
+
assistSidecars(): ProjectAssistSidecar[];
|
|
2859
3143
|
/** Set the project's clip-overlap policy (SonareProjectOverlapPolicy ordinal). */
|
|
2860
3144
|
setOverlapPolicy(policy: number): void;
|
|
2861
3145
|
/** Read the project's clip-overlap policy (SonareProjectOverlapPolicy ordinal). */
|
|
@@ -2877,6 +3161,12 @@ declare class Project {
|
|
|
2877
3161
|
setMarkerEx(marker: ProjectMarker): number;
|
|
2878
3162
|
/** Read a project marker by index (0-based, in stored order). */
|
|
2879
3163
|
markerByIndex(index: number): ProjectMarker;
|
|
3164
|
+
/** Read a stored project track by 0-based index. */
|
|
3165
|
+
trackByIndex(index: number): ProjectTrack;
|
|
3166
|
+
/** Read a stored project clip by 0-based index. */
|
|
3167
|
+
clipByIndex(index: number): ProjectClip;
|
|
3168
|
+
/** Read a stored project source by 0-based index. */
|
|
3169
|
+
sourceByIndex(index: number): ProjectSource;
|
|
2880
3170
|
/** Number of markers in the project. */
|
|
2881
3171
|
markerCount(): number;
|
|
2882
3172
|
/** Number of tracks in the project. */
|
|
@@ -2935,6 +3225,7 @@ type EngineMarker = WasmEngineMarker;
|
|
|
2935
3225
|
type EngineMetronomeConfig = WasmEngineMetronomeConfig;
|
|
2936
3226
|
type EngineGraphSpec = WasmEngineGraphSpec;
|
|
2937
3227
|
type EngineCaptureStatus = WasmEngineCaptureStatus;
|
|
3228
|
+
type EngineCaptureSource = EngineCaptureStatus['source'] | number;
|
|
2938
3229
|
type EngineBounceOptions = WasmEngineBounceOptions;
|
|
2939
3230
|
type EngineBounceResult = WasmEngineBounceResult;
|
|
2940
3231
|
type EngineFreezeOptions = WasmEngineFreezeOptions;
|
|
@@ -2971,6 +3262,10 @@ interface EngineTrackLane {
|
|
|
2971
3262
|
*/
|
|
2972
3263
|
sourceChannelLayout?: number;
|
|
2973
3264
|
}
|
|
3265
|
+
/** Per-track cue/monitor tap mode: off, pre-fader listen, or after-fader listen. */
|
|
3266
|
+
type EngineTrackMonitorMode = 'off' | 'pfl' | 'afl' | 0 | 1 | 2;
|
|
3267
|
+
/** Short alias for {@link EngineTrackMonitorMode}. */
|
|
3268
|
+
type TrackMonitorMode = EngineTrackMonitorMode;
|
|
2974
3269
|
interface EngineBus {
|
|
2975
3270
|
busId: number;
|
|
2976
3271
|
gainDb?: number;
|
|
@@ -3025,8 +3320,8 @@ interface EngineCapabilities {
|
|
|
3025
3320
|
declare function engineCapabilities(): EngineCapabilities;
|
|
3026
3321
|
declare class RealtimeEngine {
|
|
3027
3322
|
private native;
|
|
3028
|
-
constructor(sampleRate?: number, maxBlockSize?: number, commandCapacity?: number, telemetryCapacity?: number);
|
|
3029
|
-
prepare(sampleRate: number, maxBlockSize: number, commandCapacity?: number, telemetryCapacity?: number): void;
|
|
3323
|
+
constructor(sampleRate?: number, maxBlockSize?: number, commandCapacity?: number, telemetryCapacity?: number, maxChannels?: number);
|
|
3324
|
+
prepare(sampleRate: number, maxBlockSize: number, commandCapacity?: number, telemetryCapacity?: number, maxChannels?: number): void;
|
|
3030
3325
|
/** Queue a sample-accurate parameter change (engine kSetParam). */
|
|
3031
3326
|
setParameter(paramId: number, value: number, renderFrame?: number): void;
|
|
3032
3327
|
/** Queue a smoothed parameter change (engine kSetParamSmoothed). */
|
|
@@ -3038,6 +3333,8 @@ declare class RealtimeEngine {
|
|
|
3038
3333
|
*/
|
|
3039
3334
|
setParamSmoothingMs(smoothingMs: number): void;
|
|
3040
3335
|
setSoloMute(laneIndex: number, solo: boolean, mute: boolean, renderFrame?: number): void;
|
|
3336
|
+
/** Queue a per-track PFL/AFL monitor tap mode change. */
|
|
3337
|
+
setTrackMonitorMode(laneIndex: number, mode: EngineTrackMonitorMode, renderFrame?: number): void;
|
|
3041
3338
|
setMidiClips(clips: readonly EngineMidiClipSchedule[]): void;
|
|
3042
3339
|
setBuiltinInstrument(config?: {
|
|
3043
3340
|
destinationId?: number;
|
|
@@ -3072,6 +3369,7 @@ declare class RealtimeEngine {
|
|
|
3072
3369
|
destinationId?: number;
|
|
3073
3370
|
gain?: number;
|
|
3074
3371
|
polyphony?: number;
|
|
3372
|
+
preferModelForModeledFamilies?: boolean;
|
|
3075
3373
|
}, destinationId?: number): void;
|
|
3076
3374
|
clearMidiInstrument(destinationId?: number): void;
|
|
3077
3375
|
midiInstrumentCount(): number;
|
|
@@ -3105,6 +3403,7 @@ declare class RealtimeEngine {
|
|
|
3105
3403
|
setExternalMidiClockEnabled(enabled: boolean): void;
|
|
3106
3404
|
/** Count of external-MIDI events dropped because the output queue was full. */
|
|
3107
3405
|
externalMidiDroppedCount(): number;
|
|
3406
|
+
externalMidiPendingCount(): number;
|
|
3108
3407
|
/**
|
|
3109
3408
|
* Drain queued external-MIDI events, already lowered to MIDI 1.0 byte
|
|
3110
3409
|
* messages ready to write to a Web MIDI output port. Call once per audio
|
|
@@ -3113,6 +3412,13 @@ declare class RealtimeEngine {
|
|
|
3113
3412
|
* queued for the next call (lossless); call again to drain the rest.
|
|
3114
3413
|
*/
|
|
3115
3414
|
drainExternalMidi(maxRecords?: number): WasmExternalMidiEvent[];
|
|
3415
|
+
/** Scalar, allocation-free external-MIDI drain for AudioWorklet SAB output. */
|
|
3416
|
+
popExternalMidiToScratch(): boolean;
|
|
3417
|
+
externalMidiScratchDestinationId(): number;
|
|
3418
|
+
externalMidiScratchRenderFrame(): number;
|
|
3419
|
+
externalMidiScratchByteWord(): number;
|
|
3420
|
+
externalMidiScratchByteCount(): number;
|
|
3421
|
+
consumeExternalMidiScratch(): void;
|
|
3116
3422
|
pushMidiInputNoteOn(group: number, channel: number, note: number, velocity: number, portTimeSamples?: number): void;
|
|
3117
3423
|
pushMidiInputNoteOff(group: number, channel: number, note: number, velocity?: number, portTimeSamples?: number): void;
|
|
3118
3424
|
pushMidiInputCc(group: number, channel: number, controller: number, value: number, portTimeSamples?: number): void;
|
|
@@ -3125,6 +3431,8 @@ declare class RealtimeEngine {
|
|
|
3125
3431
|
* immediate. Mirrors the Node/Python/C-ABI `pushMidiCc`.
|
|
3126
3432
|
*/
|
|
3127
3433
|
pushMidiCc(destinationId: number, group: number, channel: number, controller: number, value: number, renderFrame?: number): void;
|
|
3434
|
+
/** Queue one immediate MIDI 1.0 channel-voice UMP word for a destination. */
|
|
3435
|
+
pushMidiUmp(destinationId: number, word0: number, renderFrame?: number): void;
|
|
3128
3436
|
/**
|
|
3129
3437
|
* Queue an immediate (live) MIDI SysEx frame to a MIDI destination. `data` is
|
|
3130
3438
|
* the full message including the leading 0xF0 and trailing 0xF7 (1..512
|
|
@@ -3154,6 +3462,8 @@ declare class RealtimeEngine {
|
|
|
3154
3462
|
* settled values instead of ramping in from defaults.
|
|
3155
3463
|
*/
|
|
3156
3464
|
settleParameters(): void;
|
|
3465
|
+
/** Drains queued commands on an offline/control-only engine immediately. */
|
|
3466
|
+
flushControlCommands(): void;
|
|
3157
3467
|
seekPpq(ppq: number, renderFrame?: number): void;
|
|
3158
3468
|
/** Set a finite tempo in the range (0, 100000] BPM. */
|
|
3159
3469
|
setTempo(bpm: number): void;
|
|
@@ -3231,7 +3541,7 @@ declare class RealtimeEngine {
|
|
|
3231
3541
|
/** Sets a track lane strip's pan position in realtime (glitch-free). */
|
|
3232
3542
|
setTrackStripPan(trackId: number, pan: number): void;
|
|
3233
3543
|
/** Sets a track lane strip's pan law in realtime. */
|
|
3234
|
-
setTrackStripPanLaw(trackId: number, panLaw:
|
|
3544
|
+
setTrackStripPanLaw(trackId: number, panLaw: PanLawInput): void;
|
|
3235
3545
|
/** Sets a track lane strip's pan mode in realtime. */
|
|
3236
3546
|
setTrackStripPanMode(trackId: number, panMode: PanMode | number): void;
|
|
3237
3547
|
/** Sets a track lane strip's dual-pan left/right positions in realtime. */
|
|
@@ -3246,16 +3556,29 @@ declare class RealtimeEngine {
|
|
|
3246
3556
|
clearClipPage(providerId: number, pageIndex: number): void;
|
|
3247
3557
|
destroyClipPageProvider(providerId: number): void;
|
|
3248
3558
|
popClipPageRequest(): ClipPageRequest | null;
|
|
3559
|
+
/**
|
|
3560
|
+
* Moves one native request into the binding's persistent scalar scratch.
|
|
3561
|
+
* This avoids creating an embind JS object in AudioWorklet process().
|
|
3562
|
+
*/
|
|
3563
|
+
popClipPageRequestToScratch(): boolean;
|
|
3564
|
+
clipPageRequestScratchClipId(): number;
|
|
3565
|
+
clipPageRequestScratchSample(): number;
|
|
3566
|
+
/** Cumulative page misses dropped because the native bounded request queue was full. */
|
|
3567
|
+
clipPageRequestOverflowCount(): number;
|
|
3249
3568
|
setCaptureBuffer(numChannels: number, capacityFrames: number): void;
|
|
3250
3569
|
armCapture(armed?: boolean): void;
|
|
3251
3570
|
setCapturePunch(startSample: number, endSample: number, enabled?: boolean): void;
|
|
3252
|
-
setCaptureSource(source:
|
|
3571
|
+
setCaptureSource(source: EngineCaptureSource): void;
|
|
3253
3572
|
/** Positive values delay capture relative to the punch window. */
|
|
3254
3573
|
setRecordOffsetSamples(offsetSamples: number): void;
|
|
3255
3574
|
setInputMonitor(enabled: boolean, gain?: number): void;
|
|
3256
3575
|
resetCapture(): void;
|
|
3257
3576
|
captureStatus(): EngineCaptureStatus;
|
|
3258
3577
|
capturedAudio(): Float32Array[];
|
|
3578
|
+
/**
|
|
3579
|
+
* Renders in place, adding engine output to `channels`. Zero each plane first
|
|
3580
|
+
* when it contains no upstream input.
|
|
3581
|
+
*/
|
|
3259
3582
|
process(channels: Float32Array[]): Float32Array[];
|
|
3260
3583
|
/**
|
|
3261
3584
|
* Allocates persistent per-channel WASM-heap scratch for the zero-copy
|
|
@@ -3272,6 +3595,7 @@ declare class RealtimeEngine {
|
|
|
3272
3595
|
getChannelBuffer(channel: number, numFrames: number): Float32Array;
|
|
3273
3596
|
/**
|
|
3274
3597
|
* Runs the engine in place over the prepared per-channel scratch buffers.
|
|
3598
|
+
* Zero each active span first when it contains no upstream input.
|
|
3275
3599
|
* Allocation-free: safe to call on the AudioWorklet render thread after
|
|
3276
3600
|
* `prepareChannels`.
|
|
3277
3601
|
*/
|
|
@@ -3281,6 +3605,18 @@ declare class RealtimeEngine {
|
|
|
3281
3605
|
bounceOffline(options: EngineBounceOptions): EngineBounceResult;
|
|
3282
3606
|
freezeOffline(options: EngineFreezeOptions): EngineFreezeResult;
|
|
3283
3607
|
drainTelemetry(maxRecords?: number): EngineTelemetry[];
|
|
3608
|
+
popTelemetryToScratch(): boolean;
|
|
3609
|
+
telemetryScratchType(): number;
|
|
3610
|
+
telemetryScratchError(): number;
|
|
3611
|
+
telemetryScratchRenderFrame(): number;
|
|
3612
|
+
telemetryScratchTimelineSample(): number;
|
|
3613
|
+
telemetryScratchAudibleTimelineSample(): number;
|
|
3614
|
+
telemetryScratchGraphLatencySamplesQ8(): number;
|
|
3615
|
+
telemetryScratchValue(): number;
|
|
3616
|
+
popMeterTelemetryToScratch(): boolean;
|
|
3617
|
+
meterScratchTargetId(): number;
|
|
3618
|
+
meterScratchRenderFrame(): number;
|
|
3619
|
+
meterScratchValue(field: number): number;
|
|
3284
3620
|
drainMeterTelemetry(maxRecords?: number): EngineMeterTelemetry[];
|
|
3285
3621
|
/**
|
|
3286
3622
|
* Drains pending meter telemetry as per-plane (wide) records for a surround
|
|
@@ -3300,6 +3636,14 @@ declare class RealtimeEngine {
|
|
|
3300
3636
|
configureScopeTelemetry(intervalFrames: number, bandCount: number): number;
|
|
3301
3637
|
/** Drains pending spectrum + vectorscope snapshots (per mix target). */
|
|
3302
3638
|
drainScopeTelemetry(maxRecords?: number): EngineScopeTelemetry[];
|
|
3639
|
+
popScopeTelemetryToScratch(): boolean;
|
|
3640
|
+
scopeScratchTargetId(): number;
|
|
3641
|
+
scopeScratchRenderFrame(): number;
|
|
3642
|
+
scopeScratchBandCount(): number;
|
|
3643
|
+
scopeScratchBand(index: number): number;
|
|
3644
|
+
scopeScratchPointCount(): number;
|
|
3645
|
+
scopeScratchPointLeft(index: number): number;
|
|
3646
|
+
scopeScratchPointRight(index: number): number;
|
|
3303
3647
|
destroy(): void;
|
|
3304
3648
|
}
|
|
3305
3649
|
declare class ClipPageProvider {
|
|
@@ -3320,11 +3664,19 @@ interface OpfsClipPageProviderOptions {
|
|
|
3320
3664
|
dataOffsetBytes?: number;
|
|
3321
3665
|
worker?: Worker;
|
|
3322
3666
|
terminateWorkerOnClose?: boolean;
|
|
3667
|
+
/** Internal bridge hook used to mirror a supplied page into an AudioWorklet. */
|
|
3668
|
+
onPageSupplied?: (pageIndex: number, channels: Float32Array[]) => void;
|
|
3669
|
+
/** Internal bridge hook used to mirror an eviction into an AudioWorklet. */
|
|
3670
|
+
onPageCleared?: (pageIndex: number) => void;
|
|
3671
|
+
/** Internal bridge hook called after the local provider is destroyed. */
|
|
3672
|
+
onClose?: () => void;
|
|
3323
3673
|
}
|
|
3324
3674
|
interface OpfsClipPageProviderBinding {
|
|
3325
3675
|
provider: ClipPageProvider;
|
|
3326
3676
|
supplyPage(pageIndex: number): Promise<boolean>;
|
|
3327
3677
|
supplyRequest(request: ClipPageRequest): Promise<boolean>;
|
|
3678
|
+
/** Evict one resident page from every configured consumer. */
|
|
3679
|
+
clearPage?(pageIndex: number): void;
|
|
3328
3680
|
close(): void;
|
|
3329
3681
|
}
|
|
3330
3682
|
declare const opfsClipPageWorkerSource = "\nconst sonareClipPageReadQueues = new Map();\n\nfunction sonareEnqueueClipPageRead(key, task) {\n const previous = sonareClipPageReadQueues.get(key) || Promise.resolve();\n const next = previous.catch(() => undefined).then(task);\n const queued = next.finally(() => {\n if (sonareClipPageReadQueues.get(key) === queued) {\n sonareClipPageReadQueues.delete(key);\n }\n });\n sonareClipPageReadQueues.set(key, queued);\n return next;\n}\n\nself.onmessage = async (event) => {\n const message = event.data;\n if (!message || message.type !== 'sonare:read-clip-page') return;\n const { requestId, path, pageIndex, numChannels, numSamples, pageFrames, dataOffsetBytes = 0 } = message;\n await sonareEnqueueClipPageRead(String(path), async () => {\n try {\n if (pageIndex < 0) {\n self.postMessage({ type: 'sonare:clip-page', requestId, pageIndex, ok: false });\n return;\n }\n const startFrame = pageIndex * pageFrames;\n if (startFrame >= numSamples) {\n self.postMessage({ type: 'sonare:clip-page', requestId, pageIndex, ok: false });\n return;\n }\n const root = await self.navigator.storage.getDirectory();\n let dir = root;\n const parts = String(path).split('/').filter(Boolean);\n for (let i = 0; i < parts.length - 1; ++i) {\n dir = await dir.getDirectoryHandle(parts[i]);\n }\n const fileHandle = await dir.getFileHandle(parts[parts.length - 1]);\n const access = await fileHandle.createSyncAccessHandle();\n try {\n const frames = Math.min(pageFrames, numSamples - startFrame);\n const frameBytes = numChannels * 4;\n const bytes = new Uint8Array(frames * frameBytes);\n let bytesReadTotal = 0;\n const readOffset = dataOffsetBytes + startFrame * frameBytes;\n while (bytesReadTotal < bytes.byteLength) {\n const bytesRead = access.read(bytes.subarray(bytesReadTotal), {\n at: readOffset + bytesReadTotal,\n });\n if (bytesRead <= 0) {\n break;\n }\n bytesReadTotal += bytesRead;\n }\n if (bytesReadTotal !== bytes.byteLength || bytesReadTotal % frameBytes !== 0) {\n self.postMessage({ type: 'sonare:clip-page', requestId, pageIndex, ok: false });\n return;\n }\n const framesRead = bytesReadTotal / frameBytes;\n const view = new DataView(bytes.buffer, 0, framesRead * frameBytes);\n const channelBuffers = Array.from({ length: numChannels }, () => new ArrayBuffer(framesRead * 4));\n for (let ch = 0; ch < numChannels; ++ch) {\n const channel = new Float32Array(channelBuffers[ch]);\n for (let frame = 0; frame < framesRead; ++frame) {\n channel[frame] = view.getFloat32((frame * numChannels + ch) * 4, true);\n }\n }\n self.postMessage(\n { type: 'sonare:clip-page', requestId, pageIndex, ok: true, frames: framesRead, channelBuffers },\n channelBuffers,\n );\n } finally {\n access.close();\n }\n } catch (error) {\n self.postMessage({\n type: 'sonare:clip-page',\n requestId,\n pageIndex,\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n });\n};\n";
|
|
@@ -3337,7 +3689,16 @@ declare function createOpfsClipPageProvider(engine: RealtimeEngine, options: Opf
|
|
|
3337
3689
|
*/
|
|
3338
3690
|
interface ClipPageStreamerEngine {
|
|
3339
3691
|
/** Drain one pending audio-thread page-miss request, or `null` when empty. */
|
|
3340
|
-
popClipPageRequest():
|
|
3692
|
+
popClipPageRequest(): ClipPageStreamerRequest | null;
|
|
3693
|
+
}
|
|
3694
|
+
/**
|
|
3695
|
+
* A page miss reported by either a direct engine (`sample`) or the worklet
|
|
3696
|
+
* bridge (`pageIndex`). Exactly one position form is required.
|
|
3697
|
+
*/
|
|
3698
|
+
interface ClipPageStreamerRequest {
|
|
3699
|
+
clipId: number;
|
|
3700
|
+
sample?: number;
|
|
3701
|
+
pageIndex?: number;
|
|
3341
3702
|
}
|
|
3342
3703
|
/** A paged clip the streamer keeps fed from its backing store. */
|
|
3343
3704
|
interface ClipPageStreamSource {
|
|
@@ -3415,6 +3776,7 @@ declare class ClipPageStreamer {
|
|
|
3415
3776
|
close(): void;
|
|
3416
3777
|
private serviceFrontier;
|
|
3417
3778
|
private resetState;
|
|
3779
|
+
private clearPage;
|
|
3418
3780
|
}
|
|
3419
3781
|
interface OpfsClipStreamOptions extends OpfsClipPageProviderOptions {
|
|
3420
3782
|
/** Clip schedule id used in `setClips` (matches the page-miss request clipId). */
|
|
@@ -3427,20 +3789,30 @@ interface OpfsClipStreamOptions extends OpfsClipPageProviderOptions {
|
|
|
3427
3789
|
}
|
|
3428
3790
|
interface OpfsClipStream {
|
|
3429
3791
|
binding: OpfsClipPageProviderBinding;
|
|
3430
|
-
/** Pass
|
|
3792
|
+
/** Pass as `addClip`'s buffer argument to schedule the streaming clip. */
|
|
3431
3793
|
provider: ClipPageProvider;
|
|
3432
3794
|
}
|
|
3795
|
+
/** Structural seam implemented by the AudioWorklet-backed `SonareEngine`. */
|
|
3796
|
+
interface WorkletOpfsClipStreamHost {
|
|
3797
|
+
attachOpfsClipStream(options: OpfsClipStreamOptions): Promise<OpfsClipStream>;
|
|
3798
|
+
}
|
|
3433
3799
|
/**
|
|
3434
3800
|
* One-call wiring of an OPFS-backed streaming clip: creates the page provider,
|
|
3435
3801
|
* primes the leading pages, and registers it with `streamer` so later misses are
|
|
3436
3802
|
* serviced within the bounded window. Returns the binding (for `close`) and the
|
|
3437
|
-
* provider to schedule via `
|
|
3803
|
+
* provider to schedule via `addClip(trackId, provider, startPpq, { id: clipId })`.
|
|
3438
3804
|
*
|
|
3439
3805
|
* @param streamer Shared streamer pumped on the control thread.
|
|
3440
3806
|
* @param engine Engine the provider is created on (the same one `streamer` drives).
|
|
3441
3807
|
* @param options Provider options plus `clipId` and optional `primePages`.
|
|
3442
3808
|
*/
|
|
3443
3809
|
declare function attachOpfsClipStream(streamer: ClipPageStreamer, engine: RealtimeEngine, options: OpfsClipStreamOptions): Promise<OpfsClipStream>;
|
|
3810
|
+
/**
|
|
3811
|
+
* Worklet overload: delegates to `SonareEngine.attachOpfsClipStream`, which
|
|
3812
|
+
* creates the remote provider and drives this same sliding-window policy from
|
|
3813
|
+
* worklet page-miss messages.
|
|
3814
|
+
*/
|
|
3815
|
+
declare function attachOpfsClipStream(engine: WorkletOpfsClipStreamHost, options: OpfsClipStreamOptions): Promise<OpfsClipStream>;
|
|
3444
3816
|
|
|
3445
3817
|
/**
|
|
3446
3818
|
* Numeric error codes carried by a {@link SonareError}. Mirrors the C ABI
|
|
@@ -3456,6 +3828,7 @@ declare enum ErrorCode {
|
|
|
3456
3828
|
OutOfMemory = 5,
|
|
3457
3829
|
NotSupported = 6,
|
|
3458
3830
|
InvalidState = 7,
|
|
3831
|
+
Cancelled = 8,
|
|
3459
3832
|
Unknown = 99
|
|
3460
3833
|
}
|
|
3461
3834
|
/**
|
|
@@ -3473,6 +3846,12 @@ declare class SonareError extends Error {
|
|
|
3473
3846
|
/** Type guard: whether a caught value is a libsonare {@link SonareError}. */
|
|
3474
3847
|
declare function isSonareError(value: unknown): value is SonareError;
|
|
3475
3848
|
|
|
3849
|
+
declare function tone(request?: ToneRequest): Float32Array;
|
|
3850
|
+
declare function tone(frequency?: number, sampleRate?: number, duration?: number, phase?: number, amplitude?: number): Float32Array;
|
|
3851
|
+
declare function chirp(request?: ChirpRequest): Float32Array;
|
|
3852
|
+
declare function chirp(fmin?: number, fmax?: number, sampleRate?: number, duration?: number, linear?: boolean): Float32Array;
|
|
3853
|
+
declare function clicks(request: ClicksRequest): Float32Array;
|
|
3854
|
+
declare function clicks(times: Float32Array, sampleRate?: number, length?: number, frequency?: number, clickDuration?: number): Float32Array;
|
|
3476
3855
|
interface DbConversionRequest {
|
|
3477
3856
|
values: Float32Array;
|
|
3478
3857
|
ref?: number;
|
|
@@ -3490,6 +3869,27 @@ interface FrameSignalRequest {
|
|
|
3490
3869
|
frameLength: number;
|
|
3491
3870
|
hopLength: number;
|
|
3492
3871
|
}
|
|
3872
|
+
interface ToneRequest {
|
|
3873
|
+
frequency?: number;
|
|
3874
|
+
sampleRate?: number;
|
|
3875
|
+
duration?: number;
|
|
3876
|
+
phase?: number;
|
|
3877
|
+
amplitude?: number;
|
|
3878
|
+
}
|
|
3879
|
+
interface ChirpRequest {
|
|
3880
|
+
fmin?: number;
|
|
3881
|
+
fmax?: number;
|
|
3882
|
+
sampleRate?: number;
|
|
3883
|
+
duration?: number;
|
|
3884
|
+
linear?: boolean;
|
|
3885
|
+
}
|
|
3886
|
+
interface ClicksRequest {
|
|
3887
|
+
times: Float32Array;
|
|
3888
|
+
sampleRate?: number;
|
|
3889
|
+
length?: number;
|
|
3890
|
+
frequency?: number;
|
|
3891
|
+
clickDuration?: number;
|
|
3892
|
+
}
|
|
3493
3893
|
/** Canonical request form for pre/de-emphasis filters. */
|
|
3494
3894
|
interface EmphasisRequest {
|
|
3495
3895
|
samples: Float32Array;
|
|
@@ -3515,6 +3915,10 @@ interface FixFramesRequest {
|
|
|
3515
3915
|
xMax?: number;
|
|
3516
3916
|
pad?: boolean;
|
|
3517
3917
|
}
|
|
3918
|
+
interface OnsetBacktrackRequest {
|
|
3919
|
+
events: Int32Array;
|
|
3920
|
+
energy: Float32Array;
|
|
3921
|
+
}
|
|
3518
3922
|
/** Canonical request form for peak selection. */
|
|
3519
3923
|
interface PeakPickRequest {
|
|
3520
3924
|
values: Float32Array;
|
|
@@ -3557,6 +3961,8 @@ interface TempogramRequest {
|
|
|
3557
3961
|
hopLength?: number;
|
|
3558
3962
|
winLength?: number;
|
|
3559
3963
|
mode?: TempogramMode;
|
|
3964
|
+
center?: boolean;
|
|
3965
|
+
norm?: boolean;
|
|
3560
3966
|
}
|
|
3561
3967
|
interface CyclicTempogramRequest {
|
|
3562
3968
|
onsetEnvelope: Float32Array;
|
|
@@ -3658,6 +4064,8 @@ declare function fixLength(request: FixLengthRequest): Float32Array;
|
|
|
3658
4064
|
declare function fixLength(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3659
4065
|
declare function fixFrames(request: FixFramesRequest): Int32Array;
|
|
3660
4066
|
declare function fixFrames(frames: Int32Array, xMin?: number, xMax?: number, pad?: boolean): Int32Array;
|
|
4067
|
+
declare function onsetBacktrack(request: OnsetBacktrackRequest): Int32Array;
|
|
4068
|
+
declare function onsetBacktrack(events: Int32Array, energy: Float32Array): Int32Array;
|
|
3661
4069
|
declare function peakPick(request: PeakPickRequest): Int32Array;
|
|
3662
4070
|
declare function peakPick(values: Float32Array, preMax: number, postMax: number, preAvg: number, postAvg: number, delta: number, wait: number): Int32Array;
|
|
3663
4071
|
declare function vectorNormalize(request: VectorNormalizeRequest): Float32Array;
|
|
@@ -3667,7 +4075,7 @@ declare function pcen(values: Float32Array, nBins: number, nFrames: number, opti
|
|
|
3667
4075
|
declare function tonnetz(request: TonnetzRequest): Float32Array;
|
|
3668
4076
|
declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
|
|
3669
4077
|
declare function tempogram(request: TempogramRequest): WasmTempogramResult;
|
|
3670
|
-
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
|
|
4078
|
+
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode, center?: boolean, norm?: boolean): WasmTempogramResult;
|
|
3671
4079
|
declare function cyclicTempogram(request: CyclicTempogramRequest): WasmCyclicTempogramResult;
|
|
3672
4080
|
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
|
|
3673
4081
|
declare function plp(request: PlpRequest): Float32Array;
|
|
@@ -3704,6 +4112,8 @@ interface FourierTempogramRequest extends GuardedOptions$2 {
|
|
|
3704
4112
|
sampleRate?: number;
|
|
3705
4113
|
hopLength?: number;
|
|
3706
4114
|
winLength?: number;
|
|
4115
|
+
center?: boolean;
|
|
4116
|
+
norm?: boolean;
|
|
3707
4117
|
}
|
|
3708
4118
|
interface TempogramRatioRequest extends GuardedOptions$2 {
|
|
3709
4119
|
tempogramData: Float32Array;
|
|
@@ -3743,6 +4153,7 @@ interface NnlsChromaRequest extends GuardedOptions$2 {
|
|
|
3743
4153
|
enableStftBlend?: boolean;
|
|
3744
4154
|
stftBlendWeight?: number;
|
|
3745
4155
|
stftBlendNFft?: number;
|
|
4156
|
+
hopLength?: number;
|
|
3746
4157
|
}
|
|
3747
4158
|
/**
|
|
3748
4159
|
* Compute NNLS (non-negative least squares) chromagram.
|
|
@@ -3843,7 +4254,7 @@ interface MelodyOptions {
|
|
|
3843
4254
|
*/
|
|
3844
4255
|
usePyin?: boolean;
|
|
3845
4256
|
/**
|
|
3846
|
-
* When {@link usePyin} is `true`,
|
|
4257
|
+
* When {@link usePyin} is `true`, zero-pad by `frameLength / 2` so frame
|
|
3847
4258
|
* `i` is centered at `i * hopLength` (matches `librosa.pyin(center=True)`).
|
|
3848
4259
|
* Ignored by the plain-YIN path. Defaults to `true`.
|
|
3849
4260
|
*/
|
|
@@ -3894,7 +4305,7 @@ declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number,
|
|
|
3894
4305
|
* @returns Fourier tempogram result
|
|
3895
4306
|
*/
|
|
3896
4307
|
declare function fourierTempogram(request: FourierTempogramRequest): WasmFourierTempogramResult;
|
|
3897
|
-
declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, options?: GuardedOptions$2): WasmFourierTempogramResult;
|
|
4308
|
+
declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, center?: boolean, norm?: boolean, options?: GuardedOptions$2): WasmFourierTempogramResult;
|
|
3898
4309
|
/**
|
|
3899
4310
|
* Compute tempogram ratio features.
|
|
3900
4311
|
*
|
|
@@ -3963,6 +4374,18 @@ interface PitchYinRequest {
|
|
|
3963
4374
|
threshold?: number;
|
|
3964
4375
|
fillNa?: boolean;
|
|
3965
4376
|
}
|
|
4377
|
+
interface PiptrackRequest {
|
|
4378
|
+
samples: Float32Array;
|
|
4379
|
+
sampleRate?: number;
|
|
4380
|
+
nFft?: number;
|
|
4381
|
+
hopLength?: number;
|
|
4382
|
+
fmin?: number;
|
|
4383
|
+
fmax?: number;
|
|
4384
|
+
threshold?: number;
|
|
4385
|
+
}
|
|
4386
|
+
/** Per-bin spectral pitch candidates and peak magnitudes (librosa.piptrack). */
|
|
4387
|
+
declare function piptrack(request: PiptrackRequest): PiptrackResult;
|
|
4388
|
+
declare function piptrack(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number): PiptrackResult;
|
|
3966
4389
|
declare function pitchYin(request: PitchYinRequest): PitchResult;
|
|
3967
4390
|
declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3968
4391
|
/**
|
|
@@ -3982,6 +4405,22 @@ interface PitchPyinRequest extends PitchYinRequest {
|
|
|
3982
4405
|
}
|
|
3983
4406
|
declare function pitchPyin(request: PitchPyinRequest): PitchResult;
|
|
3984
4407
|
declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
4408
|
+
/** Parameters for segmenting an F0 track into stable monophonic notes. */
|
|
4409
|
+
interface NoteSegmentsRequest {
|
|
4410
|
+
f0Hz: Float32Array;
|
|
4411
|
+
voicedProb: Float32Array;
|
|
4412
|
+
frameRate: number;
|
|
4413
|
+
segmentationThresholdCents?: number;
|
|
4414
|
+
minNoteMs?: number;
|
|
4415
|
+
referenceHz?: number;
|
|
4416
|
+
}
|
|
4417
|
+
/**
|
|
4418
|
+
* Segment a caller-supplied monophonic F0 track into stable note regions.
|
|
4419
|
+
*
|
|
4420
|
+
* `f0Hz` and `voicedProb` must have the same non-zero length. Zero-Hz frames
|
|
4421
|
+
* and probabilities below 0.5 are treated as unvoiced.
|
|
4422
|
+
*/
|
|
4423
|
+
declare function noteSegments(request: NoteSegmentsRequest): NoteSegment[];
|
|
3985
4424
|
|
|
3986
4425
|
/**
|
|
3987
4426
|
* Resample audio to a different sample rate.
|
|
@@ -4058,6 +4497,59 @@ interface NnFilterRequest {
|
|
|
4058
4497
|
k?: number;
|
|
4059
4498
|
width?: number;
|
|
4060
4499
|
}
|
|
4500
|
+
interface SegmentCrossSimilarityRequest {
|
|
4501
|
+
x: Float32Array;
|
|
4502
|
+
xRows: number;
|
|
4503
|
+
xCols: number;
|
|
4504
|
+
y: Float32Array;
|
|
4505
|
+
yRows: number;
|
|
4506
|
+
yCols: number;
|
|
4507
|
+
k?: number;
|
|
4508
|
+
metric?: 'cosine' | 'euclidean';
|
|
4509
|
+
mode?: 'connectivity' | 'affinity';
|
|
4510
|
+
}
|
|
4511
|
+
interface SegmentRecurrenceMatrixRequest {
|
|
4512
|
+
data: Float32Array;
|
|
4513
|
+
rows: number;
|
|
4514
|
+
cols: number;
|
|
4515
|
+
k?: number;
|
|
4516
|
+
width?: number;
|
|
4517
|
+
sym?: boolean;
|
|
4518
|
+
metric?: 'cosine' | 'euclidean';
|
|
4519
|
+
mode?: 'connectivity' | 'affinity';
|
|
4520
|
+
}
|
|
4521
|
+
interface SegmentRecurrenceToLagRequest {
|
|
4522
|
+
recurrence: Float32Array;
|
|
4523
|
+
n: number;
|
|
4524
|
+
pad?: boolean;
|
|
4525
|
+
}
|
|
4526
|
+
interface SegmentLagToRecurrenceRequest {
|
|
4527
|
+
lag: Float32Array;
|
|
4528
|
+
rows: number;
|
|
4529
|
+
lags: number;
|
|
4530
|
+
}
|
|
4531
|
+
interface SegmentSubsegmentRequest {
|
|
4532
|
+
data: Float32Array;
|
|
4533
|
+
rows: number;
|
|
4534
|
+
cols: number;
|
|
4535
|
+
boundaries: Int32Array;
|
|
4536
|
+
nSegments?: number;
|
|
4537
|
+
}
|
|
4538
|
+
interface SegmentAgglomerativeRequest {
|
|
4539
|
+
data: Float32Array;
|
|
4540
|
+
rows: number;
|
|
4541
|
+
cols: number;
|
|
4542
|
+
k: number;
|
|
4543
|
+
linkage?: 'average' | 'single' | 'complete' | 'ward';
|
|
4544
|
+
}
|
|
4545
|
+
interface SegmentPathEnhanceRequest {
|
|
4546
|
+
recurrence: Float32Array;
|
|
4547
|
+
n: number;
|
|
4548
|
+
win: number;
|
|
4549
|
+
maxRatio?: number;
|
|
4550
|
+
minRatio?: number;
|
|
4551
|
+
nFilters?: number;
|
|
4552
|
+
}
|
|
4061
4553
|
interface RemixRequest {
|
|
4062
4554
|
samples: Float32Array;
|
|
4063
4555
|
intervals: Int32Array | ArrayLike<number>;
|
|
@@ -4072,6 +4564,9 @@ interface HpssWithResidualRequest {
|
|
|
4072
4564
|
sampleRate?: number;
|
|
4073
4565
|
kernelHarmonic?: number;
|
|
4074
4566
|
kernelPercussive?: number;
|
|
4567
|
+
nFft?: number;
|
|
4568
|
+
hopLength?: number;
|
|
4569
|
+
hardMask?: boolean;
|
|
4075
4570
|
}
|
|
4076
4571
|
interface LufsInterleavedRequest extends ValidateOptions {
|
|
4077
4572
|
samples: Float32Array;
|
|
@@ -4160,7 +4655,7 @@ declare function phaseVocoder(samples: Float32Array, sampleRate: number, rate: n
|
|
|
4160
4655
|
* HPSS into harmonic / percussive / residual signals.
|
|
4161
4656
|
*/
|
|
4162
4657
|
declare function hpssWithResidual(request: HpssWithResidualRequest): WasmHpssWithResidualResult;
|
|
4163
|
-
declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): WasmHpssWithResidualResult;
|
|
4658
|
+
declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number, nFft?: number, hopLength?: number, hardMask?: boolean): WasmHpssWithResidualResult;
|
|
4164
4659
|
/**
|
|
4165
4660
|
* Channel-weighted multichannel integrated loudness + LRA (ITU-R BS.1770 /
|
|
4166
4661
|
* EBU R128) from an interleaved buffer of `frames * channels` samples. The
|
|
@@ -4188,8 +4683,10 @@ declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number
|
|
|
4188
4683
|
* @param hopLength - Hop length (default: 512)
|
|
4189
4684
|
* @returns Spectral bandwidth in Hz for each frame
|
|
4190
4685
|
*/
|
|
4191
|
-
declare function spectralBandwidth(request: SpectralFrameRequest
|
|
4192
|
-
|
|
4686
|
+
declare function spectralBandwidth(request: SpectralFrameRequest & {
|
|
4687
|
+
p?: number;
|
|
4688
|
+
}): Float32Array;
|
|
4689
|
+
declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, p?: number): Float32Array;
|
|
4193
4690
|
/**
|
|
4194
4691
|
* Compute spectral rolloff frequency.
|
|
4195
4692
|
*
|
|
@@ -4213,6 +4710,10 @@ declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFf
|
|
|
4213
4710
|
*/
|
|
4214
4711
|
declare function spectralFlatness(request: SpectralFrameRequest): Float32Array;
|
|
4215
4712
|
declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
4713
|
+
declare function spectralFlux(request: SpectralFrameRequest & {
|
|
4714
|
+
lag?: number;
|
|
4715
|
+
}): Float32Array;
|
|
4716
|
+
declare function spectralFlux(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, lag?: number): Float32Array;
|
|
4216
4717
|
/**
|
|
4217
4718
|
* Compute zero crossing rate.
|
|
4218
4719
|
*
|
|
@@ -4235,6 +4736,20 @@ declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, fr
|
|
|
4235
4736
|
*/
|
|
4236
4737
|
declare function rmsEnergy(request: ZeroCrossingRateRequest): Float32Array;
|
|
4237
4738
|
declare function rmsEnergy(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
4739
|
+
/** Column-wise cross-similarity (librosa.segment.cross_similarity). */
|
|
4740
|
+
declare function segmentCrossSimilarity(request: SegmentCrossSimilarityRequest): SegmentMatrix;
|
|
4741
|
+
/** Self-similarity recurrence matrix (librosa.segment.recurrence_matrix). */
|
|
4742
|
+
declare function segmentRecurrenceMatrix(request: SegmentRecurrenceMatrixRequest): SegmentMatrix;
|
|
4743
|
+
/** Convert an `n × n` recurrence matrix to a lag matrix. */
|
|
4744
|
+
declare function segmentRecurrenceToLag(request: SegmentRecurrenceToLagRequest): SegmentMatrix;
|
|
4745
|
+
/** Convert a lag matrix back to an `n × n` recurrence matrix. */
|
|
4746
|
+
declare function segmentLagToRecurrence(request: SegmentLagToRecurrenceRequest): SegmentMatrix;
|
|
4747
|
+
/** Refine frame boundaries by clustering within each parent segment. */
|
|
4748
|
+
declare function segmentSubsegment(request: SegmentSubsegmentRequest): Int32Array;
|
|
4749
|
+
/** Cluster feature columns and return one label per column. */
|
|
4750
|
+
declare function segmentAgglomerative(request: SegmentAgglomerativeRequest): Int32Array;
|
|
4751
|
+
/** Enhance diagonal paths in an `n × n` recurrence matrix. */
|
|
4752
|
+
declare function segmentPathEnhance(request: SegmentPathEnhanceRequest): SegmentMatrix;
|
|
4238
4753
|
|
|
4239
4754
|
type GuardedOptions$1 = ValidateOptions;
|
|
4240
4755
|
/** Canonical request form for basic frame-based spectrogram features. */
|
|
@@ -4261,6 +4776,16 @@ interface MfccRequest extends MelSpectrogramRequest {
|
|
|
4261
4776
|
nMfcc?: number;
|
|
4262
4777
|
lifter?: number;
|
|
4263
4778
|
}
|
|
4779
|
+
interface MelDeltaRequest extends GuardedOptions$1 {
|
|
4780
|
+
features: Float32Array;
|
|
4781
|
+
nFeatures: number;
|
|
4782
|
+
nFrames: number;
|
|
4783
|
+
width?: number;
|
|
4784
|
+
}
|
|
4785
|
+
interface ReassignedSpectrogramRequest extends SpectrogramRequest {
|
|
4786
|
+
refPower?: number;
|
|
4787
|
+
fillNan?: boolean;
|
|
4788
|
+
}
|
|
4264
4789
|
interface MfccToMelRequest extends GuardedOptions$1 {
|
|
4265
4790
|
mfccCoefficients: Float32Array;
|
|
4266
4791
|
nMfcc: number;
|
|
@@ -4285,6 +4810,16 @@ interface MelToAudioRequest extends MelToStftRequest {
|
|
|
4285
4810
|
hopLength?: number;
|
|
4286
4811
|
nIter?: number;
|
|
4287
4812
|
}
|
|
4813
|
+
interface GriffinLimRequest extends GuardedOptions$1 {
|
|
4814
|
+
magnitude: Float32Array;
|
|
4815
|
+
nBins: number;
|
|
4816
|
+
nFrames: number;
|
|
4817
|
+
sampleRate?: number;
|
|
4818
|
+
nFft?: number;
|
|
4819
|
+
hopLength?: number;
|
|
4820
|
+
nIter?: number;
|
|
4821
|
+
momentum?: number;
|
|
4822
|
+
}
|
|
4288
4823
|
/** Canonical request form for Griffin-Lim reconstruction from MFCCs. */
|
|
4289
4824
|
interface MfccToAudioRequest extends MfccToMelRequest {
|
|
4290
4825
|
sampleRate?: number;
|
|
@@ -4299,6 +4834,8 @@ interface TrimRequest extends GuardedOptions$1 {
|
|
|
4299
4834
|
samples: Float32Array;
|
|
4300
4835
|
sampleRate: number;
|
|
4301
4836
|
thresholdDb?: number;
|
|
4837
|
+
frameLength?: number;
|
|
4838
|
+
hopLength?: number;
|
|
4302
4839
|
}
|
|
4303
4840
|
/**
|
|
4304
4841
|
* Trim silence from beginning and end of audio.
|
|
@@ -4310,6 +4847,7 @@ interface TrimRequest extends GuardedOptions$1 {
|
|
|
4310
4847
|
*/
|
|
4311
4848
|
declare function trim(request: TrimRequest): Float32Array;
|
|
4312
4849
|
declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: number, options?: GuardedOptions$1): Float32Array;
|
|
4850
|
+
declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: number, frameLength?: number, hopLength?: number, options?: GuardedOptions$1): Float32Array;
|
|
4313
4851
|
/**
|
|
4314
4852
|
* Compute Short-Time Fourier Transform (STFT).
|
|
4315
4853
|
*
|
|
@@ -4406,6 +4944,12 @@ declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft
|
|
|
4406
4944
|
*/
|
|
4407
4945
|
declare function mfcc(request: MfccRequest): MfccResult;
|
|
4408
4946
|
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;
|
|
4947
|
+
/** First-order regression delta of a row-major feature matrix. */
|
|
4948
|
+
declare function melDelta(request: MelDeltaRequest): Float32Array;
|
|
4949
|
+
declare function melDelta(features: Float32Array, nFeatures: number, nFrames: number, width?: number): Float32Array;
|
|
4950
|
+
/** Auger-Flandrin reassigned spectrogram (row-major [nBins x nFrames] arrays). */
|
|
4951
|
+
declare function reassignedSpectrogram(request: ReassignedSpectrogramRequest): ReassignedSpectrogramResult;
|
|
4952
|
+
declare function reassignedSpectrogram(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, refPower?: number, fillNan?: boolean): ReassignedSpectrogramResult;
|
|
4409
4953
|
/**
|
|
4410
4954
|
* Approximate inverse of a Mel filterbank: Mel power spectrogram -> STFT power
|
|
4411
4955
|
* spectrogram. Mirrors `feature::mel_to_stft`.
|
|
@@ -4440,6 +4984,9 @@ declare function melToStft(melPower: Float32Array, nMels: number, nFrames: numbe
|
|
|
4440
4984
|
*/
|
|
4441
4985
|
declare function melToAudio(request: MelToAudioRequest): Float32Array;
|
|
4442
4986
|
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;
|
|
4987
|
+
/** Reconstruct audio from an STFT magnitude matrix via Griffin-Lim. */
|
|
4988
|
+
declare function griffinLim(request: GriffinLimRequest): Float32Array;
|
|
4989
|
+
declare function griffinLim(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, nFft?: number, hopLength?: number, nIter?: number, momentum?: number, options?: GuardedOptions$1): Float32Array;
|
|
4443
4990
|
/**
|
|
4444
4991
|
* Invert MFCC coefficients back to a Mel power spectrogram. Mirrors
|
|
4445
4992
|
* `feature::mfcc_to_mel`.
|
|
@@ -4523,7 +5070,8 @@ declare enum SonareEngineCommandType {
|
|
|
4523
5070
|
Punch = 14,
|
|
4524
5071
|
SetMetronome = 15,
|
|
4525
5072
|
SetMarker = 16,
|
|
4526
|
-
SeekMarker = 17
|
|
5073
|
+
SeekMarker = 17,
|
|
5074
|
+
SetTrackMonitorMode = 26
|
|
4527
5075
|
}
|
|
4528
5076
|
declare enum SonareEngineTelemetryType {
|
|
4529
5077
|
ProcessBlock = 0,
|
|
@@ -4548,7 +5096,9 @@ declare enum SonareEngineTelemetryError {
|
|
|
4548
5096
|
ClipPageUnderrun = 15,
|
|
4549
5097
|
InsertAutomationOverflow = 16,
|
|
4550
5098
|
MidiClockOverflow = 17,
|
|
4551
|
-
MetronomeOverflow = 18
|
|
5099
|
+
MetronomeOverflow = 18,
|
|
5100
|
+
InvalidCommand = 19,
|
|
5101
|
+
MaxChannelsExceeded = 20
|
|
4552
5102
|
}
|
|
4553
5103
|
interface SonareMeterRingBuffer {
|
|
4554
5104
|
sharedBuffer: SharedArrayBuffer;
|
|
@@ -4580,6 +5130,12 @@ interface SonareScopeRingBuffer {
|
|
|
4580
5130
|
bands: number;
|
|
4581
5131
|
maxPoints: number;
|
|
4582
5132
|
}
|
|
5133
|
+
interface SonareExternalMidiRingBuffer {
|
|
5134
|
+
sharedBuffer: SharedArrayBuffer;
|
|
5135
|
+
header: Int32Array;
|
|
5136
|
+
records: Uint32Array;
|
|
5137
|
+
capacity: number;
|
|
5138
|
+
}
|
|
4583
5139
|
interface SonareEngineCommandRecord {
|
|
4584
5140
|
type: SonareEngineCommandType | number;
|
|
4585
5141
|
targetId?: number;
|
|
@@ -4608,6 +5164,12 @@ interface SonareEngineTelemetryRingBuffer {
|
|
|
4608
5164
|
view: DataView;
|
|
4609
5165
|
capacity: number;
|
|
4610
5166
|
}
|
|
5167
|
+
interface SonareClipPageRequestRingBuffer {
|
|
5168
|
+
sharedBuffer: SharedArrayBuffer;
|
|
5169
|
+
header: Int32Array;
|
|
5170
|
+
records: Uint32Array;
|
|
5171
|
+
capacity: number;
|
|
5172
|
+
}
|
|
4611
5173
|
|
|
4612
5174
|
interface SonareRealtimeEngineWorkletProcessorOptions {
|
|
4613
5175
|
wasmBinary?: ArrayBuffer | Uint8Array;
|
|
@@ -4627,6 +5189,16 @@ interface SonareRealtimeEngineWorkletProcessorOptions {
|
|
|
4627
5189
|
scopeBands?: number;
|
|
4628
5190
|
scopeSharedBuffer?: SharedArrayBuffer;
|
|
4629
5191
|
scopeRingCapacity?: number;
|
|
5192
|
+
/**
|
|
5193
|
+
* Lock-free SPSC queue for clip-page cache misses. Supplying this is required
|
|
5194
|
+
* for realtime-safe OPFS streaming: it avoids both embind object creation and
|
|
5195
|
+
* postMessage structured cloning from AudioWorklet process().
|
|
5196
|
+
*/
|
|
5197
|
+
clipPageRequestSharedBuffer?: SharedArrayBuffer;
|
|
5198
|
+
clipPageRequestRingCapacity?: number;
|
|
5199
|
+
/** Lock-free worklet-to-main-thread MIDI-1 output ring. */
|
|
5200
|
+
externalMidiSharedBuffer?: SharedArrayBuffer;
|
|
5201
|
+
externalMidiRingCapacity?: number;
|
|
4630
5202
|
}
|
|
4631
5203
|
interface SonareRealtimeEngineNodeCapabilities {
|
|
4632
5204
|
mode: 'sab' | 'postMessage';
|
|
@@ -4634,6 +5206,10 @@ interface SonareRealtimeEngineNodeCapabilities {
|
|
|
4634
5206
|
sharedArrayBuffer: boolean;
|
|
4635
5207
|
atomics: boolean;
|
|
4636
5208
|
audioWorklet: boolean;
|
|
5209
|
+
/** True only when clip-page misses use the bounded SAB ring. */
|
|
5210
|
+
clipPageRequestsRealtimeSafe: boolean;
|
|
5211
|
+
/** True when external MIDI uses the SAB output ring rather than postMessage. */
|
|
5212
|
+
externalMidiRealtimeSafe: boolean;
|
|
4637
5213
|
engineAbiVersion?: number;
|
|
4638
5214
|
expectedEngineAbiVersion?: number;
|
|
4639
5215
|
abiCompatible?: boolean;
|
|
@@ -4659,6 +5235,12 @@ interface SonareWorkletExternalMidiEvent {
|
|
|
4659
5235
|
/** MIDI 1.0 status + data bytes (1..3 entries). */
|
|
4660
5236
|
bytes: number[];
|
|
4661
5237
|
}
|
|
5238
|
+
/** A control-plane sync message that the worklet rejected without crashing. */
|
|
5239
|
+
interface SonareEngineSyncErrorMessage {
|
|
5240
|
+
type: 'syncError';
|
|
5241
|
+
syncType: SonareEngineSyncMessage['type'];
|
|
5242
|
+
message: string;
|
|
5243
|
+
}
|
|
4662
5244
|
interface SonareEngineSyncClipsMessage {
|
|
4663
5245
|
type: 'syncClips';
|
|
4664
5246
|
clips: EngineClip[];
|
|
@@ -4672,7 +5254,8 @@ interface SonareEngineSyncClipsDeltaMessage {
|
|
|
4672
5254
|
interface SonareEngineSyncClipPageProviderMessage {
|
|
4673
5255
|
type: 'syncClipPageProvider';
|
|
4674
5256
|
clipId: number;
|
|
4675
|
-
clip
|
|
5257
|
+
/** Omitted when an OPFS stream is primed before its clip is scheduled. */
|
|
5258
|
+
clip?: EngineClip;
|
|
4676
5259
|
numChannels: number;
|
|
4677
5260
|
numSamples: number;
|
|
4678
5261
|
pageFrames: number;
|
|
@@ -4684,10 +5267,41 @@ interface SonareEngineSyncClipPageMessage {
|
|
|
4684
5267
|
pageIndex: number;
|
|
4685
5268
|
channels: Float32Array[];
|
|
4686
5269
|
}
|
|
5270
|
+
/** Evicts one page after the main-thread sliding window advances. */
|
|
5271
|
+
interface SonareEngineSyncClipPageClearMessage {
|
|
5272
|
+
type: 'syncClipPageClear';
|
|
5273
|
+
clipId: number;
|
|
5274
|
+
pageIndex: number;
|
|
5275
|
+
}
|
|
5276
|
+
/** Releases a provider whose clip was removed or whose stream was closed. */
|
|
5277
|
+
interface SonareEngineSyncClipPageDestroyMessage {
|
|
5278
|
+
type: 'syncClipPageDestroy';
|
|
5279
|
+
clipId: number;
|
|
5280
|
+
}
|
|
4687
5281
|
/** Makes a fully supplied paged clip visible to the audio engine. */
|
|
4688
5282
|
interface SonareEngineSyncClipPageCommitMessage {
|
|
4689
5283
|
type: 'syncClipPageCommit';
|
|
4690
5284
|
clipId: number;
|
|
5285
|
+
/**
|
|
5286
|
+
* Clip schedule to publish with a provider that was primed before its
|
|
5287
|
+
* schedule was known. The original pre-baked push path supplies it on the
|
|
5288
|
+
* provider message instead.
|
|
5289
|
+
*/
|
|
5290
|
+
clip?: EngineClip;
|
|
5291
|
+
}
|
|
5292
|
+
/**
|
|
5293
|
+
* A bounded batch of page misses emitted by the AudioWorklet. The main thread
|
|
5294
|
+
* resolves these from OPFS and responds with `syncClipPage`; a missing page is
|
|
5295
|
+
* silent until that response arrives.
|
|
5296
|
+
*/
|
|
5297
|
+
interface SonareEngineClipPageRequestMessage {
|
|
5298
|
+
type: 'clipPageRequest';
|
|
5299
|
+
requests: Array<{
|
|
5300
|
+
clipId: number;
|
|
5301
|
+
pageIndex: number;
|
|
5302
|
+
}>;
|
|
5303
|
+
/** Number of misses dropped because a bounded native or SAB request queue was full. */
|
|
5304
|
+
dropped?: number;
|
|
4691
5305
|
}
|
|
4692
5306
|
interface SonareEngineSyncMidiClipsMessage {
|
|
4693
5307
|
type: 'syncMidiClips';
|
|
@@ -4706,6 +5320,11 @@ interface SonareEngineSyncAutomationMessage {
|
|
|
4706
5320
|
paramId: number;
|
|
4707
5321
|
points: EngineAutomationPoint[];
|
|
4708
5322
|
}
|
|
5323
|
+
/** Replaces the live engine's registered custom-parameter set. */
|
|
5324
|
+
interface SonareEngineSyncParametersMessage {
|
|
5325
|
+
type: 'syncParameters';
|
|
5326
|
+
parameters: EngineParameterInfo[];
|
|
5327
|
+
}
|
|
4709
5328
|
interface SonareEngineSyncTempoMessage {
|
|
4710
5329
|
type: 'syncTempo';
|
|
4711
5330
|
bpm: number;
|
|
@@ -4836,6 +5455,7 @@ interface SonareEngineSyncSf2InstrumentMessage {
|
|
|
4836
5455
|
destinationId?: number;
|
|
4837
5456
|
gain?: number;
|
|
4838
5457
|
polyphony?: number;
|
|
5458
|
+
preferModelForModeledFamilies?: boolean;
|
|
4839
5459
|
};
|
|
4840
5460
|
}
|
|
4841
5461
|
interface SonareEngineSyncLoadSoundFontMessage {
|
|
@@ -4866,6 +5486,12 @@ interface SonareEngineSyncMidiCcMessage {
|
|
|
4866
5486
|
value: number;
|
|
4867
5487
|
renderFrame: number;
|
|
4868
5488
|
}
|
|
5489
|
+
interface SonareEngineSyncMidiUmpMessage {
|
|
5490
|
+
type: 'syncMidiUmp';
|
|
5491
|
+
destinationId: number;
|
|
5492
|
+
word0: number;
|
|
5493
|
+
renderFrame: number;
|
|
5494
|
+
}
|
|
4869
5495
|
interface SonareEngineSyncMidiSysexMessage {
|
|
4870
5496
|
type: 'syncMidiSysex';
|
|
4871
5497
|
destinationId: number;
|
|
@@ -4885,7 +5511,31 @@ interface SonareEngineSyncExternalMidiClockMessage {
|
|
|
4885
5511
|
type: 'syncExternalMidiClock';
|
|
4886
5512
|
enabled: boolean;
|
|
4887
5513
|
}
|
|
4888
|
-
|
|
5514
|
+
interface SonareEngineSyncMidiInputSourceMessage {
|
|
5515
|
+
type: 'syncMidiInputSource' | 'syncClearMidiInputSource';
|
|
5516
|
+
destinationId?: number;
|
|
5517
|
+
}
|
|
5518
|
+
interface SonareEngineSyncMidiCcBindingMessage {
|
|
5519
|
+
type: 'syncMidiCcBinding';
|
|
5520
|
+
channel: number;
|
|
5521
|
+
controller: number;
|
|
5522
|
+
paramId: number;
|
|
5523
|
+
minValue: number;
|
|
5524
|
+
maxValue: number;
|
|
5525
|
+
}
|
|
5526
|
+
interface SonareEngineSyncMidiInputEventMessage {
|
|
5527
|
+
type: 'syncMidiInputNoteOn' | 'syncMidiInputNoteOff' | 'syncMidiInputCc';
|
|
5528
|
+
group: number;
|
|
5529
|
+
channel: number;
|
|
5530
|
+
data0: number;
|
|
5531
|
+
data1: number;
|
|
5532
|
+
portTimeSamples: number;
|
|
5533
|
+
}
|
|
5534
|
+
/** Releases the realtime engine and all worklet-owned clip buffers. */
|
|
5535
|
+
interface SonareEngineDestroyMessage {
|
|
5536
|
+
type: 'destroy';
|
|
5537
|
+
}
|
|
5538
|
+
type SonareEngineSyncMessage = SonareEngineSyncClipsMessage | SonareEngineSyncClipsDeltaMessage | SonareEngineSyncClipPageProviderMessage | SonareEngineSyncClipPageMessage | SonareEngineSyncClipPageClearMessage | SonareEngineSyncClipPageCommitMessage | SonareEngineSyncClipPageDestroyMessage | SonareEngineSyncMidiClipsMessage | SonareEngineSyncMarkersMessage | SonareEngineSyncMetronomeMessage | SonareEngineSyncAutomationMessage | SonareEngineSyncParametersMessage | SonareEngineSyncTempoMessage | SonareEngineSyncMixerMessage | SonareEngineSyncCaptureMessage | SonareEngineSyncTrackStripEqBandMessage | SonareEngineSyncMasterStripEqBandMessage | SonareEngineSyncTrackStripInsertBypassedMessage | SonareEngineSyncMasterStripInsertBypassedMessage | SonareEngineSyncTrackStripInsertParamByNameMessage | SonareEngineSyncMasterStripInsertParamByNameMessage | SonareEngineSyncBusStripInsertParamByNameMessage | SonareEngineSyncTrackStripPanMessage | SonareEngineSyncTrackStripPanLawMessage | SonareEngineSyncTrackStripPanModeMessage | SonareEngineSyncTrackStripDualPanMessage | SonareEngineSyncTrackStripChannelDelaySamplesMessage | SonareEngineSyncBuiltinInstrumentMessage | SonareEngineSyncSynthInstrumentMessage | SonareEngineSyncSf2InstrumentMessage | SonareEngineSyncLoadSoundFontMessage | SonareEngineSyncMidiFxMessage | SonareEngineSyncMidiNoteMessage | SonareEngineSyncMidiCcMessage | SonareEngineSyncMidiUmpMessage | SonareEngineSyncMidiSysexMessage | SonareEngineSyncMidiPanicMessage | SonareEngineSyncMidiDestinationExternalMessage | SonareEngineSyncExternalMidiClockMessage | SonareEngineSyncMidiInputSourceMessage | SonareEngineSyncMidiCcBindingMessage | SonareEngineSyncMidiInputEventMessage | SonareEngineDestroyMessage;
|
|
4889
5539
|
|
|
4890
5540
|
declare class SonareRealtimeEngineNode {
|
|
4891
5541
|
readonly node: AudioWorkletNode;
|
|
@@ -4894,14 +5544,20 @@ declare class SonareRealtimeEngineNode {
|
|
|
4894
5544
|
readonly telemetryRing?: SonareEngineTelemetryRingBuffer;
|
|
4895
5545
|
readonly meterRing?: SonareMeterRingBuffer;
|
|
4896
5546
|
readonly scopeRing?: SonareScopeRingBuffer;
|
|
5547
|
+
readonly clipPageRequestRing?: SonareClipPageRequestRingBuffer;
|
|
5548
|
+
readonly externalMidiRing?: SonareExternalMidiRingBuffer;
|
|
4897
5549
|
readonly ready: Promise<void>;
|
|
4898
5550
|
private telemetryReadIndex;
|
|
4899
5551
|
private meterReadIndex;
|
|
4900
5552
|
private scopeReadIndex;
|
|
5553
|
+
private clipPageRequestDroppedRead;
|
|
5554
|
+
private ringPollTimer;
|
|
4901
5555
|
private telemetryListeners;
|
|
4902
5556
|
private meterListeners;
|
|
4903
5557
|
private scopeListeners;
|
|
4904
5558
|
private midiOutListeners;
|
|
5559
|
+
private clipPageRequestListeners;
|
|
5560
|
+
private syncErrorListeners;
|
|
4905
5561
|
private captureRequestId;
|
|
4906
5562
|
private readonly captureRequests;
|
|
4907
5563
|
private transportRequestId;
|
|
@@ -4910,6 +5566,8 @@ declare class SonareRealtimeEngineNode {
|
|
|
4910
5566
|
private rejectReady;
|
|
4911
5567
|
private destroyed;
|
|
4912
5568
|
private constructor();
|
|
5569
|
+
/** Subscribes to control-plane sync rejections reported by the worklet. */
|
|
5570
|
+
onSyncError(listener: (message: SonareEngineSyncErrorMessage) => void): () => void;
|
|
4913
5571
|
static create(context: BaseAudioContext, options?: SonareRealtimeEngineNodeOptions): Promise<SonareRealtimeEngineNode>;
|
|
4914
5572
|
play(sampleTime?: number): boolean;
|
|
4915
5573
|
stop(sampleTime?: number): boolean;
|
|
@@ -4923,6 +5581,14 @@ declare class SonareRealtimeEngineNode {
|
|
|
4923
5581
|
pollTelemetry(): SonareEngineTelemetryRecord[];
|
|
4924
5582
|
pollMeters(): SonareWorkletMeterSnapshot[];
|
|
4925
5583
|
pollScope(): SonareWorkletScopeSnapshot[];
|
|
5584
|
+
/** Drain lowered MIDI-1 records from the SAB ring on the main thread. */
|
|
5585
|
+
pollMidiOut(): SonareWorkletExternalMidiEvent[];
|
|
5586
|
+
/**
|
|
5587
|
+
* Drains bounded paged-clip misses from the SAB ring and forwards one batch
|
|
5588
|
+
* to subscribers. In postMessage mode the legacy handler remains available,
|
|
5589
|
+
* but that degraded path is not realtime-safe for OPFS streaming.
|
|
5590
|
+
*/
|
|
5591
|
+
pollClipPageRequests(): SonareEngineClipPageRequestMessage | undefined;
|
|
4926
5592
|
onTelemetry(callback: (telemetry: SonareEngineTelemetryRecord) => void): () => void;
|
|
4927
5593
|
onMeter(callback: (meter: SonareWorkletMeterSnapshot) => void): () => void;
|
|
4928
5594
|
onScope(callback: (scope: SonareWorkletScopeSnapshot) => void): () => void;
|
|
@@ -4932,10 +5598,18 @@ declare class SonareRealtimeEngineNode {
|
|
|
4932
5598
|
* Web MIDI output port. Returns an unsubscribe function.
|
|
4933
5599
|
*/
|
|
4934
5600
|
onMidiOut(callback: (events: SonareWorkletExternalMidiEvent[]) => void): () => void;
|
|
5601
|
+
/**
|
|
5602
|
+
* Subscribe to bounded batches of paged-clip misses from the worklet. The
|
|
5603
|
+
* callback runs on the main thread and may initiate asynchronous OPFS I/O.
|
|
5604
|
+
*/
|
|
5605
|
+
onClipPageRequests(callback: (message: SonareEngineClipPageRequestMessage) => void): () => void;
|
|
4935
5606
|
destroy(): void;
|
|
4936
5607
|
private emitTelemetry;
|
|
5608
|
+
private startRingPolling;
|
|
5609
|
+
private stopRingPollingIfUnused;
|
|
4937
5610
|
private emitMeter;
|
|
4938
5611
|
private emitMidiOut;
|
|
5612
|
+
private emitClipPageRequests;
|
|
4939
5613
|
private emitScope;
|
|
4940
5614
|
private sendCaptureRequest;
|
|
4941
5615
|
private sendTransportRequest;
|
|
@@ -5213,12 +5887,29 @@ interface SamplesRequest extends GuardedOptions {
|
|
|
5213
5887
|
samples: Float32Array;
|
|
5214
5888
|
sampleRate?: number;
|
|
5215
5889
|
}
|
|
5890
|
+
/** Peak-picking configuration for {@link detectOnsets}. */
|
|
5891
|
+
interface OnsetDetectOptions {
|
|
5892
|
+
nFft?: number;
|
|
5893
|
+
hopLength?: number;
|
|
5894
|
+
threshold?: number;
|
|
5895
|
+
preMax?: number;
|
|
5896
|
+
postMax?: number;
|
|
5897
|
+
preAvg?: number;
|
|
5898
|
+
postAvg?: number;
|
|
5899
|
+
delta?: number;
|
|
5900
|
+
wait?: number;
|
|
5901
|
+
backtrack?: boolean;
|
|
5902
|
+
backtrackRange?: number;
|
|
5903
|
+
}
|
|
5904
|
+
interface DetectOnsetsRequest extends SamplesRequest, OnsetDetectOptions {
|
|
5905
|
+
}
|
|
5216
5906
|
/** Canonical request form for key detection functions. */
|
|
5217
5907
|
interface DetectKeyRequest extends KeyDetectionOptions, SamplesRequest {
|
|
5218
5908
|
}
|
|
5219
5909
|
/** Canonical request form for analysis with synchronous progress reporting. */
|
|
5220
5910
|
interface AnalyzeWithProgressRequest extends SamplesRequest {
|
|
5221
|
-
onProgress
|
|
5911
|
+
onProgress?: ProgressCallback;
|
|
5912
|
+
cancel?: () => boolean;
|
|
5222
5913
|
}
|
|
5223
5914
|
/** Canonical request form for chord detection. */
|
|
5224
5915
|
interface DetectChordsRequest extends ChordDetectionOptions, SamplesRequest {
|
|
@@ -5232,6 +5923,7 @@ interface ChordFunctionalAnalysisRequest extends DetectChordsRequest {
|
|
|
5232
5923
|
/** Canonical request form for impulse-response analysis. */
|
|
5233
5924
|
interface AnalyzeImpulseResponseRequest extends SamplesRequest {
|
|
5234
5925
|
nOctaveBands?: number;
|
|
5926
|
+
minDecayDb?: number;
|
|
5235
5927
|
}
|
|
5236
5928
|
/** Canonical request form for acoustic analysis. */
|
|
5237
5929
|
interface DetectAcousticRequest extends AcousticOptions, SamplesRequest {
|
|
@@ -5280,8 +5972,8 @@ declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number,
|
|
|
5280
5972
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
5281
5973
|
* @returns Array of onset times in seconds
|
|
5282
5974
|
*/
|
|
5283
|
-
declare function detectOnsets(request:
|
|
5284
|
-
declare function detectOnsets(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
5975
|
+
declare function detectOnsets(request: DetectOnsetsRequest): Float32Array;
|
|
5976
|
+
declare function detectOnsets(samples: Float32Array, sampleRate?: number, options?: OnsetDetectOptions & GuardedOptions): Float32Array;
|
|
5285
5977
|
/**
|
|
5286
5978
|
* Detect beat times from audio samples.
|
|
5287
5979
|
*
|
|
@@ -5355,7 +6047,7 @@ interface MusicAnalyzeRequest extends SamplesRequest, MusicAnalyzeOptions {
|
|
|
5355
6047
|
declare function analyze(request: MusicAnalyzeRequest): AnalysisResult;
|
|
5356
6048
|
declare function analyze(samples: Float32Array, sampleRate?: number, options?: GuardedOptions & MusicAnalyzeOptions): AnalysisResult;
|
|
5357
6049
|
declare function analyzeImpulseResponse(request: AnalyzeImpulseResponseRequest): AcousticResult;
|
|
5358
|
-
declare function analyzeImpulseResponse(samples: Float32Array, sampleRate?: number, nOctaveBands?: number): AcousticResult;
|
|
6050
|
+
declare function analyzeImpulseResponse(samples: Float32Array, sampleRate?: number, nOctaveBands?: number, minDecayDb?: number): AcousticResult;
|
|
5359
6051
|
declare function detectAcoustic(request: DetectAcousticRequest): AcousticResult;
|
|
5360
6052
|
declare function detectAcoustic(samples: Float32Array, sampleRate?: number, options?: AcousticOptions): AcousticResult;
|
|
5361
6053
|
/**
|
|
@@ -5947,8 +6639,8 @@ declare class Mixer {
|
|
|
5947
6639
|
setSoloSafe(stripIndex: number, soloSafe: boolean): void;
|
|
5948
6640
|
/** Invert the polarity of the left and/or right channel of a strip. */
|
|
5949
6641
|
setPolarityInvert(stripIndex: number, invertLeft: boolean, invertRight: boolean): void;
|
|
5950
|
-
/** Set the strip's pan law. */
|
|
5951
|
-
setPanLaw(stripIndex: number, panLaw:
|
|
6642
|
+
/** Set the strip's pan law (a {@link PanLawName} alias or raw C ABI ordinal). */
|
|
6643
|
+
setPanLaw(stripIndex: number, panLaw: PanLawInput): void;
|
|
5952
6644
|
/**
|
|
5953
6645
|
* Set a per-strip channel delay in samples. This changes the strip's reported
|
|
5954
6646
|
* latency; recompile to re-run latency compensation.
|
|
@@ -6111,12 +6803,28 @@ interface RealtimeVoiceChangerPlanarBuffer {
|
|
|
6111
6803
|
}
|
|
6112
6804
|
declare class RealtimeVoiceChanger {
|
|
6113
6805
|
private changer;
|
|
6114
|
-
|
|
6806
|
+
/**
|
|
6807
|
+
* Creates a voice changer. Supplying `sampleRate` prepares it immediately,
|
|
6808
|
+
* matching the Node and Python constructors; omitting it preserves the
|
|
6809
|
+
* explicit {@link prepare} lifecycle for callers that configure later.
|
|
6810
|
+
*/
|
|
6811
|
+
constructor(config?: RealtimeVoiceChangerConfigInput | RealtimeVoiceChangerPodConfig, sampleRate?: number, maxBlockSize?: number, channels?: number);
|
|
6115
6812
|
prepare(sampleRate: number, maxBlockSize?: number, channels?: number): void;
|
|
6116
6813
|
reset(): void;
|
|
6117
6814
|
setConfig(config: RealtimeVoiceChangerConfigInput | RealtimeVoiceChangerPodConfig): void;
|
|
6815
|
+
/**
|
|
6816
|
+
* Apply a flat, pre-normalized config without JSON serialization. Intended
|
|
6817
|
+
* for AudioWorklet control messages whose sender prepared the POD on the
|
|
6818
|
+
* main thread.
|
|
6819
|
+
*/
|
|
6820
|
+
setPodConfig(config: RealtimeVoiceChangerPodConfig): void;
|
|
6118
6821
|
configJson(): string;
|
|
6119
6822
|
latencySamples(): number;
|
|
6823
|
+
/**
|
|
6824
|
+
* Monotonically increases whenever {@link prepare} can replace the native
|
|
6825
|
+
* scratch buffers. Cached WASM heap views must be reacquired after it changes.
|
|
6826
|
+
*/
|
|
6827
|
+
bufferGeneration(): number;
|
|
6120
6828
|
processMono(samples: Float32Array): Float32Array;
|
|
6121
6829
|
processMonoInto(samples: Float32Array, output: Float32Array): void;
|
|
6122
6830
|
processInterleaved(samples: Float32Array, channels: number): Float32Array;
|
|
@@ -6232,6 +6940,18 @@ declare class StreamingMasteringChain {
|
|
|
6232
6940
|
left: Float32Array;
|
|
6233
6941
|
right: Float32Array;
|
|
6234
6942
|
};
|
|
6943
|
+
/**
|
|
6944
|
+
* Emit delayed audio and finite processor tails after the final mono block.
|
|
6945
|
+
* Call until this returns an empty array. The initial `latencySamples()`
|
|
6946
|
+
* samples of the concatenated stream are delayed and should be discarded for
|
|
6947
|
+
* time-aligned output.
|
|
6948
|
+
*/
|
|
6949
|
+
flushMono(): Float32Array;
|
|
6950
|
+
/** Stereo counterpart of {@link flushMono}. */
|
|
6951
|
+
flushStereo(): {
|
|
6952
|
+
left: Float32Array;
|
|
6953
|
+
right: Float32Array;
|
|
6954
|
+
};
|
|
6235
6955
|
/** Reset all processor state without rebuilding. */
|
|
6236
6956
|
reset(): void;
|
|
6237
6957
|
/** Total reported latency in samples across all active processors. */
|
|
@@ -6357,6 +7077,14 @@ declare class StreamingRetune {
|
|
|
6357
7077
|
delete(): void;
|
|
6358
7078
|
}
|
|
6359
7079
|
|
|
7080
|
+
interface WebMidiEngine {
|
|
7081
|
+
bindMidiCc(channel: number, controller: number, paramId: number, options?: MidiCcBindOptions): void;
|
|
7082
|
+
setMidiInputSource(destinationId?: number): void;
|
|
7083
|
+
clearMidiInputSource(): void;
|
|
7084
|
+
pushMidiInputNoteOn(group: number, channel: number, note: number, velocity: number, time?: number): void;
|
|
7085
|
+
pushMidiInputNoteOff(group: number, channel: number, note: number, velocity?: number, time?: number): void;
|
|
7086
|
+
pushMidiInputCc(group: number, channel: number, controller: number, value: number, time?: number): void;
|
|
7087
|
+
}
|
|
6360
7088
|
type MidiInputState = 'connected' | 'disconnected';
|
|
6361
7089
|
interface MidiPortLike {
|
|
6362
7090
|
id: string;
|
|
@@ -6422,7 +7150,99 @@ interface WebMidiBinding {
|
|
|
6422
7150
|
close(): void;
|
|
6423
7151
|
}
|
|
6424
7152
|
declare function isWebMidiAvailable(): boolean;
|
|
6425
|
-
declare function bindWebMidi(engine:
|
|
7153
|
+
declare function bindWebMidi(engine: WebMidiEngine, options?: BindWebMidiOptions): Promise<WebMidiBinding>;
|
|
7154
|
+
|
|
7155
|
+
type WorkerRequest<T> = Omit<T, 'onProgress'>;
|
|
7156
|
+
/** Progress relayed from the Worker at the core's native progress boundaries. */
|
|
7157
|
+
interface OfflineWorkerProgress {
|
|
7158
|
+
progress: number;
|
|
7159
|
+
stage: string;
|
|
7160
|
+
}
|
|
7161
|
+
/** Per-call behaviour for a one-shot operation. */
|
|
7162
|
+
interface OfflineWorkerCallOptions {
|
|
7163
|
+
/**
|
|
7164
|
+
* Preserve the caller's input arrays by copying them before dispatch.
|
|
7165
|
+
*
|
|
7166
|
+
* The default is `false`: `Float32Array` buffers are transferred to the
|
|
7167
|
+
* Worker and become detached on the calling thread, avoiding a second copy.
|
|
7168
|
+
*/
|
|
7169
|
+
copy?: boolean;
|
|
7170
|
+
/** Receives native progress boundaries for analysis and mastering calls. */
|
|
7171
|
+
onProgress?: (update: OfflineWorkerProgress) => void;
|
|
7172
|
+
}
|
|
7173
|
+
/** Options used to create an {@link OfflineWorkerClient}. */
|
|
7174
|
+
interface OfflineWorkerClientOptions {
|
|
7175
|
+
/** Reuse a Worker owned by the host instead of creating one. */
|
|
7176
|
+
worker?: OfflineWorker;
|
|
7177
|
+
/** URL of the Worker entry; defaults to the adjacent published `worker.js`. */
|
|
7178
|
+
workerUrl?: string | URL;
|
|
7179
|
+
/** Test/host hook for creating a dedicated Worker. */
|
|
7180
|
+
workerFactory?: (url: URL) => OfflineWorker;
|
|
7181
|
+
/** Terminate a supplied Worker when {@link OfflineWorkerClient.dispose} runs. */
|
|
7182
|
+
terminateWorkerOnDispose?: boolean;
|
|
7183
|
+
}
|
|
7184
|
+
/** Browser Worker or Node `worker_threads.Worker` used by the client. */
|
|
7185
|
+
interface OfflineWorker {
|
|
7186
|
+
postMessage(message: unknown, transfer?: Transferable[]): void;
|
|
7187
|
+
terminate(): unknown;
|
|
7188
|
+
addEventListener?(type: string, listener: EventListener): void;
|
|
7189
|
+
removeEventListener?(type: string, listener: EventListener): void;
|
|
7190
|
+
on?(type: 'message' | 'error', listener: (...args: unknown[]) => void): unknown;
|
|
7191
|
+
off?(type: 'message' | 'error', listener: (...args: unknown[]) => void): unknown;
|
|
7192
|
+
}
|
|
7193
|
+
/**
|
|
7194
|
+
* A cancellable promise returned by an {@link OfflineWorkerClient} call.
|
|
7195
|
+
*
|
|
7196
|
+
* It is Promise-like, so `await client.analyze(...)` works. Call `cancel()` to
|
|
7197
|
+
* request cancellation at the next native progress boundary. In browsers this
|
|
7198
|
+
* uses a `SharedArrayBuffer` flag, which requires cross-origin isolation for
|
|
7199
|
+
* prompt cancellation while synchronous WASM is running. The worker forwards
|
|
7200
|
+
* that flag through the same native cancellation callback used by synchronous
|
|
7201
|
+
* one-shot requests.
|
|
7202
|
+
*/
|
|
7203
|
+
declare class OfflineWorkerTask<T> implements PromiseLike<T> {
|
|
7204
|
+
readonly result: Promise<T>;
|
|
7205
|
+
private readonly cancelRequest;
|
|
7206
|
+
constructor(result: Promise<T>, cancelRequest: () => void);
|
|
7207
|
+
cancel(): void;
|
|
7208
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
7209
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
7210
|
+
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
7211
|
+
}
|
|
7212
|
+
/**
|
|
7213
|
+
* Owns a dedicated Worker for value-based offline analysis and mastering.
|
|
7214
|
+
*
|
|
7215
|
+
* `Project`, `Mixer`, and realtime APIs are intentionally absent: their native
|
|
7216
|
+
* handles are local to one JavaScript realm and cannot be transferred safely.
|
|
7217
|
+
*/
|
|
7218
|
+
declare class OfflineWorkerClient {
|
|
7219
|
+
private readonly worker;
|
|
7220
|
+
private readonly ownsWorker;
|
|
7221
|
+
private readonly pending;
|
|
7222
|
+
private nextId;
|
|
7223
|
+
private closed;
|
|
7224
|
+
private usesEventTarget;
|
|
7225
|
+
constructor(options?: OfflineWorkerClientOptions);
|
|
7226
|
+
/** Dispatch full music analysis to the Worker. */
|
|
7227
|
+
analyze(request: WorkerRequest<MusicAnalyzeRequest>, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof analyze>>;
|
|
7228
|
+
/** Dispatch BPM detection to the Worker. */
|
|
7229
|
+
detectBpm(request: SamplesRequest, options?: OfflineWorkerCallOptions): OfflineWorkerTask<number>;
|
|
7230
|
+
/** Dispatch key detection to the Worker. */
|
|
7231
|
+
detectKey(request: DetectKeyRequest, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof detectKey>>;
|
|
7232
|
+
/** Dispatch chord detection to the Worker. */
|
|
7233
|
+
detectChords(request: DetectChordsRequest, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof detectChords>>;
|
|
7234
|
+
/** Dispatch mono preset mastering to the Worker. */
|
|
7235
|
+
masterAudio(request: WorkerRequest<MasterAudioRequest>, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof masterAudio>>;
|
|
7236
|
+
/** Dispatch stereo preset mastering to the Worker. */
|
|
7237
|
+
masterAudioStereo(request: WorkerRequest<MasterAudioStereoRequest>, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof masterAudioStereo>>;
|
|
7238
|
+
/** Stop accepting calls, reject outstanding work, and release the Worker if owned. */
|
|
7239
|
+
dispose(): void;
|
|
7240
|
+
private call;
|
|
7241
|
+
private readonly onMessage;
|
|
7242
|
+
private readonly onError;
|
|
7243
|
+
private readonly onNodeMessage;
|
|
7244
|
+
private readonly onNodeError;
|
|
7245
|
+
}
|
|
6426
7246
|
|
|
6427
7247
|
/**
|
|
6428
7248
|
* sonare - Audio Analysis Library
|
|
@@ -6473,6 +7293,14 @@ declare function isInitialized(): boolean;
|
|
|
6473
7293
|
* Get the library version.
|
|
6474
7294
|
*/
|
|
6475
7295
|
declare function version(): string;
|
|
7296
|
+
/**
|
|
7297
|
+
* Return the capabilities of the loaded WASM build.
|
|
7298
|
+
*
|
|
7299
|
+
* This is synchronous and only describes the already-initialized module.
|
|
7300
|
+
*/
|
|
7301
|
+
declare function capabilities(): SonareCapabilities;
|
|
7302
|
+
/** Return the initialized module's processors, parameters, and presets. */
|
|
7303
|
+
declare function capabilityCatalog(): CapabilityCatalog;
|
|
6476
7304
|
/**
|
|
6477
7305
|
* Aggregate native ABI version: the per-subsystem ABI macros folded into one
|
|
6478
7306
|
* 32-bit value. It bumps whenever any flat C POD layout changes, so callers can
|
|
@@ -6483,14 +7311,15 @@ declare function engineAbiVersion(): number;
|
|
|
6483
7311
|
declare function voiceChangerAbiVersion(): number;
|
|
6484
7312
|
/**
|
|
6485
7313
|
* Map a voice-character preset ordinal (or canonical id) to its canonical id
|
|
6486
|
-
* string (e.g. `'bright-idol'`).
|
|
7314
|
+
* string (e.g. `'bright-idol'`). Unknown numeric ordinals return `null`;
|
|
7315
|
+
* unknown preset ids throw.
|
|
6487
7316
|
*/
|
|
6488
|
-
declare function voiceCharacterPresetId(preset: VoicePresetId | number):
|
|
7317
|
+
declare function voiceCharacterPresetId(preset: VoicePresetId | number): VoicePresetId | null;
|
|
6489
7318
|
/**
|
|
6490
7319
|
* Return the canonical (normalized) flat POD config for a built-in voice
|
|
6491
7320
|
* preset, skipping the JSON round-trip. Accepts a canonical preset id or its
|
|
6492
|
-
* integer ordinal.
|
|
7321
|
+
* integer ordinal. Invalid ordinals throw.
|
|
6493
7322
|
*/
|
|
6494
|
-
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig
|
|
7323
|
+
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig;
|
|
6495
7324
|
|
|
6496
|
-
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 MeteringSilenceRatioRequest, type MeteringSpectrumFrameRequest, type MeteringSpectrumRequest, type MeteringStereoDecimatedRequest, type MeteringStereoRequest, type MeteringTruePeakRequest, type MfccRequest, type MfccResult, type MfccToAudioRequest, type MfccToMelRequest, type MicrophoneInputBinding, type MidiCcBindOptions, type MidiCcLearnOptions, type MixMeterSnapshot, type MixOptions, type MixResult, type MixStereoRequest, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type MusicAnalyzeRequest, type NnFilterRequest, type NnlsChromaRequest, type 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, meteringSilenceRatio, 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 };
|
|
7325
|
+
export { type AcousticOptions, type AcousticResult, type AnalysisResult, type AnalyzeBpmOptions, type AnalyzeBpmRequest, type AnalyzeDynamicsOptions, type AnalyzeDynamicsRequest, type AnalyzeImpulseResponseRequest, type AnalyzeMelodyRequest, type AnalyzeRhythmOptions, type AnalyzeRhythmRequest, type AnalyzeSectionsOptions, type AnalyzeSectionsRequest, type AnalyzeTimbreOptions, type AnalyzeTimbreRequest, type AnalyzeWithProgressRequest, type AnalyzerStats, Audio, type AutomationCurve, AutomationTargetKind, BUILTIN_SYNTH_WAVEFORMS, type BarChord, type Beat, type BindMicrophoneInputOptions, type BindWebMidiOptions, type BpmAnalysisResult, type BpmCandidate, type BpmHypothesis, type BrowserAudioDecodeOptions, type BuiltinSynthBinding, type BuiltinSynthConfig, type BuiltinSynthWaveform, type ChirpRequest, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, type ChordFunctionalAnalysisRequest, ChordQuality, type ChromaResult, type ChromaSpectrogramRequest, type ClicksRequest, ClipPageProvider, type ClipPageRequest, type ClipPageStreamSource, ClipPageStreamer, type ClipPageStreamerEngine, type ClipPageStreamerOptions, type ClipPageStreamerRequest, type ClippingRegion, type ClippingReport, type CompressorDetector, type CompressorOptions, type CqtRequest, type CqtResult, type CqtToAudioRequest, type CyclicTempogramRequest, type DbConversionRequest, type DeclickOptions, type DeclipOptions, type DecomposeRequest, type DecomposeResult, type DecomposeWithInitRequest, type DecrackleMode, type DecrackleOptions, type DehumOptions, type DenoiseClassicalMode, type DenoiseClassicalNoiseEstimator, type DenoiseClassicalOptions, type DereverbClassicalOptions, type DetectAcousticRequest, type DetectChordsRequest, type DetectKeyRequest, type DetectOnsetsRequest, type DynamicRangeReport, type Dynamics, type DynamicsAnalysisResult, type DynamicsResult, EXPECTED_ENGINE_ABI_VERSION, EXPECTED_PROJECT_ABI_VERSION, type Ebur128LoudnessRangeRequest, type EmphasisRequest, type EngineAutomationPoint, type EngineBounceOptions, type EngineBounceResult, type EngineBus, type EngineCapabilities, type EngineCaptureSource, type EngineCaptureStatus, type EngineClip, type EngineFreezeOptions, type EngineFreezeResult, type EngineGraphSpec, type EngineMarker, type EngineMeterTelemetry, type EngineMeterTelemetryWide, type EngineMetronomeConfig, type EngineMidiClipSchedule, type EngineMidiEvent, type EngineParameterInfo, type EngineScopeTelemetry, type EngineTelemetry, type EngineTempoSegment, type EngineTimeSignatureSegment, type EngineTrackLane, type EngineTrackMonitorMode, type EngineTrackSend, type EngineTransportState, type EqBand, type EqBandPhase, type EqBandType, type EqCoeffMode, type EqMatchOptions, type EqSpectrumSnapshot, type EqStereoPlacement, ErrorCode, type EstimateRoomRequest, type EstimateTuningRequest, type ExternalMidiEvent, type ExternalSeparatedStem, type ExternalSeparatedStemImportRequest, type ExternalSeparatedStemImportResult, type FixFramesRequest, type FixLengthRequest, type FourierTempogramRequest, type FrameBuffer, type FrameSignalRequest, type GateOptions, type GoniometerPoint, type GriffinLimRequest, type HarmonicRequest, type HpssRequest, type HpssResult, type HpssWithResidualRequest, type HpssWithResidualResult, type Key, type KeyCandidate, type KeyDetectionOptions, KeyProfile, type KeyProfileName, type LufsInterleavedRequest, type LufsRequest, type LufsResult, MarkerKind, type MasterAudioRequest, type MasterAudioStereoRequest, type MasteringChainConfig, type MasteringChainRequest, type MasteringChainResult, type MasteringChainStereoRequest, type MasteringChainStereoResult, type MasteringChannelPolicy, type MasteringDynamicsCompressorRequest, type MasteringDynamicsGateRequest, type MasteringDynamicsTransientShaperRequest, type MasteringInsertParamInfo, type MasteringLoudnessSummary, type MasteringOptions, type MasteringPairAnalyzeRequest, type MasteringPairProcessRequest, type MasteringPreset, type MasteringProcessRequest, type MasteringProcessStereoRequest, type MasteringProcessorCatalogEntry, type MasteringProcessorParams, type MasteringRealtimeCost, type MasteringRepairDeclickRequest, type MasteringRepairDeclipRequest, type MasteringRepairDecrackleRequest, type MasteringRepairDehumRequest, type MasteringRepairDenoiseClassicalRequest, type MasteringRepairDereverbClassicalRequest, type MasteringRepairTrimSilenceRequest, type MasteringReport, type MasteringRequest, type MasteringResult, type MasteringSamplesParamsRequest, type MasteringStereoAnalyzeRequest, type MasteringStereoChainResult, type MasteringStereoResult, type MasteringStreamingPreviewRequest, type Matrix2dResult, type MelDeltaRequest, type MelPowerResult, type MelSpectrogramRequest, type MelSpectrogramResult, type MelToAudioRequest, type MelToStftRequest, type MelodyOptions, type MelodyPoint, type MelodyResult, type MeterTap, type MeteringDetectClippingOptions, type MeteringDetectClippingRequest, type MeteringDynamicRangeOptions, type MeteringDynamicRangeRequest, type MeteringSamplesRequest, type MeteringSilenceRatioRequest, type MeteringSpectrumFrameRequest, type MeteringSpectrumRequest, type MeteringStereoDecimatedRequest, type MeteringStereoRequest, type MeteringTruePeakRequest, type MfccRequest, type MfccResult, type MfccToAudioRequest, type MfccToMelRequest, type MicrophoneInputBinding, type MidiCcBindOptions, type MidiCcLearnOptions, type MixMeterSnapshot, type MixOptions, type MixResult, type MixStereoRequest, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type MusicAnalyzeRequest, type NnFilterRequest, type NnlsChromaRequest, type NormalizeMode, type NormalizeRequest, type NoteMoveRequest, type NoteSegment, type NoteSegmentsRequest, type NoteStretchOptions, type NoteStretchRequest, type OfflineWorker, type OfflineWorkerCallOptions, OfflineWorkerClient, type OfflineWorkerClientOptions, type OfflineWorkerProgress, OfflineWorkerTask, type OnsetBacktrackRequest, type OnsetEnvelopeRequest, type OnsetStrengthMultiRequest, type OpfsClipPageProviderBinding, type OpfsClipPageProviderOptions, type OpfsClipStream, type OpfsClipStreamOptions, PROJECT_AUTOMATION_TARGET_OPAQUE, PROJECT_AUTOMATION_TARGET_TRACK_FADER_DB, PROJECT_AUTOMATION_TARGET_TRACK_PAN, type PadCenterRequest, type PairAnalysis, type PairProcessor, type PanLaw, type PanLawInput, type PanLawName, type PanMode, type PatternScore, type PcenRequest, type PeakPickRequest, type PercussiveRequest, type PhaseScopeReport, type PhaseVocoderRequest, type PiptrackRequest, PitchClass as Pitch, PitchClass, type PitchCorrectOptions, type PitchCorrectTimevaryingRequest, type PitchCorrectToMidiRequest, type PitchCorrectToMidiTimevaryingRequest, type PitchPyinRequest, type PitchResult, type PitchShiftRequest, type PitchTuningRequest, type PitchYinRequest, type PlpRequest, type PolyFeaturesRequest, type ProgressiveEstimate, Project, type ProjectAssistSidecar, type ProjectAssistSidecarInput, type ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, type ProjectAutomationTargetKind, type ProjectBounceOptions, type ProjectChordSymbol, type ProjectClip, type ProjectClipCompSegment, type ProjectClipDesc, type ProjectClipFade, type ProjectClipTake, type ProjectCompileResult, type ProjectFadeCurve, type ProjectKeySegment, type ProjectLoopMode, type ProjectLoopRecordingDesc, type ProjectLoopRecordingResult, type ProjectMarker, type ProjectMidiClipResult, type ProjectMidiEvent, type ProjectNotePairValidation, type ProjectSource, type ProjectTrack, type ProjectTrackDesc, type ProjectTrackKind, type ProjectWarpAnchor, type ProjectWarpMapDesc, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, type ReassignedSpectrogramRequest, type RemixRequest, type ResampleRequest, type RhythmAnalysisResult, type RhythmFeatures, type RirResult, type RirSynthOptions, type RoomEstimateOptions, type RoomEstimateResult, type RoomGeometryOptions, type RoomMorphOptions, type RoomMorphRequest, SYNTH_BODY_TYPES, SYNTH_ENGINE_MODES, SYNTH_FILTER_MODELS, SYNTH_FILTER_OUTPUTS, SYNTH_MOD_DESTINATIONS, SYNTH_MOD_SOURCES, SYNTH_OSC_WAVEFORMS, type SamplesRequest, type Section, SectionType, type SegmentAgglomerativeRequest, type SegmentCrossSimilarityRequest, type SegmentLagToRecurrenceRequest, type SegmentMatrix, type SegmentPathEnhanceRequest, type SegmentRecurrenceMatrixRequest, type SegmentRecurrenceToLagRequest, type SegmentSubsegmentRequest, type SendTiming, type Sf2InstrumentConfig, type Sf2ProgramStatus, type SilenceRequest, type SoloProcessor, type SonareCapabilities, SonareError, type SourceBackend, type SpectralContrastRequest, type SpectralEditMode, type SpectralEditOptions, type SpectralEditRequest, type SpectralEditWindow, type SpectralFrameRequest, type SpectralRegionOp, type SpectralRolloffRequest, type SpectrogramRequest, type SpectrumOptions, type SpectrumReport, type StageGainReduction, type StereoAnalysis, type StftPowerResult, type StftResult, StreamAnalyzer, type StreamConfig, type StreamConfigDefaults, type StreamFramesI16, type StreamFramesU8, type StreamQuantizeConfig, StreamingEqualizer, type StreamingEqualizerConfig, StreamingMasteringChain, type StreamingMasteringChainConfig, type StreamingPlatform, StreamingRetune, type StreamingRetuneConfig, type SynthBodyType, type SynthEngineMode, type SynthEnumTables, type SynthFilterModel, type SynthFilterOutput, type SynthModDestination, type SynthModRouting, type SynthModSource, type SynthOscWaveform, type SynthPatch, type TempogramMode, type TempogramRatioRequest, type TempogramRequest, type Timbre, type TimbreAnalysisResult, type TimbreFrame, type TimeSignature, type TimeStretchRequest, type ToneRequest, type TonnetzRequest, type TrackMonitorMode, type TransientShaperOptions, type TrimRequest, type TrimSilenceMode, type TrimSilenceOptions, type ValidateOptions, type VectorNormalizeRequest, type VectorscopeReport, type VoiceChangeOptions, type VoiceChangeRealtimeOptions, type VoiceChangeRealtimeRequest, type VoiceChangeRequest, type VoicePresetId, type VqtRequest, type VqtToAudioRequest, type WaveformPeakPyramidOptions, type WaveformPeakPyramidRequest, type WaveformPeaksOptions, type WaveformPeaksReport, type WaveformPeaksRequest, type WebMidiBinding, type WebMidiCcBinding, type WebMidiInputInfo, type WorkletOpfsClipStreamHost, type ZeroCrossingRateRequest, type ZeroCrossingsRequest, abiVersion, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, attachOpfsClipStream, bassChroma, bindMicrophoneInput, bindWebMidi, capabilities, capabilityCatalog, chirp, chordFunctionalAnalysis, chroma, chromaCens, chromaCqt, clicks, cqt, cqtToAudio, createOpfsClipPageProvider, createOpfsClipPageWorker, cyclicTempogram, dbToAmplitude, dbToPower, decompose, decomposeWithInit, deemphasis, detectAcoustic, detectBeats, detectBpm, detectChords, detectDownbeats, detectKey, detectKeyCandidates, detectOnsets, ebur128LoudnessRange, engineAbiVersion, engineCapabilities, estimateRoom, estimateTuning, fixFrames, fixLength, fourierTempogram, frameSignal, framesToSamples, framesToTime, griffinLim, harmonic, hasFfmpegSupport, hpss, hpssWithResidual, hybridCqt, hzToMel, hzToMidi, hzToNote, init, isInitialized, isSonareError, isWebMidiAvailable, lufs, lufsInterleaved, masterAudio, masterAudioStereo, masterAudioStereoWithProgress, masterAudioWithProgress, mastering, masteringAssistantSuggest, masteringAudioProfile, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringDynamicsCompressor, masteringDynamicsGate, masteringDynamicsTransientShaper, masteringInsertNames, masteringInsertParamInfo, masteringInsertParamNames, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorCatalog, masteringProcessorNames, masteringRepairDeclick, masteringRepairDeclip, masteringRepairDecrackle, masteringRepairDehum, masteringRepairDenoiseClassical, masteringRepairDereverbClassical, masteringRepairTrimSilence, masteringStereoAnalysisNames, masteringStereoAnalyze, masteringStreamingPreview, melDelta, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringPhaseScopeDecimated, meteringRmsDb, meteringSilenceRatio, meteringSpectrum, meteringSpectrumFrame, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, meteringVectorscopeDecimated, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteMove, noteSegments, noteStretch, noteToHz, onsetBacktrack, onsetEnvelope, onsetStrengthMulti, opfsClipPageWorkerSource, padCenter, pcen, peakPick, percussive, phaseVocoder, piptrack, pitchCorrectTimevarying, pitchCorrectToMidi, pitchCorrectToMidiTimevarying, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, projectAbiVersion, pseudoCqt, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, reassignedSpectrogram, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, segmentAgglomerative, segmentCrossSimilarity, segmentLagToRecurrence, segmentPathEnhance, segmentRecurrenceMatrix, segmentRecurrenceToLag, segmentSubsegment, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralEdit, spectralFlatness, spectralFlux, spectralRolloff, splitSilence, stft, stftDb, streamAnalyzerConfigDefaults, synthEnumTables, synthPresetNames, synthPresetPatch, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tone, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, vqtToAudio, waveformPeakPyramid, waveformPeaks, zeroCrossingRate, zeroCrossings };
|