@libraz/libsonare 1.5.5 → 1.6.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 +5730 -0
- package/dist/analysis.js +2464 -0
- package/dist/analysis.js.map +1 -0
- package/dist/index.d.ts +759 -35
- package/dist/index.js +904 -209
- 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 +707 -0
- package/dist/worker.js.map +1 -0
- package/dist/worklet.d.ts +574 -86
- package/dist/worklet.js +1634 -235
- 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 +6 -0
- package/src/clip_page_streamer.ts +62 -8
- package/src/codes.ts +51 -64
- package/src/effects_mastering.ts +1 -0
- package/src/errors.ts +1 -0
- package/src/feature_core.ts +140 -2
- package/src/feature_music.ts +17 -2
- package/src/feature_pitch.ts +70 -1
- package/src/feature_spectral.ts +231 -5
- package/src/feature_spectrogram.ts +159 -0
- package/src/features.ts +16 -1
- package/src/index.ts +101 -7
- 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/opfs_clip_pages.ts +26 -1
- package/src/project.ts +7 -0
- package/src/project_class.ts +62 -8
- package/src/project_internal.ts +24 -29
- package/src/project_types.ts +69 -10
- package/src/public_types.ts +68 -0
- package/src/public_types_mastering.ts +22 -0
- package/src/public_types_mixing.ts +11 -2
- package/src/public_types_music.ts +9 -0
- package/src/public_types_spectral.ts +33 -0
- package/src/quick_analysis.ts +25 -7
- package/src/realtime_engine.ts +153 -3
- package/src/realtime_voice_changer.ts +51 -77
- package/src/sonare-analysis.js.d.ts +8 -0
- package/src/sonare.js.d.ts +276 -6
- package/src/streaming_processors.ts +15 -0
- package/src/web_midi.ts +36 -4
- 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 +212 -4
- package/src/worklet/engine-offline.ts +7 -2
- package/src/worklet/engine-parameter-facade.ts +26 -5
- package/src/worklet/engine-processor.ts +383 -42
- package/src/worklet/engine-register.ts +8 -0
- package/src/worklet/engine-strips.ts +17 -1
- package/src/worklet/engine-sync.ts +2 -6
- package/src/worklet/engine-tempo-facade.ts +8 -6
- package/src/worklet/engine.ts +380 -13
- package/src/worklet/guards.ts +22 -1
- package/src/worklet/messages.ts +125 -7
- package/src/worklet/protocol.ts +301 -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,7 +547,9 @@ 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';
|
|
533
555
|
/**
|
|
@@ -810,6 +832,12 @@ interface TimeSignature {
|
|
|
810
832
|
denominator: number;
|
|
811
833
|
confidence: number;
|
|
812
834
|
}
|
|
835
|
+
/** Existing tempo-estimator hypothesis retained by unified analysis. */
|
|
836
|
+
interface BpmHypothesis {
|
|
837
|
+
value: number;
|
|
838
|
+
confidence: number;
|
|
839
|
+
relation: 'primary' | 'half' | 'double' | 'other';
|
|
840
|
+
}
|
|
813
841
|
/**
|
|
814
842
|
* Rhythm features
|
|
815
843
|
*/
|
|
@@ -836,8 +864,10 @@ interface MelodyContour {
|
|
|
836
864
|
interface AnalysisResult {
|
|
837
865
|
bpm: number;
|
|
838
866
|
bpmConfidence: number;
|
|
867
|
+
bpmCandidates: BpmHypothesis[];
|
|
839
868
|
key: Key;
|
|
840
869
|
timeSignature: TimeSignature;
|
|
870
|
+
timeSignatureCandidates: TimeSignature[];
|
|
841
871
|
beatTimes: Float32Array;
|
|
842
872
|
beats: Beat[];
|
|
843
873
|
chords: Chord[];
|
|
@@ -1152,6 +1182,35 @@ interface PitchResult {
|
|
|
1152
1182
|
medianF0: number;
|
|
1153
1183
|
meanF0: number;
|
|
1154
1184
|
}
|
|
1185
|
+
/** Per-bin pitch candidates and peak magnitudes from spectral piptrack. */
|
|
1186
|
+
interface PiptrackResult {
|
|
1187
|
+
nBins: number;
|
|
1188
|
+
nFrames: number;
|
|
1189
|
+
pitches: Float32Array;
|
|
1190
|
+
magnitudes: Float32Array;
|
|
1191
|
+
}
|
|
1192
|
+
/** Magnitude and reassigned time/frequency coordinates for every STFT bin. */
|
|
1193
|
+
interface ReassignedSpectrogramResult {
|
|
1194
|
+
nBins: number;
|
|
1195
|
+
nFrames: number;
|
|
1196
|
+
magnitude: Float32Array;
|
|
1197
|
+
times: Float32Array;
|
|
1198
|
+
frequencies: Float32Array;
|
|
1199
|
+
}
|
|
1200
|
+
/** Row-major matrix returned by librosa.segment-compatible APIs. */
|
|
1201
|
+
interface SegmentMatrix {
|
|
1202
|
+
rows: number;
|
|
1203
|
+
cols: number;
|
|
1204
|
+
values: Float32Array;
|
|
1205
|
+
}
|
|
1206
|
+
/** One stable monophonic note region segmented from an F0 track. */
|
|
1207
|
+
interface NoteSegment {
|
|
1208
|
+
frameStart: number;
|
|
1209
|
+
frameEnd: number;
|
|
1210
|
+
startSeconds: number;
|
|
1211
|
+
endSeconds: number;
|
|
1212
|
+
medianCents: number;
|
|
1213
|
+
}
|
|
1155
1214
|
/**
|
|
1156
1215
|
* Loudness measurement result (EBU R128 / ITU-R BS.1770)
|
|
1157
1216
|
*/
|
|
@@ -1176,6 +1235,67 @@ interface HpssResult {
|
|
|
1176
1235
|
sampleRate: number;
|
|
1177
1236
|
}
|
|
1178
1237
|
|
|
1238
|
+
/** Runtime capabilities reported by the loaded libsonare build. */
|
|
1239
|
+
interface SonareCapabilities {
|
|
1240
|
+
version: string;
|
|
1241
|
+
abi: {
|
|
1242
|
+
project: number;
|
|
1243
|
+
engine: number;
|
|
1244
|
+
};
|
|
1245
|
+
platform: string;
|
|
1246
|
+
features: {
|
|
1247
|
+
mastering: boolean;
|
|
1248
|
+
mixing: boolean;
|
|
1249
|
+
fx: boolean;
|
|
1250
|
+
ffmpeg: boolean;
|
|
1251
|
+
};
|
|
1252
|
+
decode: {
|
|
1253
|
+
builtin: string[];
|
|
1254
|
+
ffmpeg: string[];
|
|
1255
|
+
};
|
|
1256
|
+
simd: string;
|
|
1257
|
+
hardwareConcurrency: number;
|
|
1258
|
+
}
|
|
1259
|
+
/** One parameter descriptor in the cross-surface capability catalog. */
|
|
1260
|
+
interface CapabilityCatalogParameter {
|
|
1261
|
+
name: string;
|
|
1262
|
+
id: number;
|
|
1263
|
+
rtSafe: boolean;
|
|
1264
|
+
type: 'boolean' | 'number';
|
|
1265
|
+
min: number | null;
|
|
1266
|
+
max: number | null;
|
|
1267
|
+
default: boolean | number | null;
|
|
1268
|
+
unit: string | null;
|
|
1269
|
+
}
|
|
1270
|
+
/** One named mastering processor and its host-facing capabilities. */
|
|
1271
|
+
interface CapabilityCatalogProcessor {
|
|
1272
|
+
id: string;
|
|
1273
|
+
kind: 'realtime' | 'offline' | 'pair';
|
|
1274
|
+
realtimeInsertable: boolean;
|
|
1275
|
+
stereoOnly: boolean;
|
|
1276
|
+
latencySamples: number;
|
|
1277
|
+
tailSamples: number;
|
|
1278
|
+
/** Coarse realtime work estimate, or null when the processor is not an insert. */
|
|
1279
|
+
realtimeCost: 'low' | 'moderate' | 'high' | null;
|
|
1280
|
+
channelPolicy: 'multichannel' | 'stereoPairOnly' | 'perChannel' | 'passthrough';
|
|
1281
|
+
category: string;
|
|
1282
|
+
params: CapabilityCatalogParameter[];
|
|
1283
|
+
}
|
|
1284
|
+
/** Built-in preset names grouped by feature family. */
|
|
1285
|
+
interface CapabilityCatalogPresets {
|
|
1286
|
+
mastering: string[];
|
|
1287
|
+
synth: string[];
|
|
1288
|
+
mixingScene: string[];
|
|
1289
|
+
voiceChanger: string[];
|
|
1290
|
+
}
|
|
1291
|
+
/** Complete runtime catalog exposed by {@link capabilityCatalog}. */
|
|
1292
|
+
interface CapabilityCatalog {
|
|
1293
|
+
version: string;
|
|
1294
|
+
abi: SonareCapabilities['abi'];
|
|
1295
|
+
processors: CapabilityCatalogProcessor[];
|
|
1296
|
+
presets: CapabilityCatalogPresets;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1179
1299
|
/** Canonical request form for HPSS. */
|
|
1180
1300
|
interface HpssRequest {
|
|
1181
1301
|
samples: Float32Array;
|
|
@@ -1442,6 +1562,7 @@ interface MasteringChainRequest {
|
|
|
1442
1562
|
sampleRate?: number;
|
|
1443
1563
|
config?: MasteringChainConfig;
|
|
1444
1564
|
onProgress?: ProgressCallback;
|
|
1565
|
+
cancel?: () => boolean;
|
|
1445
1566
|
}
|
|
1446
1567
|
interface MasteringChainStereoRequest {
|
|
1447
1568
|
left: Float32Array;
|
|
@@ -1449,6 +1570,7 @@ interface MasteringChainStereoRequest {
|
|
|
1449
1570
|
sampleRate?: number;
|
|
1450
1571
|
config?: MasteringChainConfig;
|
|
1451
1572
|
onProgress?: ProgressCallback;
|
|
1573
|
+
cancel?: () => boolean;
|
|
1452
1574
|
}
|
|
1453
1575
|
/** Canonical request form for one-shot preset mastering. */
|
|
1454
1576
|
interface MasterAudioRequest {
|
|
@@ -1457,6 +1579,7 @@ interface MasterAudioRequest {
|
|
|
1457
1579
|
preset?: MasteringPreset;
|
|
1458
1580
|
overrides?: MasteringChainConfig;
|
|
1459
1581
|
onProgress?: ProgressCallback;
|
|
1582
|
+
cancel?: () => boolean;
|
|
1460
1583
|
}
|
|
1461
1584
|
/** Canonical request form for one-shot stereo preset mastering. */
|
|
1462
1585
|
interface MasterAudioStereoRequest {
|
|
@@ -1466,6 +1589,7 @@ interface MasterAudioStereoRequest {
|
|
|
1466
1589
|
preset?: MasteringPreset;
|
|
1467
1590
|
overrides?: MasteringChainConfig;
|
|
1468
1591
|
onProgress?: ProgressCallback;
|
|
1592
|
+
cancel?: () => boolean;
|
|
1469
1593
|
}
|
|
1470
1594
|
/**
|
|
1471
1595
|
* Apply a configurable mastering chain in WASM.
|
|
@@ -1666,6 +1790,8 @@ declare function masteringInsertParamInfo(name: string): MasteringInsertParamInf
|
|
|
1666
1790
|
* "perChannel"/"passthrough" are reserved and unused by the current catalog.
|
|
1667
1791
|
*/
|
|
1668
1792
|
type MasteringChannelPolicy = 'multichannel' | 'stereoPairOnly' | 'perChannel' | 'passthrough';
|
|
1793
|
+
/** Coarse algorithmic work estimate for a realtime insert; not a benchmark. */
|
|
1794
|
+
type MasteringRealtimeCost = 'low' | 'moderate' | 'high';
|
|
1669
1795
|
/** One processor's realtime/offline/pair classification in the catalog. */
|
|
1670
1796
|
interface MasteringProcessorCatalogEntry {
|
|
1671
1797
|
/** Processor id (the name used for scene inserts / named processors). */
|
|
@@ -1690,6 +1816,8 @@ interface MasteringProcessorCatalogEntry {
|
|
|
1690
1816
|
* offline, dry-only, and no-tail processors.
|
|
1691
1817
|
*/
|
|
1692
1818
|
tailSamples: number;
|
|
1819
|
+
/** Coarse realtime work estimate, or null when the processor is not an insert. */
|
|
1820
|
+
realtimeCost: MasteringRealtimeCost | null;
|
|
1693
1821
|
/**
|
|
1694
1822
|
* How the mixer wraps the processor on a >2-channel (surround) bus insert:
|
|
1695
1823
|
* "multichannel" (one full-buffer call) or "stereoPairOnly" (front L/R pair,
|
|
@@ -2101,6 +2229,26 @@ interface ProjectBounceOptions {
|
|
|
2101
2229
|
/** Host-instrument PDC (latency) fed to the compiler. */
|
|
2102
2230
|
instrumentLatencySamples?: number;
|
|
2103
2231
|
}
|
|
2232
|
+
/** One decoded output from a host-owned source-separation model. */
|
|
2233
|
+
interface ExternalSeparatedStem {
|
|
2234
|
+
name: string;
|
|
2235
|
+
/** Optional host metadata; it does not change DSP. */
|
|
2236
|
+
role?: string;
|
|
2237
|
+
layout: 'mono' | 'stereo' | 1 | 2;
|
|
2238
|
+
planarSamples: Float32Array[];
|
|
2239
|
+
/** Absolute project-rate frame at which this stem begins. */
|
|
2240
|
+
startFrame?: number;
|
|
2241
|
+
}
|
|
2242
|
+
/** Request for {@link Project.importExternalStems}. */
|
|
2243
|
+
interface ExternalSeparatedStemImportRequest {
|
|
2244
|
+
sampleRate: number;
|
|
2245
|
+
stems: ExternalSeparatedStem[];
|
|
2246
|
+
}
|
|
2247
|
+
/** Ids of the normal tracks and clips created by the import. */
|
|
2248
|
+
interface ExternalSeparatedStemImportResult {
|
|
2249
|
+
trackIds: number[];
|
|
2250
|
+
clipIds: number[];
|
|
2251
|
+
}
|
|
2104
2252
|
/**
|
|
2105
2253
|
* Marker kind ordinals. Mirrors `SonareMarkerKind` in `src/sonare_c_types.h`;
|
|
2106
2254
|
* the values are part of the ABI and must not be renumbered.
|
|
@@ -2127,8 +2275,43 @@ interface ProjectMarker {
|
|
|
2127
2275
|
/** Key signature only: false = major, true = minor. */
|
|
2128
2276
|
keyMinor?: boolean;
|
|
2129
2277
|
}
|
|
2278
|
+
/** Read-only stored project track returned by {@link Project.trackByIndex}. */
|
|
2279
|
+
interface ProjectTrack {
|
|
2280
|
+
id: number;
|
|
2281
|
+
kind: number;
|
|
2282
|
+
midiDestinationId: number;
|
|
2283
|
+
gain: number;
|
|
2284
|
+
pan: number;
|
|
2285
|
+
mute: boolean;
|
|
2286
|
+
solo: boolean;
|
|
2287
|
+
name: string;
|
|
2288
|
+
}
|
|
2289
|
+
/** Read-only stored project clip returned by {@link Project.clipByIndex}. */
|
|
2290
|
+
interface ProjectClip {
|
|
2291
|
+
id: number;
|
|
2292
|
+
trackId: number;
|
|
2293
|
+
sourceId: number;
|
|
2294
|
+
sourceKind: number;
|
|
2295
|
+
startPpq: number;
|
|
2296
|
+
lengthPpq: number;
|
|
2297
|
+
sourceOffsetPpq: number;
|
|
2298
|
+
gain: number;
|
|
2299
|
+
loopMode: number;
|
|
2300
|
+
loopLengthPpq: number;
|
|
2301
|
+
}
|
|
2302
|
+
/** Read-only stored project source returned by {@link Project.sourceByIndex}. */
|
|
2303
|
+
interface ProjectSource {
|
|
2304
|
+
id: number;
|
|
2305
|
+
kind: number;
|
|
2306
|
+
channelCount: number;
|
|
2307
|
+
storageHandleId: number;
|
|
2308
|
+
sampleRateHint: number;
|
|
2309
|
+
nameOrUri: string;
|
|
2310
|
+
}
|
|
2311
|
+
/** Names accepted by the minimal built-in oscillator synth. */
|
|
2312
|
+
declare const BUILTIN_SYNTH_WAVEFORMS: readonly ["sine", "saw", "sawtooth", "square", "triangle"];
|
|
2130
2313
|
/** Oscillator waveform for the built-in synth. */
|
|
2131
|
-
type BuiltinSynthWaveform =
|
|
2314
|
+
type BuiltinSynthWaveform = (typeof BUILTIN_SYNTH_WAVEFORMS)[number] | 0 | 1 | 2 | 3;
|
|
2132
2315
|
/**
|
|
2133
2316
|
* Built-in synth patch + MIDI routing for
|
|
2134
2317
|
* {@link Project.bounceWithBuiltinInstrument}. Every field is optional; a
|
|
@@ -2173,6 +2356,8 @@ interface Sf2InstrumentConfig {
|
|
|
2173
2356
|
gain?: number;
|
|
2174
2357
|
/** Max simultaneous voices (0 => 48, clamped to [1, 64]). */
|
|
2175
2358
|
polyphony?: number;
|
|
2359
|
+
/** Prefer dedicated physical models for covered melodic GM programs. Defaults to false; drums stay SF2-first. */
|
|
2360
|
+
preferModelForModeledFamilies?: boolean;
|
|
2176
2361
|
}
|
|
2177
2362
|
/** Source backend a resolved MIDI program renders through. */
|
|
2178
2363
|
type SourceBackend = 'sf2' | 'synth';
|
|
@@ -2202,6 +2387,7 @@ declare const SYNTH_MOD_DESTINATIONS: readonly ["none", "pitch-cents", "cutoff-c
|
|
|
2202
2387
|
interface SynthEnumTables {
|
|
2203
2388
|
engineModes: string[];
|
|
2204
2389
|
waveforms: string[];
|
|
2390
|
+
builtinWaveforms: string[];
|
|
2205
2391
|
filterModels: string[];
|
|
2206
2392
|
filterOutputs: string[];
|
|
2207
2393
|
bodyTypes: string[];
|
|
@@ -2301,7 +2487,7 @@ interface SynthPatch {
|
|
|
2301
2487
|
busDrive?: number;
|
|
2302
2488
|
}
|
|
2303
2489
|
/** Clip fade-curve for {@link Project.setClipFade}. */
|
|
2304
|
-
type ProjectFadeCurve = 'linear' | 'equal-power' | 'equal_power' | 'equalPower' | 'exponential' | 'logarithmic' | 0 | 1 | 2 | 3;
|
|
2490
|
+
type ProjectFadeCurve = 'linear' | 'equal-power' | 'equal_power' | 'equalPower' | 'equalpower' | 'exponential' | 'exp' | 'logarithmic' | 'log' | 0 | 1 | 2 | 3;
|
|
2305
2491
|
/** One clip fade region for {@link Project.setClipFade}. */
|
|
2306
2492
|
interface ProjectClipFade {
|
|
2307
2493
|
/** Fade length in PPQ (>= 0; 0 = no fade). */
|
|
@@ -2631,6 +2817,8 @@ declare class Project {
|
|
|
2631
2817
|
addTrack(desc?: ProjectTrackDesc): number;
|
|
2632
2818
|
/** Add an audio or MIDI clip and return its allocated clip id. */
|
|
2633
2819
|
addClip(desc: ProjectClipDesc): number;
|
|
2820
|
+
/** Import host-separated PCM through the normal audio-track/clip path. */
|
|
2821
|
+
importExternalStems(request: ExternalSeparatedStemImportRequest): ExternalSeparatedStemImportResult;
|
|
2634
2822
|
/** Split captured loop-recording audio into takes and add one clip. */
|
|
2635
2823
|
addLoopRecordingTakes(desc: ProjectLoopRecordingDesc): ProjectLoopRecordingResult;
|
|
2636
2824
|
/** Create a MIDI track + clip; returns `{ trackId, clipId }`. */
|
|
@@ -2655,7 +2843,11 @@ declare class Project {
|
|
|
2655
2843
|
* Route a track's MIDI to host-instrument `destinationId` (0 = default). The
|
|
2656
2844
|
* compiler stamps every MIDI clip on the track with this id so the engine
|
|
2657
2845
|
* dispatches its events to the instrument registered for that destination.
|
|
2658
|
-
* Routes through an undoable edit command.
|
|
2846
|
+
* Routes through an undoable edit command. Builtin, NativeSynth, and SF2
|
|
2847
|
+
* instruments retain source-track provenance inside a shared destination
|
|
2848
|
+
* voice pool. With only zero-latency instruments bound, live lanes and
|
|
2849
|
+
* channel-strip bounces remain aligned. Configure one live lane per source
|
|
2850
|
+
* track that needs strip processing.
|
|
2659
2851
|
*/
|
|
2660
2852
|
setTrackMidiDestination(trackId: number, destinationId: number): void;
|
|
2661
2853
|
/** Set a track's linear playback gain (1.0 = unity; >= 0) via an undoable edit. */
|
|
@@ -2820,6 +3012,10 @@ declare class Project {
|
|
|
2820
3012
|
setClipGain(clipId: number, gain: number): void;
|
|
2821
3013
|
/** Set a clip's fade-in / fade-out regions (undoable). */
|
|
2822
3014
|
setClipFade(clipId: number, fadeIn?: ProjectClipFade, fadeOut?: ProjectClipFade): void;
|
|
3015
|
+
/** Audio source ids that need decoded PCM after deserialization. */
|
|
3016
|
+
unresolvedAudioSourceIds(): number[];
|
|
3017
|
+
/** Register decoded interleaved PCM for an existing audio source (undoable). */
|
|
3018
|
+
setSourceAudio(sourceId: number, audio: Float32Array, channels: number, sampleRate: number): void;
|
|
2823
3019
|
/** Replace a clip's take list and active take id (undoable). */
|
|
2824
3020
|
setClipTakes(clipId: number, takes: ReadonlyArray<ProjectClipTake>, activeTakeId?: number): void;
|
|
2825
3021
|
/** Replace a clip's comp segments (undoable). */
|
|
@@ -2840,12 +3036,12 @@ declare class Project {
|
|
|
2840
3036
|
renameTrack(trackId: number, name: string): void;
|
|
2841
3037
|
/** Set a track's mixer-strip binding + output target (undoable; omit / '' clears). */
|
|
2842
3038
|
setTrackRoute(trackId: number, channelStripRef?: string, outputTarget?: string): void;
|
|
2843
|
-
/** Append an automation lane
|
|
3039
|
+
/** Append an automation lane; returns its stable target parameter id (undoable). */
|
|
2844
3040
|
addAutomationLane(trackId: number, desc: ProjectAutomationLaneDesc): number;
|
|
2845
|
-
/** Replace
|
|
2846
|
-
editAutomationLane(trackId: number,
|
|
2847
|
-
/** Remove
|
|
2848
|
-
removeAutomationLane(trackId: number,
|
|
3041
|
+
/** Replace the lane identified by its stable target parameter id (undoable). */
|
|
3042
|
+
editAutomationLane(trackId: number, targetParamId: number, desc: ProjectAutomationLaneDesc): void;
|
|
3043
|
+
/** Remove the lane identified by its stable target parameter id (undoable). */
|
|
3044
|
+
removeAutomationLane(trackId: number, targetParamId: number): void;
|
|
2849
3045
|
/** Replace the project's key annotation stream (undoable). */
|
|
2850
3046
|
annotateKeys(keys: ReadonlyArray<ProjectKeySegment>): void;
|
|
2851
3047
|
/** Replace the project's chord-symbol annotation stream (undoable). */
|
|
@@ -2877,6 +3073,12 @@ declare class Project {
|
|
|
2877
3073
|
setMarkerEx(marker: ProjectMarker): number;
|
|
2878
3074
|
/** Read a project marker by index (0-based, in stored order). */
|
|
2879
3075
|
markerByIndex(index: number): ProjectMarker;
|
|
3076
|
+
/** Read a stored project track by 0-based index. */
|
|
3077
|
+
trackByIndex(index: number): ProjectTrack;
|
|
3078
|
+
/** Read a stored project clip by 0-based index. */
|
|
3079
|
+
clipByIndex(index: number): ProjectClip;
|
|
3080
|
+
/** Read a stored project source by 0-based index. */
|
|
3081
|
+
sourceByIndex(index: number): ProjectSource;
|
|
2880
3082
|
/** Number of markers in the project. */
|
|
2881
3083
|
markerCount(): number;
|
|
2882
3084
|
/** Number of tracks in the project. */
|
|
@@ -2935,6 +3137,7 @@ type EngineMarker = WasmEngineMarker;
|
|
|
2935
3137
|
type EngineMetronomeConfig = WasmEngineMetronomeConfig;
|
|
2936
3138
|
type EngineGraphSpec = WasmEngineGraphSpec;
|
|
2937
3139
|
type EngineCaptureStatus = WasmEngineCaptureStatus;
|
|
3140
|
+
type EngineCaptureSource = EngineCaptureStatus['source'] | number;
|
|
2938
3141
|
type EngineBounceOptions = WasmEngineBounceOptions;
|
|
2939
3142
|
type EngineBounceResult = WasmEngineBounceResult;
|
|
2940
3143
|
type EngineFreezeOptions = WasmEngineFreezeOptions;
|
|
@@ -3025,8 +3228,8 @@ interface EngineCapabilities {
|
|
|
3025
3228
|
declare function engineCapabilities(): EngineCapabilities;
|
|
3026
3229
|
declare class RealtimeEngine {
|
|
3027
3230
|
private native;
|
|
3028
|
-
constructor(sampleRate?: number, maxBlockSize?: number, commandCapacity?: number, telemetryCapacity?: number);
|
|
3029
|
-
prepare(sampleRate: number, maxBlockSize: number, commandCapacity?: number, telemetryCapacity?: number): void;
|
|
3231
|
+
constructor(sampleRate?: number, maxBlockSize?: number, commandCapacity?: number, telemetryCapacity?: number, maxChannels?: number);
|
|
3232
|
+
prepare(sampleRate: number, maxBlockSize: number, commandCapacity?: number, telemetryCapacity?: number, maxChannels?: number): void;
|
|
3030
3233
|
/** Queue a sample-accurate parameter change (engine kSetParam). */
|
|
3031
3234
|
setParameter(paramId: number, value: number, renderFrame?: number): void;
|
|
3032
3235
|
/** Queue a smoothed parameter change (engine kSetParamSmoothed). */
|
|
@@ -3072,6 +3275,7 @@ declare class RealtimeEngine {
|
|
|
3072
3275
|
destinationId?: number;
|
|
3073
3276
|
gain?: number;
|
|
3074
3277
|
polyphony?: number;
|
|
3278
|
+
preferModelForModeledFamilies?: boolean;
|
|
3075
3279
|
}, destinationId?: number): void;
|
|
3076
3280
|
clearMidiInstrument(destinationId?: number): void;
|
|
3077
3281
|
midiInstrumentCount(): number;
|
|
@@ -3105,6 +3309,7 @@ declare class RealtimeEngine {
|
|
|
3105
3309
|
setExternalMidiClockEnabled(enabled: boolean): void;
|
|
3106
3310
|
/** Count of external-MIDI events dropped because the output queue was full. */
|
|
3107
3311
|
externalMidiDroppedCount(): number;
|
|
3312
|
+
externalMidiPendingCount(): number;
|
|
3108
3313
|
/**
|
|
3109
3314
|
* Drain queued external-MIDI events, already lowered to MIDI 1.0 byte
|
|
3110
3315
|
* messages ready to write to a Web MIDI output port. Call once per audio
|
|
@@ -3113,6 +3318,13 @@ declare class RealtimeEngine {
|
|
|
3113
3318
|
* queued for the next call (lossless); call again to drain the rest.
|
|
3114
3319
|
*/
|
|
3115
3320
|
drainExternalMidi(maxRecords?: number): WasmExternalMidiEvent[];
|
|
3321
|
+
/** Scalar, allocation-free external-MIDI drain for AudioWorklet SAB output. */
|
|
3322
|
+
popExternalMidiToScratch(): boolean;
|
|
3323
|
+
externalMidiScratchDestinationId(): number;
|
|
3324
|
+
externalMidiScratchRenderFrame(): number;
|
|
3325
|
+
externalMidiScratchByteWord(): number;
|
|
3326
|
+
externalMidiScratchByteCount(): number;
|
|
3327
|
+
consumeExternalMidiScratch(): void;
|
|
3116
3328
|
pushMidiInputNoteOn(group: number, channel: number, note: number, velocity: number, portTimeSamples?: number): void;
|
|
3117
3329
|
pushMidiInputNoteOff(group: number, channel: number, note: number, velocity?: number, portTimeSamples?: number): void;
|
|
3118
3330
|
pushMidiInputCc(group: number, channel: number, controller: number, value: number, portTimeSamples?: number): void;
|
|
@@ -3125,6 +3337,8 @@ declare class RealtimeEngine {
|
|
|
3125
3337
|
* immediate. Mirrors the Node/Python/C-ABI `pushMidiCc`.
|
|
3126
3338
|
*/
|
|
3127
3339
|
pushMidiCc(destinationId: number, group: number, channel: number, controller: number, value: number, renderFrame?: number): void;
|
|
3340
|
+
/** Queue one immediate MIDI 1.0 channel-voice UMP word for a destination. */
|
|
3341
|
+
pushMidiUmp(destinationId: number, word0: number, renderFrame?: number): void;
|
|
3128
3342
|
/**
|
|
3129
3343
|
* Queue an immediate (live) MIDI SysEx frame to a MIDI destination. `data` is
|
|
3130
3344
|
* the full message including the leading 0xF0 and trailing 0xF7 (1..512
|
|
@@ -3154,6 +3368,8 @@ declare class RealtimeEngine {
|
|
|
3154
3368
|
* settled values instead of ramping in from defaults.
|
|
3155
3369
|
*/
|
|
3156
3370
|
settleParameters(): void;
|
|
3371
|
+
/** Drains queued commands on an offline/control-only engine immediately. */
|
|
3372
|
+
flushControlCommands(): void;
|
|
3157
3373
|
seekPpq(ppq: number, renderFrame?: number): void;
|
|
3158
3374
|
/** Set a finite tempo in the range (0, 100000] BPM. */
|
|
3159
3375
|
setTempo(bpm: number): void;
|
|
@@ -3246,16 +3462,29 @@ declare class RealtimeEngine {
|
|
|
3246
3462
|
clearClipPage(providerId: number, pageIndex: number): void;
|
|
3247
3463
|
destroyClipPageProvider(providerId: number): void;
|
|
3248
3464
|
popClipPageRequest(): ClipPageRequest | null;
|
|
3465
|
+
/**
|
|
3466
|
+
* Moves one native request into the binding's persistent scalar scratch.
|
|
3467
|
+
* This avoids creating an embind JS object in AudioWorklet process().
|
|
3468
|
+
*/
|
|
3469
|
+
popClipPageRequestToScratch(): boolean;
|
|
3470
|
+
clipPageRequestScratchClipId(): number;
|
|
3471
|
+
clipPageRequestScratchSample(): number;
|
|
3472
|
+
/** Cumulative page misses dropped because the native bounded request queue was full. */
|
|
3473
|
+
clipPageRequestOverflowCount(): number;
|
|
3249
3474
|
setCaptureBuffer(numChannels: number, capacityFrames: number): void;
|
|
3250
3475
|
armCapture(armed?: boolean): void;
|
|
3251
3476
|
setCapturePunch(startSample: number, endSample: number, enabled?: boolean): void;
|
|
3252
|
-
setCaptureSource(source:
|
|
3477
|
+
setCaptureSource(source: EngineCaptureSource): void;
|
|
3253
3478
|
/** Positive values delay capture relative to the punch window. */
|
|
3254
3479
|
setRecordOffsetSamples(offsetSamples: number): void;
|
|
3255
3480
|
setInputMonitor(enabled: boolean, gain?: number): void;
|
|
3256
3481
|
resetCapture(): void;
|
|
3257
3482
|
captureStatus(): EngineCaptureStatus;
|
|
3258
3483
|
capturedAudio(): Float32Array[];
|
|
3484
|
+
/**
|
|
3485
|
+
* Renders in place, adding engine output to `channels`. Zero each plane first
|
|
3486
|
+
* when it contains no upstream input.
|
|
3487
|
+
*/
|
|
3259
3488
|
process(channels: Float32Array[]): Float32Array[];
|
|
3260
3489
|
/**
|
|
3261
3490
|
* Allocates persistent per-channel WASM-heap scratch for the zero-copy
|
|
@@ -3272,6 +3501,7 @@ declare class RealtimeEngine {
|
|
|
3272
3501
|
getChannelBuffer(channel: number, numFrames: number): Float32Array;
|
|
3273
3502
|
/**
|
|
3274
3503
|
* Runs the engine in place over the prepared per-channel scratch buffers.
|
|
3504
|
+
* Zero each active span first when it contains no upstream input.
|
|
3275
3505
|
* Allocation-free: safe to call on the AudioWorklet render thread after
|
|
3276
3506
|
* `prepareChannels`.
|
|
3277
3507
|
*/
|
|
@@ -3281,6 +3511,18 @@ declare class RealtimeEngine {
|
|
|
3281
3511
|
bounceOffline(options: EngineBounceOptions): EngineBounceResult;
|
|
3282
3512
|
freezeOffline(options: EngineFreezeOptions): EngineFreezeResult;
|
|
3283
3513
|
drainTelemetry(maxRecords?: number): EngineTelemetry[];
|
|
3514
|
+
popTelemetryToScratch(): boolean;
|
|
3515
|
+
telemetryScratchType(): number;
|
|
3516
|
+
telemetryScratchError(): number;
|
|
3517
|
+
telemetryScratchRenderFrame(): number;
|
|
3518
|
+
telemetryScratchTimelineSample(): number;
|
|
3519
|
+
telemetryScratchAudibleTimelineSample(): number;
|
|
3520
|
+
telemetryScratchGraphLatencySamplesQ8(): number;
|
|
3521
|
+
telemetryScratchValue(): number;
|
|
3522
|
+
popMeterTelemetryToScratch(): boolean;
|
|
3523
|
+
meterScratchTargetId(): number;
|
|
3524
|
+
meterScratchRenderFrame(): number;
|
|
3525
|
+
meterScratchValue(field: number): number;
|
|
3284
3526
|
drainMeterTelemetry(maxRecords?: number): EngineMeterTelemetry[];
|
|
3285
3527
|
/**
|
|
3286
3528
|
* Drains pending meter telemetry as per-plane (wide) records for a surround
|
|
@@ -3300,6 +3542,14 @@ declare class RealtimeEngine {
|
|
|
3300
3542
|
configureScopeTelemetry(intervalFrames: number, bandCount: number): number;
|
|
3301
3543
|
/** Drains pending spectrum + vectorscope snapshots (per mix target). */
|
|
3302
3544
|
drainScopeTelemetry(maxRecords?: number): EngineScopeTelemetry[];
|
|
3545
|
+
popScopeTelemetryToScratch(): boolean;
|
|
3546
|
+
scopeScratchTargetId(): number;
|
|
3547
|
+
scopeScratchRenderFrame(): number;
|
|
3548
|
+
scopeScratchBandCount(): number;
|
|
3549
|
+
scopeScratchBand(index: number): number;
|
|
3550
|
+
scopeScratchPointCount(): number;
|
|
3551
|
+
scopeScratchPointLeft(index: number): number;
|
|
3552
|
+
scopeScratchPointRight(index: number): number;
|
|
3303
3553
|
destroy(): void;
|
|
3304
3554
|
}
|
|
3305
3555
|
declare class ClipPageProvider {
|
|
@@ -3320,11 +3570,19 @@ interface OpfsClipPageProviderOptions {
|
|
|
3320
3570
|
dataOffsetBytes?: number;
|
|
3321
3571
|
worker?: Worker;
|
|
3322
3572
|
terminateWorkerOnClose?: boolean;
|
|
3573
|
+
/** Internal bridge hook used to mirror a supplied page into an AudioWorklet. */
|
|
3574
|
+
onPageSupplied?: (pageIndex: number, channels: Float32Array[]) => void;
|
|
3575
|
+
/** Internal bridge hook used to mirror an eviction into an AudioWorklet. */
|
|
3576
|
+
onPageCleared?: (pageIndex: number) => void;
|
|
3577
|
+
/** Internal bridge hook called after the local provider is destroyed. */
|
|
3578
|
+
onClose?: () => void;
|
|
3323
3579
|
}
|
|
3324
3580
|
interface OpfsClipPageProviderBinding {
|
|
3325
3581
|
provider: ClipPageProvider;
|
|
3326
3582
|
supplyPage(pageIndex: number): Promise<boolean>;
|
|
3327
3583
|
supplyRequest(request: ClipPageRequest): Promise<boolean>;
|
|
3584
|
+
/** Evict one resident page from every configured consumer. */
|
|
3585
|
+
clearPage?(pageIndex: number): void;
|
|
3328
3586
|
close(): void;
|
|
3329
3587
|
}
|
|
3330
3588
|
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 +3595,16 @@ declare function createOpfsClipPageProvider(engine: RealtimeEngine, options: Opf
|
|
|
3337
3595
|
*/
|
|
3338
3596
|
interface ClipPageStreamerEngine {
|
|
3339
3597
|
/** Drain one pending audio-thread page-miss request, or `null` when empty. */
|
|
3340
|
-
popClipPageRequest():
|
|
3598
|
+
popClipPageRequest(): ClipPageStreamerRequest | null;
|
|
3599
|
+
}
|
|
3600
|
+
/**
|
|
3601
|
+
* A page miss reported by either a direct engine (`sample`) or the worklet
|
|
3602
|
+
* bridge (`pageIndex`). Exactly one position form is required.
|
|
3603
|
+
*/
|
|
3604
|
+
interface ClipPageStreamerRequest {
|
|
3605
|
+
clipId: number;
|
|
3606
|
+
sample?: number;
|
|
3607
|
+
pageIndex?: number;
|
|
3341
3608
|
}
|
|
3342
3609
|
/** A paged clip the streamer keeps fed from its backing store. */
|
|
3343
3610
|
interface ClipPageStreamSource {
|
|
@@ -3415,6 +3682,7 @@ declare class ClipPageStreamer {
|
|
|
3415
3682
|
close(): void;
|
|
3416
3683
|
private serviceFrontier;
|
|
3417
3684
|
private resetState;
|
|
3685
|
+
private clearPage;
|
|
3418
3686
|
}
|
|
3419
3687
|
interface OpfsClipStreamOptions extends OpfsClipPageProviderOptions {
|
|
3420
3688
|
/** Clip schedule id used in `setClips` (matches the page-miss request clipId). */
|
|
@@ -3427,20 +3695,30 @@ interface OpfsClipStreamOptions extends OpfsClipPageProviderOptions {
|
|
|
3427
3695
|
}
|
|
3428
3696
|
interface OpfsClipStream {
|
|
3429
3697
|
binding: OpfsClipPageProviderBinding;
|
|
3430
|
-
/** Pass
|
|
3698
|
+
/** Pass as `addClip`'s buffer argument to schedule the streaming clip. */
|
|
3431
3699
|
provider: ClipPageProvider;
|
|
3432
3700
|
}
|
|
3701
|
+
/** Structural seam implemented by the AudioWorklet-backed `SonareEngine`. */
|
|
3702
|
+
interface WorkletOpfsClipStreamHost {
|
|
3703
|
+
attachOpfsClipStream(options: OpfsClipStreamOptions): Promise<OpfsClipStream>;
|
|
3704
|
+
}
|
|
3433
3705
|
/**
|
|
3434
3706
|
* One-call wiring of an OPFS-backed streaming clip: creates the page provider,
|
|
3435
3707
|
* primes the leading pages, and registers it with `streamer` so later misses are
|
|
3436
3708
|
* serviced within the bounded window. Returns the binding (for `close`) and the
|
|
3437
|
-
* provider to schedule via `
|
|
3709
|
+
* provider to schedule via `addClip(trackId, provider, startPpq, { id: clipId })`.
|
|
3438
3710
|
*
|
|
3439
3711
|
* @param streamer Shared streamer pumped on the control thread.
|
|
3440
3712
|
* @param engine Engine the provider is created on (the same one `streamer` drives).
|
|
3441
3713
|
* @param options Provider options plus `clipId` and optional `primePages`.
|
|
3442
3714
|
*/
|
|
3443
3715
|
declare function attachOpfsClipStream(streamer: ClipPageStreamer, engine: RealtimeEngine, options: OpfsClipStreamOptions): Promise<OpfsClipStream>;
|
|
3716
|
+
/**
|
|
3717
|
+
* Worklet overload: delegates to `SonareEngine.attachOpfsClipStream`, which
|
|
3718
|
+
* creates the remote provider and drives this same sliding-window policy from
|
|
3719
|
+
* worklet page-miss messages.
|
|
3720
|
+
*/
|
|
3721
|
+
declare function attachOpfsClipStream(engine: WorkletOpfsClipStreamHost, options: OpfsClipStreamOptions): Promise<OpfsClipStream>;
|
|
3444
3722
|
|
|
3445
3723
|
/**
|
|
3446
3724
|
* Numeric error codes carried by a {@link SonareError}. Mirrors the C ABI
|
|
@@ -3456,6 +3734,7 @@ declare enum ErrorCode {
|
|
|
3456
3734
|
OutOfMemory = 5,
|
|
3457
3735
|
NotSupported = 6,
|
|
3458
3736
|
InvalidState = 7,
|
|
3737
|
+
Cancelled = 8,
|
|
3459
3738
|
Unknown = 99
|
|
3460
3739
|
}
|
|
3461
3740
|
/**
|
|
@@ -3473,6 +3752,12 @@ declare class SonareError extends Error {
|
|
|
3473
3752
|
/** Type guard: whether a caught value is a libsonare {@link SonareError}. */
|
|
3474
3753
|
declare function isSonareError(value: unknown): value is SonareError;
|
|
3475
3754
|
|
|
3755
|
+
declare function tone(request?: ToneRequest): Float32Array;
|
|
3756
|
+
declare function tone(frequency?: number, sampleRate?: number, duration?: number, phase?: number, amplitude?: number): Float32Array;
|
|
3757
|
+
declare function chirp(request?: ChirpRequest): Float32Array;
|
|
3758
|
+
declare function chirp(fmin?: number, fmax?: number, sampleRate?: number, duration?: number, linear?: boolean): Float32Array;
|
|
3759
|
+
declare function clicks(request: ClicksRequest): Float32Array;
|
|
3760
|
+
declare function clicks(times: Float32Array, sampleRate?: number, length?: number, frequency?: number, clickDuration?: number): Float32Array;
|
|
3476
3761
|
interface DbConversionRequest {
|
|
3477
3762
|
values: Float32Array;
|
|
3478
3763
|
ref?: number;
|
|
@@ -3490,6 +3775,27 @@ interface FrameSignalRequest {
|
|
|
3490
3775
|
frameLength: number;
|
|
3491
3776
|
hopLength: number;
|
|
3492
3777
|
}
|
|
3778
|
+
interface ToneRequest {
|
|
3779
|
+
frequency?: number;
|
|
3780
|
+
sampleRate?: number;
|
|
3781
|
+
duration?: number;
|
|
3782
|
+
phase?: number;
|
|
3783
|
+
amplitude?: number;
|
|
3784
|
+
}
|
|
3785
|
+
interface ChirpRequest {
|
|
3786
|
+
fmin?: number;
|
|
3787
|
+
fmax?: number;
|
|
3788
|
+
sampleRate?: number;
|
|
3789
|
+
duration?: number;
|
|
3790
|
+
linear?: boolean;
|
|
3791
|
+
}
|
|
3792
|
+
interface ClicksRequest {
|
|
3793
|
+
times: Float32Array;
|
|
3794
|
+
sampleRate?: number;
|
|
3795
|
+
length?: number;
|
|
3796
|
+
frequency?: number;
|
|
3797
|
+
clickDuration?: number;
|
|
3798
|
+
}
|
|
3493
3799
|
/** Canonical request form for pre/de-emphasis filters. */
|
|
3494
3800
|
interface EmphasisRequest {
|
|
3495
3801
|
samples: Float32Array;
|
|
@@ -3515,6 +3821,10 @@ interface FixFramesRequest {
|
|
|
3515
3821
|
xMax?: number;
|
|
3516
3822
|
pad?: boolean;
|
|
3517
3823
|
}
|
|
3824
|
+
interface OnsetBacktrackRequest {
|
|
3825
|
+
events: Int32Array;
|
|
3826
|
+
energy: Float32Array;
|
|
3827
|
+
}
|
|
3518
3828
|
/** Canonical request form for peak selection. */
|
|
3519
3829
|
interface PeakPickRequest {
|
|
3520
3830
|
values: Float32Array;
|
|
@@ -3557,6 +3867,8 @@ interface TempogramRequest {
|
|
|
3557
3867
|
hopLength?: number;
|
|
3558
3868
|
winLength?: number;
|
|
3559
3869
|
mode?: TempogramMode;
|
|
3870
|
+
center?: boolean;
|
|
3871
|
+
norm?: boolean;
|
|
3560
3872
|
}
|
|
3561
3873
|
interface CyclicTempogramRequest {
|
|
3562
3874
|
onsetEnvelope: Float32Array;
|
|
@@ -3658,6 +3970,8 @@ declare function fixLength(request: FixLengthRequest): Float32Array;
|
|
|
3658
3970
|
declare function fixLength(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
3659
3971
|
declare function fixFrames(request: FixFramesRequest): Int32Array;
|
|
3660
3972
|
declare function fixFrames(frames: Int32Array, xMin?: number, xMax?: number, pad?: boolean): Int32Array;
|
|
3973
|
+
declare function onsetBacktrack(request: OnsetBacktrackRequest): Int32Array;
|
|
3974
|
+
declare function onsetBacktrack(events: Int32Array, energy: Float32Array): Int32Array;
|
|
3661
3975
|
declare function peakPick(request: PeakPickRequest): Int32Array;
|
|
3662
3976
|
declare function peakPick(values: Float32Array, preMax: number, postMax: number, preAvg: number, postAvg: number, delta: number, wait: number): Int32Array;
|
|
3663
3977
|
declare function vectorNormalize(request: VectorNormalizeRequest): Float32Array;
|
|
@@ -3667,7 +3981,7 @@ declare function pcen(values: Float32Array, nBins: number, nFrames: number, opti
|
|
|
3667
3981
|
declare function tonnetz(request: TonnetzRequest): Float32Array;
|
|
3668
3982
|
declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
|
|
3669
3983
|
declare function tempogram(request: TempogramRequest): WasmTempogramResult;
|
|
3670
|
-
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
|
|
3984
|
+
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode, center?: boolean, norm?: boolean): WasmTempogramResult;
|
|
3671
3985
|
declare function cyclicTempogram(request: CyclicTempogramRequest): WasmCyclicTempogramResult;
|
|
3672
3986
|
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
|
|
3673
3987
|
declare function plp(request: PlpRequest): Float32Array;
|
|
@@ -3704,6 +4018,8 @@ interface FourierTempogramRequest extends GuardedOptions$2 {
|
|
|
3704
4018
|
sampleRate?: number;
|
|
3705
4019
|
hopLength?: number;
|
|
3706
4020
|
winLength?: number;
|
|
4021
|
+
center?: boolean;
|
|
4022
|
+
norm?: boolean;
|
|
3707
4023
|
}
|
|
3708
4024
|
interface TempogramRatioRequest extends GuardedOptions$2 {
|
|
3709
4025
|
tempogramData: Float32Array;
|
|
@@ -3843,7 +4159,7 @@ interface MelodyOptions {
|
|
|
3843
4159
|
*/
|
|
3844
4160
|
usePyin?: boolean;
|
|
3845
4161
|
/**
|
|
3846
|
-
* When {@link usePyin} is `true`,
|
|
4162
|
+
* When {@link usePyin} is `true`, zero-pad by `frameLength / 2` so frame
|
|
3847
4163
|
* `i` is centered at `i * hopLength` (matches `librosa.pyin(center=True)`).
|
|
3848
4164
|
* Ignored by the plain-YIN path. Defaults to `true`.
|
|
3849
4165
|
*/
|
|
@@ -3894,7 +4210,7 @@ declare function onsetStrengthMulti(samples: Float32Array, sampleRate?: number,
|
|
|
3894
4210
|
* @returns Fourier tempogram result
|
|
3895
4211
|
*/
|
|
3896
4212
|
declare function fourierTempogram(request: FourierTempogramRequest): WasmFourierTempogramResult;
|
|
3897
|
-
declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, options?: GuardedOptions$2): WasmFourierTempogramResult;
|
|
4213
|
+
declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, center?: boolean, norm?: boolean, options?: GuardedOptions$2): WasmFourierTempogramResult;
|
|
3898
4214
|
/**
|
|
3899
4215
|
* Compute tempogram ratio features.
|
|
3900
4216
|
*
|
|
@@ -3963,6 +4279,18 @@ interface PitchYinRequest {
|
|
|
3963
4279
|
threshold?: number;
|
|
3964
4280
|
fillNa?: boolean;
|
|
3965
4281
|
}
|
|
4282
|
+
interface PiptrackRequest {
|
|
4283
|
+
samples: Float32Array;
|
|
4284
|
+
sampleRate?: number;
|
|
4285
|
+
nFft?: number;
|
|
4286
|
+
hopLength?: number;
|
|
4287
|
+
fmin?: number;
|
|
4288
|
+
fmax?: number;
|
|
4289
|
+
threshold?: number;
|
|
4290
|
+
}
|
|
4291
|
+
/** Per-bin spectral pitch candidates and peak magnitudes (librosa.piptrack). */
|
|
4292
|
+
declare function piptrack(request: PiptrackRequest): PiptrackResult;
|
|
4293
|
+
declare function piptrack(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number): PiptrackResult;
|
|
3966
4294
|
declare function pitchYin(request: PitchYinRequest): PitchResult;
|
|
3967
4295
|
declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
3968
4296
|
/**
|
|
@@ -3982,6 +4310,22 @@ interface PitchPyinRequest extends PitchYinRequest {
|
|
|
3982
4310
|
}
|
|
3983
4311
|
declare function pitchPyin(request: PitchPyinRequest): PitchResult;
|
|
3984
4312
|
declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
4313
|
+
/** Parameters for segmenting an F0 track into stable monophonic notes. */
|
|
4314
|
+
interface NoteSegmentsRequest {
|
|
4315
|
+
f0Hz: Float32Array;
|
|
4316
|
+
voicedProb: Float32Array;
|
|
4317
|
+
frameRate: number;
|
|
4318
|
+
segmentationThresholdCents?: number;
|
|
4319
|
+
minNoteMs?: number;
|
|
4320
|
+
referenceHz?: number;
|
|
4321
|
+
}
|
|
4322
|
+
/**
|
|
4323
|
+
* Segment a caller-supplied monophonic F0 track into stable note regions.
|
|
4324
|
+
*
|
|
4325
|
+
* `f0Hz` and `voicedProb` must have the same non-zero length. Zero-Hz frames
|
|
4326
|
+
* and probabilities below 0.5 are treated as unvoiced.
|
|
4327
|
+
*/
|
|
4328
|
+
declare function noteSegments(request: NoteSegmentsRequest): NoteSegment[];
|
|
3985
4329
|
|
|
3986
4330
|
/**
|
|
3987
4331
|
* Resample audio to a different sample rate.
|
|
@@ -4058,6 +4402,59 @@ interface NnFilterRequest {
|
|
|
4058
4402
|
k?: number;
|
|
4059
4403
|
width?: number;
|
|
4060
4404
|
}
|
|
4405
|
+
interface SegmentCrossSimilarityRequest {
|
|
4406
|
+
x: Float32Array;
|
|
4407
|
+
xRows: number;
|
|
4408
|
+
xCols: number;
|
|
4409
|
+
y: Float32Array;
|
|
4410
|
+
yRows: number;
|
|
4411
|
+
yCols: number;
|
|
4412
|
+
k?: number;
|
|
4413
|
+
metric?: 'cosine' | 'euclidean';
|
|
4414
|
+
mode?: 'connectivity' | 'affinity';
|
|
4415
|
+
}
|
|
4416
|
+
interface SegmentRecurrenceMatrixRequest {
|
|
4417
|
+
data: Float32Array;
|
|
4418
|
+
rows: number;
|
|
4419
|
+
cols: number;
|
|
4420
|
+
k?: number;
|
|
4421
|
+
width?: number;
|
|
4422
|
+
sym?: boolean;
|
|
4423
|
+
metric?: 'cosine' | 'euclidean';
|
|
4424
|
+
mode?: 'connectivity' | 'affinity';
|
|
4425
|
+
}
|
|
4426
|
+
interface SegmentRecurrenceToLagRequest {
|
|
4427
|
+
recurrence: Float32Array;
|
|
4428
|
+
n: number;
|
|
4429
|
+
pad?: boolean;
|
|
4430
|
+
}
|
|
4431
|
+
interface SegmentLagToRecurrenceRequest {
|
|
4432
|
+
lag: Float32Array;
|
|
4433
|
+
rows: number;
|
|
4434
|
+
lags: number;
|
|
4435
|
+
}
|
|
4436
|
+
interface SegmentSubsegmentRequest {
|
|
4437
|
+
data: Float32Array;
|
|
4438
|
+
rows: number;
|
|
4439
|
+
cols: number;
|
|
4440
|
+
boundaries: Int32Array;
|
|
4441
|
+
nSegments?: number;
|
|
4442
|
+
}
|
|
4443
|
+
interface SegmentAgglomerativeRequest {
|
|
4444
|
+
data: Float32Array;
|
|
4445
|
+
rows: number;
|
|
4446
|
+
cols: number;
|
|
4447
|
+
k: number;
|
|
4448
|
+
linkage?: 'average' | 'single' | 'complete' | 'ward';
|
|
4449
|
+
}
|
|
4450
|
+
interface SegmentPathEnhanceRequest {
|
|
4451
|
+
recurrence: Float32Array;
|
|
4452
|
+
n: number;
|
|
4453
|
+
win: number;
|
|
4454
|
+
maxRatio?: number;
|
|
4455
|
+
minRatio?: number;
|
|
4456
|
+
nFilters?: number;
|
|
4457
|
+
}
|
|
4061
4458
|
interface RemixRequest {
|
|
4062
4459
|
samples: Float32Array;
|
|
4063
4460
|
intervals: Int32Array | ArrayLike<number>;
|
|
@@ -4188,8 +4585,10 @@ declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number
|
|
|
4188
4585
|
* @param hopLength - Hop length (default: 512)
|
|
4189
4586
|
* @returns Spectral bandwidth in Hz for each frame
|
|
4190
4587
|
*/
|
|
4191
|
-
declare function spectralBandwidth(request: SpectralFrameRequest
|
|
4192
|
-
|
|
4588
|
+
declare function spectralBandwidth(request: SpectralFrameRequest & {
|
|
4589
|
+
p?: number;
|
|
4590
|
+
}): Float32Array;
|
|
4591
|
+
declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, p?: number): Float32Array;
|
|
4193
4592
|
/**
|
|
4194
4593
|
* Compute spectral rolloff frequency.
|
|
4195
4594
|
*
|
|
@@ -4213,6 +4612,10 @@ declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFf
|
|
|
4213
4612
|
*/
|
|
4214
4613
|
declare function spectralFlatness(request: SpectralFrameRequest): Float32Array;
|
|
4215
4614
|
declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
4615
|
+
declare function spectralFlux(request: SpectralFrameRequest & {
|
|
4616
|
+
lag?: number;
|
|
4617
|
+
}): Float32Array;
|
|
4618
|
+
declare function spectralFlux(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, lag?: number): Float32Array;
|
|
4216
4619
|
/**
|
|
4217
4620
|
* Compute zero crossing rate.
|
|
4218
4621
|
*
|
|
@@ -4235,6 +4638,20 @@ declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, fr
|
|
|
4235
4638
|
*/
|
|
4236
4639
|
declare function rmsEnergy(request: ZeroCrossingRateRequest): Float32Array;
|
|
4237
4640
|
declare function rmsEnergy(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
4641
|
+
/** Column-wise cross-similarity (librosa.segment.cross_similarity). */
|
|
4642
|
+
declare function segmentCrossSimilarity(request: SegmentCrossSimilarityRequest): SegmentMatrix;
|
|
4643
|
+
/** Self-similarity recurrence matrix (librosa.segment.recurrence_matrix). */
|
|
4644
|
+
declare function segmentRecurrenceMatrix(request: SegmentRecurrenceMatrixRequest): SegmentMatrix;
|
|
4645
|
+
/** Convert an `n × n` recurrence matrix to a lag matrix. */
|
|
4646
|
+
declare function segmentRecurrenceToLag(request: SegmentRecurrenceToLagRequest): SegmentMatrix;
|
|
4647
|
+
/** Convert a lag matrix back to an `n × n` recurrence matrix. */
|
|
4648
|
+
declare function segmentLagToRecurrence(request: SegmentLagToRecurrenceRequest): SegmentMatrix;
|
|
4649
|
+
/** Refine frame boundaries by clustering within each parent segment. */
|
|
4650
|
+
declare function segmentSubsegment(request: SegmentSubsegmentRequest): Int32Array;
|
|
4651
|
+
/** Cluster feature columns and return one label per column. */
|
|
4652
|
+
declare function segmentAgglomerative(request: SegmentAgglomerativeRequest): Int32Array;
|
|
4653
|
+
/** Enhance diagonal paths in an `n × n` recurrence matrix. */
|
|
4654
|
+
declare function segmentPathEnhance(request: SegmentPathEnhanceRequest): SegmentMatrix;
|
|
4238
4655
|
|
|
4239
4656
|
type GuardedOptions$1 = ValidateOptions;
|
|
4240
4657
|
/** Canonical request form for basic frame-based spectrogram features. */
|
|
@@ -4261,6 +4678,16 @@ interface MfccRequest extends MelSpectrogramRequest {
|
|
|
4261
4678
|
nMfcc?: number;
|
|
4262
4679
|
lifter?: number;
|
|
4263
4680
|
}
|
|
4681
|
+
interface MelDeltaRequest extends GuardedOptions$1 {
|
|
4682
|
+
features: Float32Array;
|
|
4683
|
+
nFeatures: number;
|
|
4684
|
+
nFrames: number;
|
|
4685
|
+
width?: number;
|
|
4686
|
+
}
|
|
4687
|
+
interface ReassignedSpectrogramRequest extends SpectrogramRequest {
|
|
4688
|
+
refPower?: number;
|
|
4689
|
+
fillNan?: boolean;
|
|
4690
|
+
}
|
|
4264
4691
|
interface MfccToMelRequest extends GuardedOptions$1 {
|
|
4265
4692
|
mfccCoefficients: Float32Array;
|
|
4266
4693
|
nMfcc: number;
|
|
@@ -4285,6 +4712,16 @@ interface MelToAudioRequest extends MelToStftRequest {
|
|
|
4285
4712
|
hopLength?: number;
|
|
4286
4713
|
nIter?: number;
|
|
4287
4714
|
}
|
|
4715
|
+
interface GriffinLimRequest extends GuardedOptions$1 {
|
|
4716
|
+
magnitude: Float32Array;
|
|
4717
|
+
nBins: number;
|
|
4718
|
+
nFrames: number;
|
|
4719
|
+
sampleRate?: number;
|
|
4720
|
+
nFft?: number;
|
|
4721
|
+
hopLength?: number;
|
|
4722
|
+
nIter?: number;
|
|
4723
|
+
momentum?: number;
|
|
4724
|
+
}
|
|
4288
4725
|
/** Canonical request form for Griffin-Lim reconstruction from MFCCs. */
|
|
4289
4726
|
interface MfccToAudioRequest extends MfccToMelRequest {
|
|
4290
4727
|
sampleRate?: number;
|
|
@@ -4406,6 +4843,12 @@ declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft
|
|
|
4406
4843
|
*/
|
|
4407
4844
|
declare function mfcc(request: MfccRequest): MfccResult;
|
|
4408
4845
|
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;
|
|
4846
|
+
/** First-order regression delta of a row-major feature matrix. */
|
|
4847
|
+
declare function melDelta(request: MelDeltaRequest): Float32Array;
|
|
4848
|
+
declare function melDelta(features: Float32Array, nFeatures: number, nFrames: number, width?: number): Float32Array;
|
|
4849
|
+
/** Auger-Flandrin reassigned spectrogram (row-major [nBins x nFrames] arrays). */
|
|
4850
|
+
declare function reassignedSpectrogram(request: ReassignedSpectrogramRequest): ReassignedSpectrogramResult;
|
|
4851
|
+
declare function reassignedSpectrogram(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, refPower?: number, fillNan?: boolean): ReassignedSpectrogramResult;
|
|
4409
4852
|
/**
|
|
4410
4853
|
* Approximate inverse of a Mel filterbank: Mel power spectrogram -> STFT power
|
|
4411
4854
|
* spectrogram. Mirrors `feature::mel_to_stft`.
|
|
@@ -4440,6 +4883,9 @@ declare function melToStft(melPower: Float32Array, nMels: number, nFrames: numbe
|
|
|
4440
4883
|
*/
|
|
4441
4884
|
declare function melToAudio(request: MelToAudioRequest): Float32Array;
|
|
4442
4885
|
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;
|
|
4886
|
+
/** Reconstruct audio from an STFT magnitude matrix via Griffin-Lim. */
|
|
4887
|
+
declare function griffinLim(request: GriffinLimRequest): Float32Array;
|
|
4888
|
+
declare function griffinLim(magnitude: Float32Array, nBins: number, nFrames: number, sampleRate?: number, nFft?: number, hopLength?: number, nIter?: number, momentum?: number, options?: GuardedOptions$1): Float32Array;
|
|
4443
4889
|
/**
|
|
4444
4890
|
* Invert MFCC coefficients back to a Mel power spectrogram. Mirrors
|
|
4445
4891
|
* `feature::mfcc_to_mel`.
|
|
@@ -4548,7 +4994,8 @@ declare enum SonareEngineTelemetryError {
|
|
|
4548
4994
|
ClipPageUnderrun = 15,
|
|
4549
4995
|
InsertAutomationOverflow = 16,
|
|
4550
4996
|
MidiClockOverflow = 17,
|
|
4551
|
-
MetronomeOverflow = 18
|
|
4997
|
+
MetronomeOverflow = 18,
|
|
4998
|
+
InvalidCommand = 19
|
|
4552
4999
|
}
|
|
4553
5000
|
interface SonareMeterRingBuffer {
|
|
4554
5001
|
sharedBuffer: SharedArrayBuffer;
|
|
@@ -4580,6 +5027,12 @@ interface SonareScopeRingBuffer {
|
|
|
4580
5027
|
bands: number;
|
|
4581
5028
|
maxPoints: number;
|
|
4582
5029
|
}
|
|
5030
|
+
interface SonareExternalMidiRingBuffer {
|
|
5031
|
+
sharedBuffer: SharedArrayBuffer;
|
|
5032
|
+
header: Int32Array;
|
|
5033
|
+
records: Uint32Array;
|
|
5034
|
+
capacity: number;
|
|
5035
|
+
}
|
|
4583
5036
|
interface SonareEngineCommandRecord {
|
|
4584
5037
|
type: SonareEngineCommandType | number;
|
|
4585
5038
|
targetId?: number;
|
|
@@ -4608,6 +5061,12 @@ interface SonareEngineTelemetryRingBuffer {
|
|
|
4608
5061
|
view: DataView;
|
|
4609
5062
|
capacity: number;
|
|
4610
5063
|
}
|
|
5064
|
+
interface SonareClipPageRequestRingBuffer {
|
|
5065
|
+
sharedBuffer: SharedArrayBuffer;
|
|
5066
|
+
header: Int32Array;
|
|
5067
|
+
records: Uint32Array;
|
|
5068
|
+
capacity: number;
|
|
5069
|
+
}
|
|
4611
5070
|
|
|
4612
5071
|
interface SonareRealtimeEngineWorkletProcessorOptions {
|
|
4613
5072
|
wasmBinary?: ArrayBuffer | Uint8Array;
|
|
@@ -4627,6 +5086,16 @@ interface SonareRealtimeEngineWorkletProcessorOptions {
|
|
|
4627
5086
|
scopeBands?: number;
|
|
4628
5087
|
scopeSharedBuffer?: SharedArrayBuffer;
|
|
4629
5088
|
scopeRingCapacity?: number;
|
|
5089
|
+
/**
|
|
5090
|
+
* Lock-free SPSC queue for clip-page cache misses. Supplying this is required
|
|
5091
|
+
* for realtime-safe OPFS streaming: it avoids both embind object creation and
|
|
5092
|
+
* postMessage structured cloning from AudioWorklet process().
|
|
5093
|
+
*/
|
|
5094
|
+
clipPageRequestSharedBuffer?: SharedArrayBuffer;
|
|
5095
|
+
clipPageRequestRingCapacity?: number;
|
|
5096
|
+
/** Lock-free worklet-to-main-thread MIDI-1 output ring. */
|
|
5097
|
+
externalMidiSharedBuffer?: SharedArrayBuffer;
|
|
5098
|
+
externalMidiRingCapacity?: number;
|
|
4630
5099
|
}
|
|
4631
5100
|
interface SonareRealtimeEngineNodeCapabilities {
|
|
4632
5101
|
mode: 'sab' | 'postMessage';
|
|
@@ -4634,6 +5103,10 @@ interface SonareRealtimeEngineNodeCapabilities {
|
|
|
4634
5103
|
sharedArrayBuffer: boolean;
|
|
4635
5104
|
atomics: boolean;
|
|
4636
5105
|
audioWorklet: boolean;
|
|
5106
|
+
/** True only when clip-page misses use the bounded SAB ring. */
|
|
5107
|
+
clipPageRequestsRealtimeSafe: boolean;
|
|
5108
|
+
/** True when external MIDI uses the SAB output ring rather than postMessage. */
|
|
5109
|
+
externalMidiRealtimeSafe: boolean;
|
|
4637
5110
|
engineAbiVersion?: number;
|
|
4638
5111
|
expectedEngineAbiVersion?: number;
|
|
4639
5112
|
abiCompatible?: boolean;
|
|
@@ -4659,6 +5132,12 @@ interface SonareWorkletExternalMidiEvent {
|
|
|
4659
5132
|
/** MIDI 1.0 status + data bytes (1..3 entries). */
|
|
4660
5133
|
bytes: number[];
|
|
4661
5134
|
}
|
|
5135
|
+
/** A control-plane sync message that the worklet rejected without crashing. */
|
|
5136
|
+
interface SonareEngineSyncErrorMessage {
|
|
5137
|
+
type: 'syncError';
|
|
5138
|
+
syncType: SonareEngineSyncMessage['type'];
|
|
5139
|
+
message: string;
|
|
5140
|
+
}
|
|
4662
5141
|
interface SonareEngineSyncClipsMessage {
|
|
4663
5142
|
type: 'syncClips';
|
|
4664
5143
|
clips: EngineClip[];
|
|
@@ -4672,7 +5151,8 @@ interface SonareEngineSyncClipsDeltaMessage {
|
|
|
4672
5151
|
interface SonareEngineSyncClipPageProviderMessage {
|
|
4673
5152
|
type: 'syncClipPageProvider';
|
|
4674
5153
|
clipId: number;
|
|
4675
|
-
clip
|
|
5154
|
+
/** Omitted when an OPFS stream is primed before its clip is scheduled. */
|
|
5155
|
+
clip?: EngineClip;
|
|
4676
5156
|
numChannels: number;
|
|
4677
5157
|
numSamples: number;
|
|
4678
5158
|
pageFrames: number;
|
|
@@ -4684,10 +5164,41 @@ interface SonareEngineSyncClipPageMessage {
|
|
|
4684
5164
|
pageIndex: number;
|
|
4685
5165
|
channels: Float32Array[];
|
|
4686
5166
|
}
|
|
5167
|
+
/** Evicts one page after the main-thread sliding window advances. */
|
|
5168
|
+
interface SonareEngineSyncClipPageClearMessage {
|
|
5169
|
+
type: 'syncClipPageClear';
|
|
5170
|
+
clipId: number;
|
|
5171
|
+
pageIndex: number;
|
|
5172
|
+
}
|
|
5173
|
+
/** Releases a provider whose clip was removed or whose stream was closed. */
|
|
5174
|
+
interface SonareEngineSyncClipPageDestroyMessage {
|
|
5175
|
+
type: 'syncClipPageDestroy';
|
|
5176
|
+
clipId: number;
|
|
5177
|
+
}
|
|
4687
5178
|
/** Makes a fully supplied paged clip visible to the audio engine. */
|
|
4688
5179
|
interface SonareEngineSyncClipPageCommitMessage {
|
|
4689
5180
|
type: 'syncClipPageCommit';
|
|
4690
5181
|
clipId: number;
|
|
5182
|
+
/**
|
|
5183
|
+
* Clip schedule to publish with a provider that was primed before its
|
|
5184
|
+
* schedule was known. The original pre-baked push path supplies it on the
|
|
5185
|
+
* provider message instead.
|
|
5186
|
+
*/
|
|
5187
|
+
clip?: EngineClip;
|
|
5188
|
+
}
|
|
5189
|
+
/**
|
|
5190
|
+
* A bounded batch of page misses emitted by the AudioWorklet. The main thread
|
|
5191
|
+
* resolves these from OPFS and responds with `syncClipPage`; a missing page is
|
|
5192
|
+
* silent until that response arrives.
|
|
5193
|
+
*/
|
|
5194
|
+
interface SonareEngineClipPageRequestMessage {
|
|
5195
|
+
type: 'clipPageRequest';
|
|
5196
|
+
requests: Array<{
|
|
5197
|
+
clipId: number;
|
|
5198
|
+
pageIndex: number;
|
|
5199
|
+
}>;
|
|
5200
|
+
/** Number of misses dropped because a bounded native or SAB request queue was full. */
|
|
5201
|
+
dropped?: number;
|
|
4691
5202
|
}
|
|
4692
5203
|
interface SonareEngineSyncMidiClipsMessage {
|
|
4693
5204
|
type: 'syncMidiClips';
|
|
@@ -4706,6 +5217,11 @@ interface SonareEngineSyncAutomationMessage {
|
|
|
4706
5217
|
paramId: number;
|
|
4707
5218
|
points: EngineAutomationPoint[];
|
|
4708
5219
|
}
|
|
5220
|
+
/** Replaces the live engine's registered custom-parameter set. */
|
|
5221
|
+
interface SonareEngineSyncParametersMessage {
|
|
5222
|
+
type: 'syncParameters';
|
|
5223
|
+
parameters: EngineParameterInfo[];
|
|
5224
|
+
}
|
|
4709
5225
|
interface SonareEngineSyncTempoMessage {
|
|
4710
5226
|
type: 'syncTempo';
|
|
4711
5227
|
bpm: number;
|
|
@@ -4836,6 +5352,7 @@ interface SonareEngineSyncSf2InstrumentMessage {
|
|
|
4836
5352
|
destinationId?: number;
|
|
4837
5353
|
gain?: number;
|
|
4838
5354
|
polyphony?: number;
|
|
5355
|
+
preferModelForModeledFamilies?: boolean;
|
|
4839
5356
|
};
|
|
4840
5357
|
}
|
|
4841
5358
|
interface SonareEngineSyncLoadSoundFontMessage {
|
|
@@ -4866,6 +5383,12 @@ interface SonareEngineSyncMidiCcMessage {
|
|
|
4866
5383
|
value: number;
|
|
4867
5384
|
renderFrame: number;
|
|
4868
5385
|
}
|
|
5386
|
+
interface SonareEngineSyncMidiUmpMessage {
|
|
5387
|
+
type: 'syncMidiUmp';
|
|
5388
|
+
destinationId: number;
|
|
5389
|
+
word0: number;
|
|
5390
|
+
renderFrame: number;
|
|
5391
|
+
}
|
|
4869
5392
|
interface SonareEngineSyncMidiSysexMessage {
|
|
4870
5393
|
type: 'syncMidiSysex';
|
|
4871
5394
|
destinationId: number;
|
|
@@ -4885,7 +5408,31 @@ interface SonareEngineSyncExternalMidiClockMessage {
|
|
|
4885
5408
|
type: 'syncExternalMidiClock';
|
|
4886
5409
|
enabled: boolean;
|
|
4887
5410
|
}
|
|
4888
|
-
|
|
5411
|
+
interface SonareEngineSyncMidiInputSourceMessage {
|
|
5412
|
+
type: 'syncMidiInputSource' | 'syncClearMidiInputSource';
|
|
5413
|
+
destinationId?: number;
|
|
5414
|
+
}
|
|
5415
|
+
interface SonareEngineSyncMidiCcBindingMessage {
|
|
5416
|
+
type: 'syncMidiCcBinding';
|
|
5417
|
+
channel: number;
|
|
5418
|
+
controller: number;
|
|
5419
|
+
paramId: number;
|
|
5420
|
+
minValue: number;
|
|
5421
|
+
maxValue: number;
|
|
5422
|
+
}
|
|
5423
|
+
interface SonareEngineSyncMidiInputEventMessage {
|
|
5424
|
+
type: 'syncMidiInputNoteOn' | 'syncMidiInputNoteOff' | 'syncMidiInputCc';
|
|
5425
|
+
group: number;
|
|
5426
|
+
channel: number;
|
|
5427
|
+
data0: number;
|
|
5428
|
+
data1: number;
|
|
5429
|
+
portTimeSamples: number;
|
|
5430
|
+
}
|
|
5431
|
+
/** Releases the realtime engine and all worklet-owned clip buffers. */
|
|
5432
|
+
interface SonareEngineDestroyMessage {
|
|
5433
|
+
type: 'destroy';
|
|
5434
|
+
}
|
|
5435
|
+
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
5436
|
|
|
4890
5437
|
declare class SonareRealtimeEngineNode {
|
|
4891
5438
|
readonly node: AudioWorkletNode;
|
|
@@ -4894,14 +5441,20 @@ declare class SonareRealtimeEngineNode {
|
|
|
4894
5441
|
readonly telemetryRing?: SonareEngineTelemetryRingBuffer;
|
|
4895
5442
|
readonly meterRing?: SonareMeterRingBuffer;
|
|
4896
5443
|
readonly scopeRing?: SonareScopeRingBuffer;
|
|
5444
|
+
readonly clipPageRequestRing?: SonareClipPageRequestRingBuffer;
|
|
5445
|
+
readonly externalMidiRing?: SonareExternalMidiRingBuffer;
|
|
4897
5446
|
readonly ready: Promise<void>;
|
|
4898
5447
|
private telemetryReadIndex;
|
|
4899
5448
|
private meterReadIndex;
|
|
4900
5449
|
private scopeReadIndex;
|
|
5450
|
+
private clipPageRequestDroppedRead;
|
|
5451
|
+
private ringPollTimer;
|
|
4901
5452
|
private telemetryListeners;
|
|
4902
5453
|
private meterListeners;
|
|
4903
5454
|
private scopeListeners;
|
|
4904
5455
|
private midiOutListeners;
|
|
5456
|
+
private clipPageRequestListeners;
|
|
5457
|
+
private syncErrorListeners;
|
|
4905
5458
|
private captureRequestId;
|
|
4906
5459
|
private readonly captureRequests;
|
|
4907
5460
|
private transportRequestId;
|
|
@@ -4910,6 +5463,8 @@ declare class SonareRealtimeEngineNode {
|
|
|
4910
5463
|
private rejectReady;
|
|
4911
5464
|
private destroyed;
|
|
4912
5465
|
private constructor();
|
|
5466
|
+
/** Subscribes to control-plane sync rejections reported by the worklet. */
|
|
5467
|
+
onSyncError(listener: (message: SonareEngineSyncErrorMessage) => void): () => void;
|
|
4913
5468
|
static create(context: BaseAudioContext, options?: SonareRealtimeEngineNodeOptions): Promise<SonareRealtimeEngineNode>;
|
|
4914
5469
|
play(sampleTime?: number): boolean;
|
|
4915
5470
|
stop(sampleTime?: number): boolean;
|
|
@@ -4923,6 +5478,14 @@ declare class SonareRealtimeEngineNode {
|
|
|
4923
5478
|
pollTelemetry(): SonareEngineTelemetryRecord[];
|
|
4924
5479
|
pollMeters(): SonareWorkletMeterSnapshot[];
|
|
4925
5480
|
pollScope(): SonareWorkletScopeSnapshot[];
|
|
5481
|
+
/** Drain lowered MIDI-1 records from the SAB ring on the main thread. */
|
|
5482
|
+
pollMidiOut(): SonareWorkletExternalMidiEvent[];
|
|
5483
|
+
/**
|
|
5484
|
+
* Drains bounded paged-clip misses from the SAB ring and forwards one batch
|
|
5485
|
+
* to subscribers. In postMessage mode the legacy handler remains available,
|
|
5486
|
+
* but that degraded path is not realtime-safe for OPFS streaming.
|
|
5487
|
+
*/
|
|
5488
|
+
pollClipPageRequests(): SonareEngineClipPageRequestMessage | undefined;
|
|
4926
5489
|
onTelemetry(callback: (telemetry: SonareEngineTelemetryRecord) => void): () => void;
|
|
4927
5490
|
onMeter(callback: (meter: SonareWorkletMeterSnapshot) => void): () => void;
|
|
4928
5491
|
onScope(callback: (scope: SonareWorkletScopeSnapshot) => void): () => void;
|
|
@@ -4932,10 +5495,18 @@ declare class SonareRealtimeEngineNode {
|
|
|
4932
5495
|
* Web MIDI output port. Returns an unsubscribe function.
|
|
4933
5496
|
*/
|
|
4934
5497
|
onMidiOut(callback: (events: SonareWorkletExternalMidiEvent[]) => void): () => void;
|
|
5498
|
+
/**
|
|
5499
|
+
* Subscribe to bounded batches of paged-clip misses from the worklet. The
|
|
5500
|
+
* callback runs on the main thread and may initiate asynchronous OPFS I/O.
|
|
5501
|
+
*/
|
|
5502
|
+
onClipPageRequests(callback: (message: SonareEngineClipPageRequestMessage) => void): () => void;
|
|
4935
5503
|
destroy(): void;
|
|
4936
5504
|
private emitTelemetry;
|
|
5505
|
+
private startRingPolling;
|
|
5506
|
+
private stopRingPollingIfUnused;
|
|
4937
5507
|
private emitMeter;
|
|
4938
5508
|
private emitMidiOut;
|
|
5509
|
+
private emitClipPageRequests;
|
|
4939
5510
|
private emitScope;
|
|
4940
5511
|
private sendCaptureRequest;
|
|
4941
5512
|
private sendTransportRequest;
|
|
@@ -5213,12 +5784,29 @@ interface SamplesRequest extends GuardedOptions {
|
|
|
5213
5784
|
samples: Float32Array;
|
|
5214
5785
|
sampleRate?: number;
|
|
5215
5786
|
}
|
|
5787
|
+
/** Peak-picking configuration for {@link detectOnsets}. */
|
|
5788
|
+
interface OnsetDetectOptions {
|
|
5789
|
+
nFft?: number;
|
|
5790
|
+
hopLength?: number;
|
|
5791
|
+
threshold?: number;
|
|
5792
|
+
preMax?: number;
|
|
5793
|
+
postMax?: number;
|
|
5794
|
+
preAvg?: number;
|
|
5795
|
+
postAvg?: number;
|
|
5796
|
+
delta?: number;
|
|
5797
|
+
wait?: number;
|
|
5798
|
+
backtrack?: boolean;
|
|
5799
|
+
backtrackRange?: number;
|
|
5800
|
+
}
|
|
5801
|
+
interface DetectOnsetsRequest extends SamplesRequest, OnsetDetectOptions {
|
|
5802
|
+
}
|
|
5216
5803
|
/** Canonical request form for key detection functions. */
|
|
5217
5804
|
interface DetectKeyRequest extends KeyDetectionOptions, SamplesRequest {
|
|
5218
5805
|
}
|
|
5219
5806
|
/** Canonical request form for analysis with synchronous progress reporting. */
|
|
5220
5807
|
interface AnalyzeWithProgressRequest extends SamplesRequest {
|
|
5221
|
-
onProgress
|
|
5808
|
+
onProgress?: ProgressCallback;
|
|
5809
|
+
cancel?: () => boolean;
|
|
5222
5810
|
}
|
|
5223
5811
|
/** Canonical request form for chord detection. */
|
|
5224
5812
|
interface DetectChordsRequest extends ChordDetectionOptions, SamplesRequest {
|
|
@@ -5280,8 +5868,8 @@ declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number,
|
|
|
5280
5868
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
5281
5869
|
* @returns Array of onset times in seconds
|
|
5282
5870
|
*/
|
|
5283
|
-
declare function detectOnsets(request:
|
|
5284
|
-
declare function detectOnsets(samples: Float32Array, sampleRate?: number, options?: GuardedOptions): Float32Array;
|
|
5871
|
+
declare function detectOnsets(request: DetectOnsetsRequest): Float32Array;
|
|
5872
|
+
declare function detectOnsets(samples: Float32Array, sampleRate?: number, options?: OnsetDetectOptions & GuardedOptions): Float32Array;
|
|
5285
5873
|
/**
|
|
5286
5874
|
* Detect beat times from audio samples.
|
|
5287
5875
|
*
|
|
@@ -6111,12 +6699,28 @@ interface RealtimeVoiceChangerPlanarBuffer {
|
|
|
6111
6699
|
}
|
|
6112
6700
|
declare class RealtimeVoiceChanger {
|
|
6113
6701
|
private changer;
|
|
6114
|
-
|
|
6702
|
+
/**
|
|
6703
|
+
* Creates a voice changer. Supplying `sampleRate` prepares it immediately,
|
|
6704
|
+
* matching the Node and Python constructors; omitting it preserves the
|
|
6705
|
+
* explicit {@link prepare} lifecycle for callers that configure later.
|
|
6706
|
+
*/
|
|
6707
|
+
constructor(config?: RealtimeVoiceChangerConfigInput | RealtimeVoiceChangerPodConfig, sampleRate?: number, maxBlockSize?: number, channels?: number);
|
|
6115
6708
|
prepare(sampleRate: number, maxBlockSize?: number, channels?: number): void;
|
|
6116
6709
|
reset(): void;
|
|
6117
6710
|
setConfig(config: RealtimeVoiceChangerConfigInput | RealtimeVoiceChangerPodConfig): void;
|
|
6711
|
+
/**
|
|
6712
|
+
* Apply a flat, pre-normalized config without JSON serialization. Intended
|
|
6713
|
+
* for AudioWorklet control messages whose sender prepared the POD on the
|
|
6714
|
+
* main thread.
|
|
6715
|
+
*/
|
|
6716
|
+
setPodConfig(config: RealtimeVoiceChangerPodConfig): void;
|
|
6118
6717
|
configJson(): string;
|
|
6119
6718
|
latencySamples(): number;
|
|
6719
|
+
/**
|
|
6720
|
+
* Monotonically increases whenever {@link prepare} can replace the native
|
|
6721
|
+
* scratch buffers. Cached WASM heap views must be reacquired after it changes.
|
|
6722
|
+
*/
|
|
6723
|
+
bufferGeneration(): number;
|
|
6120
6724
|
processMono(samples: Float32Array): Float32Array;
|
|
6121
6725
|
processMonoInto(samples: Float32Array, output: Float32Array): void;
|
|
6122
6726
|
processInterleaved(samples: Float32Array, channels: number): Float32Array;
|
|
@@ -6232,6 +6836,18 @@ declare class StreamingMasteringChain {
|
|
|
6232
6836
|
left: Float32Array;
|
|
6233
6837
|
right: Float32Array;
|
|
6234
6838
|
};
|
|
6839
|
+
/**
|
|
6840
|
+
* Emit delayed audio and finite processor tails after the final mono block.
|
|
6841
|
+
* Call until this returns an empty array. The initial `latencySamples()`
|
|
6842
|
+
* samples of the concatenated stream are delayed and should be discarded for
|
|
6843
|
+
* time-aligned output.
|
|
6844
|
+
*/
|
|
6845
|
+
flushMono(): Float32Array;
|
|
6846
|
+
/** Stereo counterpart of {@link flushMono}. */
|
|
6847
|
+
flushStereo(): {
|
|
6848
|
+
left: Float32Array;
|
|
6849
|
+
right: Float32Array;
|
|
6850
|
+
};
|
|
6235
6851
|
/** Reset all processor state without rebuilding. */
|
|
6236
6852
|
reset(): void;
|
|
6237
6853
|
/** Total reported latency in samples across all active processors. */
|
|
@@ -6357,6 +6973,14 @@ declare class StreamingRetune {
|
|
|
6357
6973
|
delete(): void;
|
|
6358
6974
|
}
|
|
6359
6975
|
|
|
6976
|
+
interface WebMidiEngine {
|
|
6977
|
+
bindMidiCc(channel: number, controller: number, paramId: number, options?: MidiCcBindOptions): void;
|
|
6978
|
+
setMidiInputSource(destinationId?: number): void;
|
|
6979
|
+
clearMidiInputSource(): void;
|
|
6980
|
+
pushMidiInputNoteOn(group: number, channel: number, note: number, velocity: number, time?: number): void;
|
|
6981
|
+
pushMidiInputNoteOff(group: number, channel: number, note: number, velocity?: number, time?: number): void;
|
|
6982
|
+
pushMidiInputCc(group: number, channel: number, controller: number, value: number, time?: number): void;
|
|
6983
|
+
}
|
|
6360
6984
|
type MidiInputState = 'connected' | 'disconnected';
|
|
6361
6985
|
interface MidiPortLike {
|
|
6362
6986
|
id: string;
|
|
@@ -6422,7 +7046,99 @@ interface WebMidiBinding {
|
|
|
6422
7046
|
close(): void;
|
|
6423
7047
|
}
|
|
6424
7048
|
declare function isWebMidiAvailable(): boolean;
|
|
6425
|
-
declare function bindWebMidi(engine:
|
|
7049
|
+
declare function bindWebMidi(engine: WebMidiEngine, options?: BindWebMidiOptions): Promise<WebMidiBinding>;
|
|
7050
|
+
|
|
7051
|
+
type WorkerRequest<T> = Omit<T, 'onProgress'>;
|
|
7052
|
+
/** Progress relayed from the Worker at the core's native progress boundaries. */
|
|
7053
|
+
interface OfflineWorkerProgress {
|
|
7054
|
+
progress: number;
|
|
7055
|
+
stage: string;
|
|
7056
|
+
}
|
|
7057
|
+
/** Per-call behaviour for a one-shot operation. */
|
|
7058
|
+
interface OfflineWorkerCallOptions {
|
|
7059
|
+
/**
|
|
7060
|
+
* Preserve the caller's input arrays by copying them before dispatch.
|
|
7061
|
+
*
|
|
7062
|
+
* The default is `false`: `Float32Array` buffers are transferred to the
|
|
7063
|
+
* Worker and become detached on the calling thread, avoiding a second copy.
|
|
7064
|
+
*/
|
|
7065
|
+
copy?: boolean;
|
|
7066
|
+
/** Receives native progress boundaries for analysis and mastering calls. */
|
|
7067
|
+
onProgress?: (update: OfflineWorkerProgress) => void;
|
|
7068
|
+
}
|
|
7069
|
+
/** Options used to create an {@link OfflineWorkerClient}. */
|
|
7070
|
+
interface OfflineWorkerClientOptions {
|
|
7071
|
+
/** Reuse a Worker owned by the host instead of creating one. */
|
|
7072
|
+
worker?: OfflineWorker;
|
|
7073
|
+
/** URL of the Worker entry; defaults to the adjacent published `worker.js`. */
|
|
7074
|
+
workerUrl?: string | URL;
|
|
7075
|
+
/** Test/host hook for creating a dedicated Worker. */
|
|
7076
|
+
workerFactory?: (url: URL) => OfflineWorker;
|
|
7077
|
+
/** Terminate a supplied Worker when {@link OfflineWorkerClient.dispose} runs. */
|
|
7078
|
+
terminateWorkerOnDispose?: boolean;
|
|
7079
|
+
}
|
|
7080
|
+
/** Browser Worker or Node `worker_threads.Worker` used by the client. */
|
|
7081
|
+
interface OfflineWorker {
|
|
7082
|
+
postMessage(message: unknown, transfer?: Transferable[]): void;
|
|
7083
|
+
terminate(): unknown;
|
|
7084
|
+
addEventListener?(type: string, listener: EventListener): void;
|
|
7085
|
+
removeEventListener?(type: string, listener: EventListener): void;
|
|
7086
|
+
on?(type: 'message' | 'error', listener: (...args: unknown[]) => void): unknown;
|
|
7087
|
+
off?(type: 'message' | 'error', listener: (...args: unknown[]) => void): unknown;
|
|
7088
|
+
}
|
|
7089
|
+
/**
|
|
7090
|
+
* A cancellable promise returned by an {@link OfflineWorkerClient} call.
|
|
7091
|
+
*
|
|
7092
|
+
* It is Promise-like, so `await client.analyze(...)` works. Call `cancel()` to
|
|
7093
|
+
* request cancellation at the next native progress boundary. In browsers this
|
|
7094
|
+
* uses a `SharedArrayBuffer` flag, which requires cross-origin isolation for
|
|
7095
|
+
* prompt cancellation while synchronous WASM is running. The worker forwards
|
|
7096
|
+
* that flag through the same native cancellation callback used by synchronous
|
|
7097
|
+
* one-shot requests.
|
|
7098
|
+
*/
|
|
7099
|
+
declare class OfflineWorkerTask<T> implements PromiseLike<T> {
|
|
7100
|
+
readonly result: Promise<T>;
|
|
7101
|
+
private readonly cancelRequest;
|
|
7102
|
+
constructor(result: Promise<T>, cancelRequest: () => void);
|
|
7103
|
+
cancel(): void;
|
|
7104
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
7105
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
7106
|
+
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
7107
|
+
}
|
|
7108
|
+
/**
|
|
7109
|
+
* Owns a dedicated Worker for value-based offline analysis and mastering.
|
|
7110
|
+
*
|
|
7111
|
+
* `Project`, `Mixer`, and realtime APIs are intentionally absent: their native
|
|
7112
|
+
* handles are local to one JavaScript realm and cannot be transferred safely.
|
|
7113
|
+
*/
|
|
7114
|
+
declare class OfflineWorkerClient {
|
|
7115
|
+
private readonly worker;
|
|
7116
|
+
private readonly ownsWorker;
|
|
7117
|
+
private readonly pending;
|
|
7118
|
+
private nextId;
|
|
7119
|
+
private closed;
|
|
7120
|
+
private usesEventTarget;
|
|
7121
|
+
constructor(options?: OfflineWorkerClientOptions);
|
|
7122
|
+
/** Dispatch full music analysis to the Worker. */
|
|
7123
|
+
analyze(request: WorkerRequest<MusicAnalyzeRequest>, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof analyze>>;
|
|
7124
|
+
/** Dispatch BPM detection to the Worker. */
|
|
7125
|
+
detectBpm(request: SamplesRequest, options?: OfflineWorkerCallOptions): OfflineWorkerTask<number>;
|
|
7126
|
+
/** Dispatch key detection to the Worker. */
|
|
7127
|
+
detectKey(request: DetectKeyRequest, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof detectKey>>;
|
|
7128
|
+
/** Dispatch chord detection to the Worker. */
|
|
7129
|
+
detectChords(request: DetectChordsRequest, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof detectChords>>;
|
|
7130
|
+
/** Dispatch mono preset mastering to the Worker. */
|
|
7131
|
+
masterAudio(request: WorkerRequest<MasterAudioRequest>, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof masterAudio>>;
|
|
7132
|
+
/** Dispatch stereo preset mastering to the Worker. */
|
|
7133
|
+
masterAudioStereo(request: WorkerRequest<MasterAudioStereoRequest>, options?: OfflineWorkerCallOptions): OfflineWorkerTask<ReturnType<typeof masterAudioStereo>>;
|
|
7134
|
+
/** Stop accepting calls, reject outstanding work, and release the Worker if owned. */
|
|
7135
|
+
dispose(): void;
|
|
7136
|
+
private call;
|
|
7137
|
+
private readonly onMessage;
|
|
7138
|
+
private readonly onError;
|
|
7139
|
+
private readonly onNodeMessage;
|
|
7140
|
+
private readonly onNodeError;
|
|
7141
|
+
}
|
|
6426
7142
|
|
|
6427
7143
|
/**
|
|
6428
7144
|
* sonare - Audio Analysis Library
|
|
@@ -6473,6 +7189,14 @@ declare function isInitialized(): boolean;
|
|
|
6473
7189
|
* Get the library version.
|
|
6474
7190
|
*/
|
|
6475
7191
|
declare function version(): string;
|
|
7192
|
+
/**
|
|
7193
|
+
* Return the capabilities of the loaded WASM build.
|
|
7194
|
+
*
|
|
7195
|
+
* This is synchronous and only describes the already-initialized module.
|
|
7196
|
+
*/
|
|
7197
|
+
declare function capabilities(): SonareCapabilities;
|
|
7198
|
+
/** Return the initialized module's processors, parameters, and presets. */
|
|
7199
|
+
declare function capabilityCatalog(): CapabilityCatalog;
|
|
6476
7200
|
/**
|
|
6477
7201
|
* Aggregate native ABI version: the per-subsystem ABI macros folded into one
|
|
6478
7202
|
* 32-bit value. It bumps whenever any flat C POD layout changes, so callers can
|
|
@@ -6483,14 +7207,14 @@ declare function engineAbiVersion(): number;
|
|
|
6483
7207
|
declare function voiceChangerAbiVersion(): number;
|
|
6484
7208
|
/**
|
|
6485
7209
|
* Map a voice-character preset ordinal (or canonical id) to its canonical id
|
|
6486
|
-
* string (e.g. `'bright-idol'`).
|
|
7210
|
+
* string (e.g. `'bright-idol'`). Invalid ordinals throw.
|
|
6487
7211
|
*/
|
|
6488
|
-
declare function voiceCharacterPresetId(preset: VoicePresetId | number): string
|
|
7212
|
+
declare function voiceCharacterPresetId(preset: VoicePresetId | number): string;
|
|
6489
7213
|
/**
|
|
6490
7214
|
* Return the canonical (normalized) flat POD config for a built-in voice
|
|
6491
7215
|
* preset, skipping the JSON round-trip. Accepts a canonical preset id or its
|
|
6492
|
-
* integer ordinal.
|
|
7216
|
+
* integer ordinal. Invalid ordinals throw.
|
|
6493
7217
|
*/
|
|
6494
|
-
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig
|
|
7218
|
+
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig;
|
|
6495
7219
|
|
|
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 };
|
|
7220
|
+
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, 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 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 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, type PadCenterRequest, type PairAnalysis, type PairProcessor, type PanLaw, 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 ProjectAutomationCurve, type ProjectAutomationLaneDesc, type ProjectAutomationPoint, 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 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 };
|