@libraz/libsonare 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/worklet.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProgressCallback, WasmNnlsChromaResult, WasmFourierTempogramResult, WasmCyclicTempogramResult, WasmFrameResult, WasmTempogramResult, WasmTrimResult, WasmDecomposeResult, WasmHpssWithResidualResult, WasmLufsResult, WasmMatrix2dResult, WasmEngineAutomationPoint, WasmEngineBounceOptions, WasmEngineBounceResult, WasmEngineCaptureStatus, WasmEngineClip, WasmEngineFreezeOptions, WasmEngineFreezeResult, WasmEngineGraphSpec, WasmEngineMarker, WasmEngineMeterTelemetry, WasmEngineMetronomeConfig, WasmEngineParameterInfo, WasmEngineTelemetry, WasmEngineTransportState, WasmClipPageRequest, WasmEngineProcessWithMonitorResult } from './sonare.js';
1
+ import { ProgressCallback, WasmNnlsChromaResult, WasmFourierTempogramResult, WasmCyclicTempogramResult, WasmFrameResult, WasmTempogramResult, WasmTrimResult, WasmDecomposeResult, WasmHpssWithResidualResult, WasmLufsResult, WasmMatrix2dResult, WasmEngineAutomationPoint, WasmEngineBounceOptions, WasmEngineBounceResult, WasmEngineCaptureStatus, WasmEngineClip, WasmEngineFreezeOptions, WasmEngineFreezeResult, WasmEngineGraphSpec, WasmEngineMarker, WasmEngineMeterTelemetry, WasmEngineMetronomeConfig, WasmEngineParameterInfo, WasmEngineTelemetry, WasmEngineTempoSegment, WasmEngineTimeSignatureSegment, WasmEngineTransportState, WasmClipPageRequest, WasmEngineProcessWithMonitorResult, SonareModule } from './sonare.js';
2
2
 
3
3
  /**
4
4
  * Per-call validation options accepted by guarded wrappers. Empty-buffer
@@ -2171,6 +2171,9 @@ interface SonareRealtimeEngineWorkletProcessorOptions {
2171
2171
  runtimeTarget?: 'embind' | 'sonare-rt';
2172
2172
  rtModuleUrl?: string;
2173
2173
  rtWasmBinary?: ArrayBuffer | Uint8Array;
2174
+ wasmBinary?: ArrayBuffer | Uint8Array;
2175
+ initialSyncMessages?: SonareEngineSyncMessage[];
2176
+ initialCommands?: SonareEngineCommandRecord[];
2174
2177
  sampleRate?: number;
2175
2178
  blockSize?: number;
2176
2179
  channelCount?: number;
@@ -2209,6 +2212,7 @@ interface SonareRealtimeEngineNodeCapabilities {
2209
2212
  expectedEngineAbiVersion?: number;
2210
2213
  abiCompatible?: boolean;
2211
2214
  degradedReason?: string;
2215
+ readyMessage?: boolean;
2212
2216
  }
2213
2217
  interface SonareRealtimeEngineNodeOptions extends SonareRealtimeEngineWorkletProcessorOptions {
2214
2218
  processorName?: string;
@@ -2242,6 +2246,7 @@ interface SonareEngineTransportFacade {
2242
2246
  seekPpq(ppq: number, sampleTime?: number): boolean;
2243
2247
  seekSeconds(seconds: number, sampleTime?: number): boolean;
2244
2248
  setTempo(bpm: number): void;
2249
+ setTempoSegments(segments: readonly EngineTempoSegment[]): void;
2245
2250
  setLoop(startPpq: number, endPpq: number, enabled?: boolean): boolean;
2246
2251
  }
2247
2252
  type WorkletInput = readonly (readonly Float32Array[])[];
@@ -2265,12 +2270,19 @@ interface SonareWorkletDestroyMessage {
2265
2270
  type SonareWorkletMessage = SonareWorkletScheduleInsertAutomationMessage | SonareWorkletSetMeterIntervalMessage | SonareWorkletDestroyMessage;
2266
2271
  interface SonareWorkletMeterSnapshot {
2267
2272
  type: 'meter';
2273
+ targetId: number;
2268
2274
  frame: number;
2269
2275
  peakDbL: number;
2270
2276
  peakDbR: number;
2271
2277
  rmsDbL: number;
2272
2278
  rmsDbR: number;
2273
2279
  correlation: number;
2280
+ truePeakDbL: number;
2281
+ truePeakDbR: number;
2282
+ momentaryLufs: number;
2283
+ shortTermLufs: number;
2284
+ integratedLufs: number;
2285
+ gainReductionDb: number;
2274
2286
  }
2275
2287
  interface SonareWorkletSpectrumSnapshot {
2276
2288
  type: 'spectrum';
@@ -2279,7 +2291,7 @@ interface SonareWorkletSpectrumSnapshot {
2279
2291
  }
2280
2292
  type SonareWorkletTransportMessage = SonareWorkletMeterSnapshot | SonareWorkletSpectrumSnapshot | SonareEngineTelemetryRecord;
2281
2293
  declare const SONARE_METER_RING_HEADER_INTS = 4;
2282
- declare const SONARE_METER_RING_RECORD_FLOATS = 7;
2294
+ declare const SONARE_METER_RING_RECORD_FLOATS = 14;
2283
2295
  declare const SONARE_SPECTRUM_RING_HEADER_INTS = 5;
2284
2296
  /** Low 24 bits of a frame index (exact in Float32). */
2285
2297
  declare function encodeFrameLo(frame: number): number;
@@ -2331,7 +2343,7 @@ declare enum SonareEngineTelemetryError {
2331
2343
  SmoothedParameterCapacity = 13
2332
2344
  }
2333
2345
  interface WorkletTransport {
2334
- postMessage?: (message: SonareWorkletTransportMessage) => void;
2346
+ postMessage?: (message: SonareWorkletTransportMessage | SonareEngineCaptureResponseMessage | SonareEngineTransportResponseMessage, transfer?: Transferable[]) => void;
2335
2347
  onMeter?: (meter: SonareWorkletMeterSnapshot) => void;
2336
2348
  onSpectrum?: (spectrum: SonareWorkletSpectrumSnapshot) => void;
2337
2349
  }
@@ -2367,6 +2379,15 @@ interface SonareEngineSyncClipsMessage {
2367
2379
  type: 'syncClips';
2368
2380
  clips: EngineClip[];
2369
2381
  }
2382
+ interface SonareEngineSyncClipsDeltaMessage {
2383
+ type: 'syncClipsDelta';
2384
+ upserts: EngineClip[];
2385
+ removeIds: number[];
2386
+ }
2387
+ interface SonareEngineSyncMidiClipsMessage {
2388
+ type: 'syncMidiClips';
2389
+ clips: EngineMidiClipSchedule[];
2390
+ }
2370
2391
  interface SonareEngineSyncMarkersMessage {
2371
2392
  type: 'syncMarkers';
2372
2393
  markers: EngineMarker[];
@@ -2380,7 +2401,113 @@ interface SonareEngineSyncAutomationMessage {
2380
2401
  paramId: number;
2381
2402
  points: EngineAutomationPoint[];
2382
2403
  }
2383
- type SonareEngineSyncMessage = SonareEngineSyncClipsMessage | SonareEngineSyncMarkersMessage | SonareEngineSyncMetronomeMessage | SonareEngineSyncAutomationMessage;
2404
+ interface SonareEngineSyncTempoMessage {
2405
+ type: 'syncTempo';
2406
+ bpm: number;
2407
+ timeSignature: {
2408
+ numerator: number;
2409
+ denominator: number;
2410
+ };
2411
+ tempoSegments?: EngineTempoSegment[];
2412
+ timeSignatureSegments?: EngineTimeSignatureSegment[];
2413
+ }
2414
+ interface SonareEngineSyncMixerMessage {
2415
+ type: 'syncMixer';
2416
+ lanes: EngineTrackLane[];
2417
+ buses?: EngineBus[];
2418
+ trackStrips?: Array<{
2419
+ trackId: number;
2420
+ sceneJson: string;
2421
+ }>;
2422
+ busStrips?: Array<{
2423
+ busId: number;
2424
+ sceneJson: string;
2425
+ }>;
2426
+ masterStripJson?: string;
2427
+ }
2428
+ interface SonareEngineSyncCaptureMessage {
2429
+ type: 'syncCapture';
2430
+ bufferFrames: number;
2431
+ channels: number;
2432
+ source: EngineCaptureStatus['source'];
2433
+ recordOffsetSamples: number;
2434
+ inputMonitor: {
2435
+ enabled: boolean;
2436
+ gain: number;
2437
+ };
2438
+ }
2439
+ interface SonareEngineSyncTrackStripEqBandMessage {
2440
+ type: 'syncTrackStripEqBand';
2441
+ trackId: number;
2442
+ bandIndex: number;
2443
+ bandJson: string;
2444
+ }
2445
+ interface SonareEngineSyncMasterStripEqBandMessage {
2446
+ type: 'syncMasterStripEqBand';
2447
+ bandIndex: number;
2448
+ bandJson: string;
2449
+ }
2450
+ interface SonareEngineSyncTrackStripInsertBypassedMessage {
2451
+ type: 'syncTrackStripInsertBypassed';
2452
+ trackId: number;
2453
+ insertIndex: number;
2454
+ bypassed: boolean;
2455
+ resetOnBypass: boolean;
2456
+ }
2457
+ interface SonareEngineSyncMasterStripInsertBypassedMessage {
2458
+ type: 'syncMasterStripInsertBypassed';
2459
+ insertIndex: number;
2460
+ bypassed: boolean;
2461
+ resetOnBypass: boolean;
2462
+ }
2463
+ interface SonareEngineSyncBuiltinInstrumentMessage {
2464
+ type: 'syncBuiltinInstrument';
2465
+ destinationId: number;
2466
+ config: {
2467
+ destinationId?: number;
2468
+ } & Record<string, unknown>;
2469
+ }
2470
+ interface SonareEngineSyncSynthInstrumentMessage {
2471
+ type: 'syncSynthInstrument';
2472
+ destinationId: number;
2473
+ patch: Record<string, unknown> | string;
2474
+ }
2475
+ interface SonareEngineSyncSf2InstrumentMessage {
2476
+ type: 'syncSf2Instrument';
2477
+ destinationId: number;
2478
+ config: {
2479
+ destinationId?: number;
2480
+ gain?: number;
2481
+ polyphony?: number;
2482
+ };
2483
+ }
2484
+ interface SonareEngineSyncLoadSoundFontMessage {
2485
+ type: 'syncLoadSoundFont';
2486
+ data: Uint8Array;
2487
+ }
2488
+ interface SonareEngineSyncMidiNoteMessage {
2489
+ type: 'syncMidiNoteOn' | 'syncMidiNoteOff';
2490
+ destinationId: number;
2491
+ group: number;
2492
+ channel: number;
2493
+ note: number;
2494
+ velocity: number;
2495
+ renderFrame: number;
2496
+ }
2497
+ interface SonareEngineSyncMidiCcMessage {
2498
+ type: 'syncMidiCc';
2499
+ destinationId: number;
2500
+ group: number;
2501
+ channel: number;
2502
+ controller: number;
2503
+ value: number;
2504
+ renderFrame: number;
2505
+ }
2506
+ interface SonareEngineSyncMidiPanicMessage {
2507
+ type: 'syncMidiPanic';
2508
+ renderFrame: number;
2509
+ }
2510
+ type SonareEngineSyncMessage = SonareEngineSyncClipsMessage | SonareEngineSyncClipsDeltaMessage | SonareEngineSyncMidiClipsMessage | SonareEngineSyncMarkersMessage | SonareEngineSyncMetronomeMessage | SonareEngineSyncAutomationMessage | SonareEngineSyncTempoMessage | SonareEngineSyncMixerMessage | SonareEngineSyncCaptureMessage | SonareEngineSyncTrackStripEqBandMessage | SonareEngineSyncMasterStripEqBandMessage | SonareEngineSyncTrackStripInsertBypassedMessage | SonareEngineSyncMasterStripInsertBypassedMessage | SonareEngineSyncBuiltinInstrumentMessage | SonareEngineSyncSynthInstrumentMessage | SonareEngineSyncSf2InstrumentMessage | SonareEngineSyncLoadSoundFontMessage | SonareEngineSyncMidiNoteMessage | SonareEngineSyncMidiCcMessage | SonareEngineSyncMidiPanicMessage;
2384
2511
  interface SonareEngineTelemetryRecord {
2385
2512
  type: SonareEngineTelemetryType | number;
2386
2513
  error: SonareEngineTelemetryError | number;
@@ -2406,6 +2533,41 @@ interface SonareEngineTelemetryRingReadResult {
2406
2533
  nextReadIndex: number;
2407
2534
  telemetry: SonareEngineTelemetryRecord[];
2408
2535
  }
2536
+ interface WorkletPort {
2537
+ postMessage?: (message: unknown, transfer?: Transferable[]) => void;
2538
+ onmessage?: (event: {
2539
+ data: unknown;
2540
+ }) => void;
2541
+ addEventListener?: (type: 'message', listener: (event: {
2542
+ data: unknown;
2543
+ }) => void) => void;
2544
+ start?: () => void;
2545
+ }
2546
+ interface SonareEngineCaptureRequestMessage {
2547
+ type: 'captureRequest';
2548
+ requestId: number;
2549
+ op: 'status' | 'read' | 'reset';
2550
+ }
2551
+ interface SonareEngineCaptureResponseMessage {
2552
+ type: 'captureResponse';
2553
+ requestId: number;
2554
+ ok: boolean;
2555
+ status?: EngineCaptureStatus;
2556
+ channels?: Float32Array[] | number[][];
2557
+ error?: string;
2558
+ }
2559
+ interface SonareEngineTransportRequestMessage {
2560
+ type: 'transportRequest';
2561
+ requestId: number;
2562
+ op: 'state';
2563
+ }
2564
+ interface SonareEngineTransportResponseMessage {
2565
+ type: 'transportResponse';
2566
+ requestId: number;
2567
+ ok: boolean;
2568
+ state?: EngineTransportState;
2569
+ error?: string;
2570
+ }
2409
2571
  declare function sonareMeterRingBufferByteLength(capacity: number): number;
2410
2572
  declare function createSonareMeterRingBuffer(capacity?: number): SonareMeterRingBuffer;
2411
2573
  declare function readSonareMeterRingBuffer(ring: SonareMeterRingBuffer, readIndex?: number): SonareMeterRingReadResult;
@@ -2476,11 +2638,14 @@ declare class SonareRealtimeEngineWorkletProcessor {
2476
2638
  private lastMeterFrame;
2477
2639
  private metronomeConfig;
2478
2640
  private channelBuffers;
2641
+ private readonly liveClips;
2479
2642
  constructor(options?: SonareRealtimeEngineWorkletProcessorOptions, transport?: WorkletTransport);
2480
2643
  process(inputs: WorkletInput, outputs: WorkletOutput): boolean;
2481
2644
  private reacquireChannelBuffers;
2482
2645
  receiveCommand(command: SonareEngineCommandRecord): void;
2483
2646
  receiveSync(message: SonareEngineSyncMessage): void;
2647
+ receiveCaptureRequest(message: SonareEngineCaptureRequestMessage): void;
2648
+ receiveTransportRequest(message: SonareEngineTransportRequestMessage): void;
2484
2649
  destroy(): void;
2485
2650
  private drainCommands;
2486
2651
  private applyCommand;
@@ -2510,6 +2675,8 @@ declare class SonareRtRealtimeEngineRuntime {
2510
2675
  process(inputs: WorkletInput, outputs: WorkletOutput): boolean;
2511
2676
  receiveCommand(command: SonareEngineCommandRecord): void;
2512
2677
  receiveSync(message: SonareEngineSyncMessage): void;
2678
+ receiveCaptureRequest(message: SonareEngineCaptureRequestMessage, port?: WorkletPort): void;
2679
+ receiveTransportRequest(message: SonareEngineTransportRequestMessage, port?: WorkletPort): void;
2513
2680
  destroy(): void;
2514
2681
  private writeChannelPointers;
2515
2682
  private drainCommands;
@@ -2529,6 +2696,10 @@ declare class SonareRealtimeEngineNode {
2529
2696
  private meterReadIndex;
2530
2697
  private telemetryListeners;
2531
2698
  private meterListeners;
2699
+ private captureRequestId;
2700
+ private readonly captureRequests;
2701
+ private transportRequestId;
2702
+ private readonly transportRequests;
2532
2703
  private resolveReady;
2533
2704
  private rejectReady;
2534
2705
  private destroyed;
@@ -2539,6 +2710,10 @@ declare class SonareRealtimeEngineNode {
2539
2710
  seekSample(timelineSample: number, sampleTime?: number): boolean;
2540
2711
  seekPpq(ppq: number, sampleTime?: number): boolean;
2541
2712
  sendCommand(command: SonareEngineCommandRecord): boolean;
2713
+ requestCaptureStatus(): Promise<EngineCaptureStatus>;
2714
+ requestCapturedAudio(): Promise<Float32Array[]>;
2715
+ requestCaptureReset(): Promise<void>;
2716
+ requestTransportState(): Promise<EngineTransportState>;
2542
2717
  pollTelemetry(): SonareEngineTelemetryRecord[];
2543
2718
  pollMeters(): SonareWorkletMeterSnapshot[];
2544
2719
  onTelemetry(callback: (telemetry: SonareEngineTelemetryRecord) => void): () => void;
@@ -2546,6 +2721,8 @@ declare class SonareRealtimeEngineNode {
2546
2721
  destroy(): void;
2547
2722
  private emitTelemetry;
2548
2723
  private emitMeter;
2724
+ private sendCaptureRequest;
2725
+ private sendTransportRequest;
2549
2726
  }
2550
2727
  declare class SonareEngine {
2551
2728
  readonly node: AudioWorkletNode;
@@ -2559,41 +2736,144 @@ declare class SonareEngine {
2559
2736
  private readonly offlineChannelCount;
2560
2737
  private readonly automationLanes;
2561
2738
  private readonly clips;
2739
+ private readonly midiClips;
2562
2740
  private readonly markers;
2741
+ private readonly trackLaneIds;
2742
+ private readonly trackSends;
2743
+ private readonly buses;
2744
+ private readonly trackStripJson;
2745
+ private readonly busStripJson;
2746
+ private masterStripJson;
2747
+ private captureConfig;
2748
+ private tempoBpm;
2749
+ private timeSignature;
2750
+ private tempoSegments;
2751
+ private timeSignatureSegments;
2752
+ private latestTransportState;
2563
2753
  private nextClipId;
2564
2754
  private nextMarkerId;
2755
+ private transportPlaying;
2756
+ private readonly pendingInstrumentSync;
2565
2757
  private destroyed;
2566
2758
  private constructor();
2567
2759
  static create(context: BaseAudioContext, options?: SonareEngineOptions): Promise<SonareEngine>;
2568
2760
  suspend(): Promise<void>;
2569
2761
  resume(): Promise<void>;
2570
2762
  setTempo(bpm: number): void;
2763
+ setTempoSegments(segments: readonly EngineTempoSegment[]): void;
2764
+ setTimeSignature(numerator: number, denominator: number): void;
2765
+ setTimeSignatureSegments(segments: readonly EngineTimeSignatureSegment[]): void;
2571
2766
  setLoop(startPpq: number, endPpq: number, enabled?: boolean): boolean;
2767
+ countInEndSample(startSample: number, bars: number): number;
2768
+ getTransportState(): Promise<EngineTransportState>;
2769
+ cachedTransportState(): EngineTransportState | undefined;
2572
2770
  setParam(nodeId: string, param: string | number, value: number): boolean;
2573
2771
  scheduleParam(nodeId: string, param: string | number, ppq: number, value: number, curve?: number | 'linear' | 'exponential'): void;
2574
2772
  addAutomationPoint(laneId: string | number, ppq: number, value: number, curve?: number | 'linear' | 'exponential'): void;
2575
2773
  listParameters(): EngineParameterInfo[];
2576
2774
  setSoloMute(target: string | number, solo: boolean, mute: boolean): boolean;
2775
+ setStripGain(target: string | number, db: number): boolean;
2776
+ setStripPan(target: string | number, pan: number): boolean;
2777
+ /**
2778
+ * Declares the mixer track lanes in an explicit order.
2779
+ *
2780
+ * Lane indices are append-only: once a track id occupies a lane, its index
2781
+ * stays fixed for the engine's lifetime. The given list must therefore start
2782
+ * with the already-declared lane ids in their current order and may only
2783
+ * append new track ids after them. Entries carrying `sends` replace that
2784
+ * track's send list; entries without `sends` leave existing sends untouched.
2785
+ *
2786
+ * @param lanes Track ids or lane descriptors in the desired lane order.
2787
+ */
2788
+ setTrackLanes(lanes: ReadonlyArray<number | EngineTrackLane>): void;
2789
+ setSends(target: string | number, sends: EngineTrackSend[]): void;
2790
+ setTrackBuses(buses: EngineBus[]): void;
2791
+ setBusGain(busId: number, db: number): boolean;
2792
+ setTrackStripJson(target: string | number, sceneJson: string): void;
2793
+ setTrackStripEqBand(target: string | number, bandIndex: number, band: EqBand | string): void;
2794
+ setTrackStripInsertBypassed(target: string | number, insertIndex: number, bypassed: boolean, resetOnBypass?: boolean): void;
2795
+ setStripEq(target: string | number, bandIndex: number, band: EqBand | string): void;
2796
+ setStripInsertBypassed(target: string | number, insertIndex: number, bypassed: boolean, resetOnBypass?: boolean): void;
2797
+ setStripInserts(target: string | number, sceneJson: string): void;
2798
+ setBusStripJson(busId: number, sceneJson: string): void;
2799
+ setMasterStripJson(sceneJson: string): void;
2800
+ setMasterStripEqBand(bandIndex: number, band: EqBand | string): void;
2801
+ setMasterStripInsertBypassed(insertIndex: number, bypassed: boolean, resetOnBypass?: boolean): void;
2802
+ setMasterChain(sceneJson: string): void;
2577
2803
  addClip(trackId: string | number, buffer: Float32Array[], startPpq: number, opts?: Partial<Omit<EngineClip, 'channels' | 'startPpq'>>): number;
2578
2804
  removeClip(clipId: number): void;
2805
+ setMidiClips(clips: readonly EngineMidiClipSchedule[]): void;
2806
+ setBuiltinInstrument(trackId: string | number, config?: {
2807
+ destinationId?: number;
2808
+ } & Record<string, unknown>): void;
2809
+ setSynthInstrument(trackId: string | number, patch?: Record<string, unknown> | string): void;
2810
+ loadSoundFont(data: Uint8Array): void;
2811
+ setSf2Instrument(trackId: string | number, config?: {
2812
+ destinationId?: number;
2813
+ gain?: number;
2814
+ polyphony?: number;
2815
+ }): void;
2816
+ pushMidiNoteOn(trackId: string | number, group: number, channel: number, note: number, velocity: number, renderFrame?: number): void;
2817
+ pushMidiNoteOff(trackId: string | number, group: number, channel: number, note: number, velocity?: number, renderFrame?: number): void;
2818
+ pushMidiCc(trackId: string | number, group: number, channel: number, controller: number, value: number, renderFrame?: number): void;
2819
+ pushMidiPanic(renderFrame?: number): void;
2820
+ configureCapture(options: {
2821
+ bufferFrames: number;
2822
+ channels?: number;
2823
+ source?: EngineCaptureStatus['source'];
2824
+ recordOffsetSamples?: number;
2825
+ inputMonitor?: {
2826
+ enabled: boolean;
2827
+ gain?: number;
2828
+ };
2829
+ }): void;
2579
2830
  armRecord(trackId: string | number, enabled: boolean): boolean;
2580
2831
  punch(inPpq: number, outPpq: number): boolean;
2832
+ captureStatus(): Promise<EngineCaptureStatus>;
2833
+ capturedAudio(): Promise<Float32Array[]>;
2834
+ resetCapture(): Promise<void>;
2581
2835
  setMetronome(opts: EngineMetronomeConfig): void;
2582
2836
  addMarker(ppq: number, name?: string): number;
2837
+ /**
2838
+ * Replaces the whole marker set in one call.
2839
+ *
2840
+ * Entries without an `id` are assigned fresh ids; entries carrying an `id`
2841
+ * keep it (ids must be positive and unique within the list). Returns the
2842
+ * resolved markers in the order given, so a caller can map its own marker
2843
+ * identities to the engine ids used by `seekMarker`/`setLoopFromMarkers`.
2844
+ *
2845
+ * @param markers The full marker list (an empty list clears all markers).
2846
+ * @returns The markers with their resolved engine ids.
2847
+ */
2848
+ setMarkers(markers: ReadonlyArray<{
2849
+ ppq: number;
2850
+ name?: string;
2851
+ id?: number;
2852
+ }>): EngineMarker[];
2853
+ markerCount(): number;
2854
+ markerByIndex(index: number): EngineMarker;
2855
+ marker(markerId: number): EngineMarker;
2583
2856
  seekMarker(markerId: number): boolean;
2857
+ setLoopFromMarkers(startMarkerId: number, endMarkerId: number): boolean;
2584
2858
  renderOffline(totalFrames: number): Promise<Float32Array[]>;
2585
2859
  onMeter(callback: (meter: SonareWorkletMeterSnapshot) => void): () => void;
2586
2860
  onTelemetry(callback: (telemetry: SonareEngineTelemetryRecord) => void): () => void;
2587
2861
  pollTelemetry(): SonareEngineTelemetryRecord[];
2588
2862
  pollMeters(): SonareWorkletMeterSnapshot[];
2589
2863
  destroy(): void;
2590
- private syncClips;
2864
+ private syncClipsDelta;
2865
+ private syncMidiClips;
2866
+ private syncMixer;
2591
2867
  private syncMarkers;
2868
+ private postInstrumentSync;
2869
+ private flushPendingInstrumentSync;
2870
+ private postTempoSync;
2592
2871
  private postSync;
2593
2872
  private resolveParamId;
2594
2873
  private resolveTargetId;
2874
+ private ensureTrackLane;
2875
+ private ensureBus;
2595
2876
  private curveCode;
2596
- private ppqToApproxSample;
2597
2877
  }
2598
2878
  declare class SonareRealtimeVoiceChangerWorkletProcessor {
2599
2879
  private static warnedMonoOverflow;
@@ -3586,6 +3866,44 @@ type EngineFreezeResult = WasmEngineFreezeResult;
3586
3866
  type EngineTelemetry = WasmEngineTelemetry;
3587
3867
  type EngineMeterTelemetry = WasmEngineMeterTelemetry;
3588
3868
  type EngineTransportState = WasmEngineTransportState;
3869
+ type EngineTempoSegment = WasmEngineTempoSegment;
3870
+ type EngineTimeSignatureSegment = WasmEngineTimeSignatureSegment;
3871
+ interface EngineTrackSend {
3872
+ busId: number;
3873
+ levelDb?: number;
3874
+ enabled?: boolean;
3875
+ }
3876
+ interface EngineTrackLane {
3877
+ trackId: number;
3878
+ sends?: EngineTrackSend[];
3879
+ }
3880
+ interface EngineBus {
3881
+ busId: number;
3882
+ gainDb?: number;
3883
+ }
3884
+ interface EngineMidiEvent {
3885
+ renderFrame: number;
3886
+ word0?: number;
3887
+ word1?: number;
3888
+ word2?: number;
3889
+ word3?: number;
3890
+ wordCount?: number;
3891
+ group?: number;
3892
+ sysexHandle?: number;
3893
+ data0?: number;
3894
+ data1?: number;
3895
+ }
3896
+ interface EngineMidiClipSchedule {
3897
+ id?: number;
3898
+ trackId?: number;
3899
+ destinationId?: number;
3900
+ startSample?: number;
3901
+ startPpq?: number;
3902
+ lengthSamples?: number;
3903
+ loop?: boolean;
3904
+ loopLengthSamples?: number;
3905
+ events: EngineMidiEvent[];
3906
+ }
3589
3907
  declare const EXPECTED_ENGINE_ABI_VERSION = 3;
3590
3908
  /** Options for {@link RealtimeEngine.bindMidiCc}. All fields are optional. */
3591
3909
  interface MidiCcBindOptions {
@@ -3606,13 +3924,14 @@ interface EngineCapabilities {
3606
3924
  declare function engineCapabilities(): EngineCapabilities;
3607
3925
  declare class RealtimeEngine {
3608
3926
  private native;
3609
- private nativeExt;
3610
3927
  constructor(sampleRate?: number, maxBlockSize?: number, commandCapacity?: number, telemetryCapacity?: number);
3611
3928
  prepare(sampleRate: number, maxBlockSize: number, commandCapacity?: number, telemetryCapacity?: number): void;
3612
3929
  /** Queue a sample-accurate parameter change (engine kSetParam). */
3613
3930
  setParameter(paramId: number, value: number, renderFrame?: number): void;
3614
3931
  /** Queue a smoothed parameter change (engine kSetParamSmoothed). */
3615
3932
  setParameterSmoothed(paramId: number, value: number, renderFrame?: number): void;
3933
+ setSoloMute(laneIndex: number, solo: boolean, mute: boolean, renderFrame?: number): void;
3934
+ setMidiClips(clips: readonly EngineMidiClipSchedule[]): void;
3616
3935
  setBuiltinInstrument(config?: {
3617
3936
  destinationId?: number;
3618
3937
  } & Record<string, unknown>, destinationId?: number): void;
@@ -3693,7 +4012,10 @@ declare class RealtimeEngine {
3693
4012
  seekSample(timelineSample: number, renderFrame?: number): void;
3694
4013
  seekPpq(ppq: number, renderFrame?: number): void;
3695
4014
  setTempo(bpm: number): void;
4015
+ setTempoSegments(segments: readonly EngineTempoSegment[]): void;
3696
4016
  setTimeSignature(numerator: number, denominator: number): void;
4017
+ setTimeSignatureSegments(segments: readonly EngineTimeSignatureSegment[]): void;
4018
+ sampleAtPpq(ppq: number): number;
3697
4019
  setLoop(startPpq: number, endPpq: number, enabled?: boolean): void;
3698
4020
  addParameter(info: EngineParameterInfo): void;
3699
4021
  parameterCount(): number;
@@ -3715,6 +4037,17 @@ declare class RealtimeEngine {
3715
4037
  graphConnectionCount(): number;
3716
4038
  setClips(clips: EngineClip[]): void;
3717
4039
  clipCount(): number;
4040
+ setTrackLanes(lanes: Array<number | EngineTrackLane>): void;
4041
+ setTrackBuses(buses: EngineBus[]): void;
4042
+ setBusStripJson(busId: number, sceneJson: string): void;
4043
+ setTrackStripJson(trackId: number, sceneJson: string): void;
4044
+ setTrackStripEqBand(trackId: number, bandIndex: number, band: EqBand | string): void;
4045
+ setTrackStripEqBandJson(trackId: number, bandIndex: number, bandJson: string): void;
4046
+ setTrackStripInsertBypassed(trackId: number, insertIndex: number, bypassed: boolean, resetOnBypass?: boolean): void;
4047
+ setMasterStripJson(sceneJson: string): void;
4048
+ setMasterStripEqBand(bandIndex: number, band: EqBand | string): void;
4049
+ setMasterStripEqBandJson(bandIndex: number, bandJson: string): void;
4050
+ setMasterStripInsertBypassed(insertIndex: number, bypassed: boolean, resetOnBypass?: boolean): void;
3718
4051
  createClipPageProvider(numChannels: number, numSamples: number, pageFrames: number): ClipPageProvider;
3719
4052
  supplyClipPage(providerId: number, pageIndex: number, channels: Float32Array[]): void;
3720
4053
  clearClipPage(providerId: number, pageIndex: number): void;
@@ -3782,7 +4115,7 @@ interface OpfsClipPageProviderBinding {
3782
4115
  supplyRequest(request: ClipPageRequest): Promise<boolean>;
3783
4116
  close(): void;
3784
4117
  }
3785
- declare const opfsClipPageWorkerSource = "\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 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";
4118
+ 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";
3786
4119
  declare function createOpfsClipPageWorker(): Worker;
3787
4120
  declare function createOpfsClipPageProvider(engine: RealtimeEngine, options: OpfsClipPageProviderOptions): OpfsClipPageProviderBinding;
3788
4121
 
@@ -4902,6 +5235,11 @@ type HpssWithResidualResult = WasmHpssWithResidualResult;
4902
5235
  */
4903
5236
  declare function init(options?: {
4904
5237
  locateFile?: (path: string, prefix: string) => string;
5238
+ wasmBinary?: ArrayBuffer | Uint8Array;
5239
+ moduleFactory?: (options?: {
5240
+ locateFile?: (path: string, prefix: string) => string;
5241
+ wasmBinary?: ArrayBuffer | Uint8Array;
5242
+ }) => Promise<SonareModule>;
4905
5243
  }): Promise<void>;
4906
5244
  /**
4907
5245
  * Check if the module is initialized.
@@ -4925,4 +5263,4 @@ declare function voiceCharacterPresetId(preset: VoicePresetId | number): string
4925
5263
  */
4926
5264
  declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig | null;
4927
5265
 
4928
- export { type EngineClip as $, type AcousticOptions as A, type BarChord as B, type Chord as C, type CompressorDetector as D, type CompressorOptions as E, type CqtResult as F, type DeclickOptions as G, type DeclipOptions as H, type DecomposeResult as I, type DecrackleMode as J, type DecrackleOptions as K, type DehumOptions as L, type DenoiseClassicalMode as M, type DenoiseClassicalNoiseEstimator as N, type DenoiseClassicalOptions as O, type DereverbClassicalOptions as P, type DynamicRangeReport as Q, type Dynamics as R, type DynamicsAnalysisResult as S, SONARE_ENGINE_COMMAND_RECORD_BYTES, SONARE_ENGINE_RING_HEADER_INTS, SONARE_ENGINE_TELEMETRY_RECORD_BYTES, SONARE_METER_RING_HEADER_INTS, SONARE_METER_RING_RECORD_FLOATS, SONARE_SPECTRUM_RING_HEADER_INTS, SonareEngine, type SonareEngineCommandRecord, type SonareEngineCommandRingBuffer, SonareEngineCommandType, type SonareEngineOptions, type SonareEngineSyncAutomationMessage, type SonareEngineSyncClipsMessage, type SonareEngineSyncMarkersMessage, type SonareEngineSyncMessage, type SonareEngineSyncMetronomeMessage, SonareEngineTelemetryError, type SonareEngineTelemetryRecord, type SonareEngineTelemetryRingBuffer, type SonareEngineTelemetryRingReadResult, SonareEngineTelemetryType, type SonareEngineTransportFacade, type SonareMeterRingBuffer, type SonareMeterRingReadResult, SonareRealtimeEngineNode, type SonareRealtimeEngineNodeCapabilities, type SonareRealtimeEngineNodeOptions, SonareRealtimeEngineWorkletProcessor, type SonareRealtimeEngineWorkletProcessorOptions, type SonareRealtimeVoiceChangerDestroyMessage, type SonareRealtimeVoiceChangerMessage, type SonareRealtimeVoiceChangerResetMessage, type SonareRealtimeVoiceChangerSetConfigMessage, SonareRealtimeVoiceChangerWorkletProcessor, type SonareRealtimeVoiceChangerWorkletProcessorOptions, SonareRtRealtimeEngineRuntime, type SonareRtRealtimeEngineRuntimeOptions, type SonareSpectrumRingBuffer, type SonareSpectrumRingReadResult, type SonareWorkletDestroyMessage, type SonareWorkletMessage, type SonareWorkletMeterSnapshot, SonareWorkletProcessor, type SonareWorkletProcessorOptions, type SonareWorkletScheduleInsertAutomationMessage, type SonareWorkletSetMeterIntervalMessage, type SonareWorkletSpectrumSnapshot, type SonareWorkletTransportMessage, type DynamicsResult as T, EXPECTED_ENGINE_ABI_VERSION as U, EXPECTED_PROJECT_ABI_VERSION as V, type EngineAutomationPoint as W, type EngineBounceOptions as X, type EngineBounceResult as Y, type EngineCapabilities as Z, type EngineCaptureStatus as _, type AcousticResult as a, type PatternScore as a$, type EngineFreezeOptions as a0, type EngineFreezeResult as a1, type EngineGraphSpec as a2, type EngineMarker as a3, type EngineMeterTelemetry as a4, type EngineMetronomeConfig as a5, type EngineParameterInfo as a6, type EngineTelemetry as a7, type EngineTransportState as a8, type EqBand as a9, type Matrix2dResult as aA, type MelPowerResult as aB, type MelSpectrogramResult as aC, type MelodyOptions as aD, type MelodyPoint as aE, type MelodyResult as aF, type MeterTap as aG, type MeteringDetectClippingOptions as aH, type MeteringDynamicRangeOptions as aI, type MfccResult as aJ, type MicrophoneInputBinding as aK, type MidiCcBindOptions as aL, type MidiCcLearnOptions as aM, type MixMeterSnapshot as aN, type MixOptions as aO, type MixResult as aP, Mixer as aQ, type MixerProcessResult as aR, type MixerRealtimeBuffer as aS, Mode as aT, type NoteStretchOptions as aU, type OpfsClipPageProviderBinding as aV, type OpfsClipPageProviderOptions as aW, type PairAnalysis as aX, type PairProcessor as aY, type PanLaw as aZ, type PanMode as a_, type EqBandPhase as aa, type EqBandType as ab, type EqCoeffMode as ac, type EqMatchOptions as ad, type EqSpectrumSnapshot as ae, type EqStereoPlacement as af, ErrorCode as ag, type FrameBuffer as ah, type GateOptions as ai, type GoniometerPoint as aj, type HpssResult as ak, type HpssWithResidualResult as al, type Key as am, type KeyCandidate as an, type KeyDetectionOptions as ao, KeyProfile as ap, type KeyProfileName as aq, type LufsResult as ar, type MasteringChainConfig as as, type MasteringChainResult as at, type MasteringOptions as au, type MasteringPreset as av, type MasteringProcessorParams as aw, type MasteringResult as ax, type MasteringStereoChainResult as ay, type MasteringStereoResult as az, type AnalysisResult as b, StreamAnalyzer as b$, type PhaseScopeReport as b0, PitchClass as b1, type PitchResult as b2, type ProgressiveEstimate as b3, Project as b4, type ProjectAssistSidecar as b5, type ProjectAutomationCurve as b6, type ProjectAutomationLaneDesc as b7, type ProjectAutomationPoint as b8, type ProjectBounceOptions as b9, type RhythmFeatures as bA, type RirResult as bB, type RirSynthOptions as bC, type RoomEstimateOptions as bD, type RoomEstimateResult as bE, type RoomGeometryOptions as bF, type RoomMorphOptions as bG, SYNTH_BODY_TYPES as bH, SYNTH_ENGINE_MODES as bI, SYNTH_FILTER_MODELS as bJ, SYNTH_FILTER_OUTPUTS as bK, SYNTH_MOD_DESTINATIONS as bL, SYNTH_MOD_SOURCES as bM, SYNTH_OSC_WAVEFORMS as bN, type Section as bO, SectionType as bP, type SendTiming as bQ, type Sf2InstrumentConfig as bR, type Sf2ProgramStatus as bS, type SoloProcessor as bT, SonareError as bU, type SourceBackend as bV, type SpectrumOptions as bW, type SpectrumReport as bX, type StereoAnalysis as bY, type StftPowerResult as bZ, type StftResult as b_, type ProjectChordSymbol as ba, type ProjectClipCompSegment as bb, type ProjectClipDesc as bc, type ProjectClipFade as bd, type ProjectClipTake as be, type ProjectCompileResult as bf, type ProjectFadeCurve as bg, type ProjectKeySegment as bh, type ProjectLoopMode as bi, type ProjectLoopRecordingDesc as bj, type ProjectLoopRecordingResult as bk, type ProjectMidiClipResult as bl, type ProjectMidiEvent as bm, type ProjectNotePairValidation as bn, type ProjectTrackDesc as bo, type ProjectTrackKind as bp, type ProjectWarpAnchor as bq, type ProjectWarpMapDesc as br, RealtimeEngine as bs, RealtimeVoiceChanger as bt, type RealtimeVoiceChangerConfigInput as bu, type RealtimeVoiceChangerInterleavedBuffer as bv, type RealtimeVoiceChangerMonoBuffer as bw, type RealtimeVoiceChangerPlanarBuffer as bx, type RealtimeVoiceChangerPodConfig as by, type RhythmAnalysisResult as bz, type AnalyzeBpmOptions as c, decompose as c$, type StreamConfig as c0, type StreamConfigDefaults as c1, type StreamFramesI16 as c2, type StreamFramesU8 as c3, type StreamQuantizeConfig as c4, StreamingEqualizer as c5, type StreamingEqualizerConfig as c6, StreamingMasteringChain as c7, type StreamingMasteringChainConfig as c8, type StreamingPlatform as c9, type WaveformPeaksOptions as cA, type WaveformPeaksReport as cB, type WebMidiBinding as cC, type WebMidiCcBinding as cD, type WebMidiInputInfo as cE, amplitudeToDb as cF, analyze as cG, analyzeBpm as cH, analyzeDynamics as cI, analyzeImpulseResponse as cJ, analyzeMelody as cK, analyzeRhythm as cL, analyzeSections as cM, analyzeTimbre as cN, analyzeWithProgress as cO, bassChroma as cP, bindMicrophoneInput as cQ, bindWebMidi as cR, chordFunctionalAnalysis as cS, chroma as cT, chromaCens as cU, cqt as cV, createOpfsClipPageProvider as cW, createOpfsClipPageWorker as cX, cyclicTempogram as cY, dbToAmplitude as cZ, dbToPower as c_, StreamingRetune as ca, type StreamingRetuneConfig as cb, type SynthBodyType as cc, type SynthEngineMode as cd, type SynthEnumTables as ce, type SynthFilterModel as cf, type SynthFilterOutput as cg, type SynthModDestination as ch, type SynthModRouting as ci, type SynthModSource as cj, type SynthOscWaveform as ck, type SynthPatch as cl, type TempogramMode as cm, type Timbre as cn, type TimbreAnalysisResult as co, type TimbreFrame as cp, type TimeSignature as cq, type TransientShaperOptions as cr, createSonareEngineCommandRingBuffer, createSonareEngineTelemetryRingBuffer, createSonareMeterRingBuffer, createSonareSpectrumRingBuffer, type TrimSilenceMode as cs, type TrimSilenceOptions as ct, type ValidateOptions as cu, type VectorscopeReport as cv, type VoiceChangeOptions as cw, type VoiceChangeRealtimeOptions as cx, type VoicePresetId as cy, type WaveformPeakPyramidOptions as cz, type AnalyzeDynamicsOptions as d, masteringRepairDereverbClassical as d$, decomposeWithInit as d0, deemphasis as d1, detectAcoustic as d2, detectBeats as d3, detectBpm as d4, detectChords as d5, detectDownbeats as d6, detectKey as d7, detectKeyCandidates as d8, detectOnsets as d9, masterAudioStereoWithProgress as dA, masterAudioWithProgress as dB, mastering as dC, masteringAssistantSuggest as dD, masteringAudioProfile as dE, masteringChain as dF, masteringChainStereo as dG, masteringChainStereoWithProgress as dH, masteringChainWithProgress as dI, masteringDynamicsCompressor as dJ, masteringDynamicsGate as dK, masteringDynamicsTransientShaper as dL, masteringInsertNames as dM, masteringInsertParamNames as dN, masteringPairAnalysisNames as dO, masteringPairAnalyze as dP, masteringPairProcess as dQ, masteringPairProcessorNames as dR, masteringPresetNames as dS, masteringProcess as dT, masteringProcessStereo as dU, masteringProcessorNames as dV, masteringRepairDeclick as dW, masteringRepairDeclip as dX, masteringRepairDecrackle as dY, masteringRepairDehum as dZ, masteringRepairDenoiseClassical as d_, ebur128LoudnessRange as da, engineAbiVersion as db, engineCapabilities as dc, estimateRoom as dd, estimateTuning as de, decodeFrame, fixFrames as df, fixLength as dg, fourierTempogram as dh, frameSignal as di, framesToSamples as dj, framesToTime as dk, harmonic as dl, hasFfmpegSupport as dm, hpss as dn, hpssWithResidual as dp, hybridCqt as dq, hzToMel as dr, hzToMidi as ds, hzToNote as dt, isSonareError as du, isWebMidiAvailable as dv, lufs as dw, lufsInterleaved as dx, masterAudio as dy, masterAudioStereo as dz, type AnalyzeRhythmOptions as e, samplesToFrames as e$, masteringRepairTrimSilence as e0, masteringStereoAnalysisNames as e1, masteringStereoAnalyze as e2, masteringStreamingPreview as e3, melSpectrogram as e4, melToAudio as e5, melToHz as e6, melToStft as e7, meteringCrestFactorDb as e8, meteringDcOffset as e9, onsetEnvelope as eA, onsetStrengthMulti as eB, opfsClipPageWorkerSource as eC, padCenter as eD, pcen as eE, peakPick as eF, percussive as eG, phaseVocoder as eH, pitchCorrectToMidi as eI, pitchCorrectToMidiTimevarying as eJ, pitchPyin as eK, pitchShift as eL, pitchTuning as eM, pitchYin as eN, plp as eO, polyFeatures as eP, powerToDb as eQ, preemphasis as eR, projectAbiVersion as eS, pseudoCqt as eT, realtimeVoiceChangerPresetConfig as eU, realtimeVoiceChangerPresetJson as eV, realtimeVoiceChangerPresetNames as eW, remix as eX, resample as eY, rmsEnergy as eZ, roomMorph as e_, meteringDetectClipping as ea, meteringDynamicRange as eb, meteringPeakDb as ec, meteringPhaseScope as ed, meteringPhaseScopeDecimated as ee, meteringRmsDb as ef, meteringSpectrum as eg, meteringSpectrumFrame as eh, meteringStereoCorrelation as ei, meteringStereoWidth as ej, meteringTruePeakDb as ek, meteringVectorscope as el, meteringVectorscopeDecimated as em, mfcc as en, encodeFrameHi, encodeFrameLo, mfccToAudio as eo, mfccToMel as ep, midiToHz as eq, mixStereo as er, mixingScenePresetJson as es, mixingScenePresetNames as et, momentaryLufs as eu, nnFilter as ev, nnlsChroma as ew, normalize as ex, noteStretch as ey, noteToHz as ez, type AnalyzeSectionsOptions as f, scaleCorrectionSemitones as f0, scalePitchClassEnabled as f1, scaleQuantizeMidi as f2, shortTermLufs as f3, spectralBandwidth as f4, spectralCentroid as f5, spectralContrast as f6, spectralFlatness as f7, spectralRolloff as f8, splitSilence as f9, stft as fa, stftDb as fb, streamAnalyzerConfigDefaults as fc, synthEnumTables as fd, synthPresetNames as fe, synthPresetPatch as ff, synthesizeRir as fg, tempogram as fh, tempogramRatio as fi, timeStretch as fj, timeToFrames as fk, tonnetz as fl, trim as fm, trimSilence as fn, validateRealtimeVoiceChangerPresetJson as fo, vectorNormalize as fp, version as fq, voiceChange as fr, voiceChangeRealtime as fs, voiceChangerAbiVersion as ft, voiceCharacterPresetId as fu, vqt as fv, waveformPeakPyramid as fw, waveformPeaks as fx, zeroCrossingRate as fy, zeroCrossings as fz, type AnalyzeTimbreOptions as g, type AnalyzerStats as h, Audio as i, init, isInitialized, type AutomationCurve as j, type Beat as k, type BindMicrophoneInputOptions as l, type BindWebMidiOptions as m, type BpmAnalysisResult as n, type BpmCandidate as o, type BrowserAudioDecodeOptions as p, popSonareEngineCommandRingBuffer, pushSonareEngineCommandRingBuffer, type BuiltinSynthBinding as q, type BuiltinSynthConfig as r, readSonareEngineTelemetryRingBuffer, readSonareMeterRingBuffer, readSonareSpectrumRingBuffer, registerSonareRealtimeEngineWorkletProcessor, registerSonareRealtimeVoiceChangerWorkletProcessor, registerSonareWorkletProcessor, type BuiltinSynthWaveform as s, sonareEngineCommandRingBufferByteLength, sonareEngineTelemetryRingBufferByteLength, sonareMeterRingBufferByteLength, sonareSpectrumRingBufferByteLength, type ChordAnalysisResult as t, type ChordChange as u, type ChordDetectionOptions as v, ChordQuality as w, writeSonareEngineTelemetryRingBuffer, type ChromaResult as x, type ClippingRegion as y, type ClippingReport as z };
5266
+ export { type EngineCaptureStatus as $, type AcousticOptions as A, type BarChord as B, type Chord as C, type CompressorDetector as D, type CompressorOptions as E, type CqtResult as F, type DeclickOptions as G, type DeclipOptions as H, type DecomposeResult as I, type DecrackleMode as J, type DecrackleOptions as K, type DehumOptions as L, type DenoiseClassicalMode as M, type DenoiseClassicalNoiseEstimator as N, type DenoiseClassicalOptions as O, type DereverbClassicalOptions as P, type DynamicRangeReport as Q, type Dynamics as R, type DynamicsAnalysisResult as S, SONARE_ENGINE_COMMAND_RECORD_BYTES, SONARE_ENGINE_RING_HEADER_INTS, SONARE_ENGINE_TELEMETRY_RECORD_BYTES, SONARE_METER_RING_HEADER_INTS, SONARE_METER_RING_RECORD_FLOATS, SONARE_SPECTRUM_RING_HEADER_INTS, SonareEngine, type SonareEngineCaptureRequestMessage, type SonareEngineCaptureResponseMessage, type SonareEngineCommandRecord, type SonareEngineCommandRingBuffer, SonareEngineCommandType, type SonareEngineOptions, type SonareEngineSyncAutomationMessage, type SonareEngineSyncBuiltinInstrumentMessage, type SonareEngineSyncCaptureMessage, type SonareEngineSyncClipsDeltaMessage, type SonareEngineSyncClipsMessage, type SonareEngineSyncLoadSoundFontMessage, type SonareEngineSyncMarkersMessage, type SonareEngineSyncMasterStripEqBandMessage, type SonareEngineSyncMasterStripInsertBypassedMessage, type SonareEngineSyncMessage, type SonareEngineSyncMetronomeMessage, type SonareEngineSyncMidiCcMessage, type SonareEngineSyncMidiClipsMessage, type SonareEngineSyncMidiNoteMessage, type SonareEngineSyncMidiPanicMessage, type SonareEngineSyncMixerMessage, type SonareEngineSyncSf2InstrumentMessage, type SonareEngineSyncSynthInstrumentMessage, type SonareEngineSyncTempoMessage, type SonareEngineSyncTrackStripEqBandMessage, type SonareEngineSyncTrackStripInsertBypassedMessage, SonareEngineTelemetryError, type SonareEngineTelemetryRecord, type SonareEngineTelemetryRingBuffer, type SonareEngineTelemetryRingReadResult, SonareEngineTelemetryType, type SonareEngineTransportFacade, type SonareEngineTransportRequestMessage, type SonareEngineTransportResponseMessage, type SonareMeterRingBuffer, type SonareMeterRingReadResult, SonareRealtimeEngineNode, type SonareRealtimeEngineNodeCapabilities, type SonareRealtimeEngineNodeOptions, SonareRealtimeEngineWorkletProcessor, type SonareRealtimeEngineWorkletProcessorOptions, type SonareRealtimeVoiceChangerDestroyMessage, type SonareRealtimeVoiceChangerMessage, type SonareRealtimeVoiceChangerResetMessage, type SonareRealtimeVoiceChangerSetConfigMessage, SonareRealtimeVoiceChangerWorkletProcessor, type SonareRealtimeVoiceChangerWorkletProcessorOptions, SonareRtRealtimeEngineRuntime, type SonareRtRealtimeEngineRuntimeOptions, type SonareSpectrumRingBuffer, type SonareSpectrumRingReadResult, type SonareWorkletDestroyMessage, type SonareWorkletMessage, type SonareWorkletMeterSnapshot, SonareWorkletProcessor, type SonareWorkletProcessorOptions, type SonareWorkletScheduleInsertAutomationMessage, type SonareWorkletSetMeterIntervalMessage, type SonareWorkletSpectrumSnapshot, type SonareWorkletTransportMessage, type DynamicsResult as T, EXPECTED_ENGINE_ABI_VERSION as U, EXPECTED_PROJECT_ABI_VERSION as V, type EngineAutomationPoint as W, type EngineBounceOptions as X, type EngineBounceResult as Y, type EngineBus as Z, type EngineCapabilities as _, type AcousticResult as a, type NoteStretchOptions as a$, type EngineClip as a0, type EngineFreezeOptions as a1, type EngineFreezeResult as a2, type EngineGraphSpec as a3, type EngineMarker as a4, type EngineMeterTelemetry as a5, type EngineMetronomeConfig as a6, type EngineMidiClipSchedule as a7, type EngineMidiEvent as a8, type EngineParameterInfo as a9, type MasteringChainResult as aA, type MasteringOptions as aB, type MasteringPreset as aC, type MasteringProcessorParams as aD, type MasteringResult as aE, type MasteringStereoChainResult as aF, type MasteringStereoResult as aG, type Matrix2dResult as aH, type MelPowerResult as aI, type MelSpectrogramResult as aJ, type MelodyOptions as aK, type MelodyPoint as aL, type MelodyResult as aM, type MeterTap as aN, type MeteringDetectClippingOptions as aO, type MeteringDynamicRangeOptions as aP, type MfccResult as aQ, type MicrophoneInputBinding as aR, type MidiCcBindOptions as aS, type MidiCcLearnOptions as aT, type MixMeterSnapshot as aU, type MixOptions as aV, type MixResult as aW, Mixer as aX, type MixerProcessResult as aY, type MixerRealtimeBuffer as aZ, Mode as a_, type EngineTelemetry as aa, type EngineTempoSegment as ab, type EngineTimeSignatureSegment as ac, type EngineTrackLane as ad, type EngineTrackSend as ae, type EngineTransportState as af, type EqBand as ag, type EqBandPhase as ah, type EqBandType as ai, type EqCoeffMode as aj, type EqMatchOptions as ak, type EqSpectrumSnapshot as al, type EqStereoPlacement as am, ErrorCode as an, type FrameBuffer as ao, type GateOptions as ap, type GoniometerPoint as aq, type HpssResult as ar, type HpssWithResidualResult as as, type Key as at, type KeyCandidate as au, type KeyDetectionOptions as av, KeyProfile as aw, type KeyProfileName as ax, type LufsResult as ay, type MasteringChainConfig as az, type AnalysisResult as b, SonareError as b$, type OpfsClipPageProviderBinding as b0, type OpfsClipPageProviderOptions as b1, type PairAnalysis as b2, type PairProcessor as b3, type PanLaw as b4, type PanMode as b5, type PatternScore as b6, type PhaseScopeReport as b7, PitchClass as b8, type PitchResult as b9, RealtimeVoiceChanger as bA, type RealtimeVoiceChangerConfigInput as bB, type RealtimeVoiceChangerInterleavedBuffer as bC, type RealtimeVoiceChangerMonoBuffer as bD, type RealtimeVoiceChangerPlanarBuffer as bE, type RealtimeVoiceChangerPodConfig as bF, type RhythmAnalysisResult as bG, type RhythmFeatures as bH, type RirResult as bI, type RirSynthOptions as bJ, type RoomEstimateOptions as bK, type RoomEstimateResult as bL, type RoomGeometryOptions as bM, type RoomMorphOptions as bN, SYNTH_BODY_TYPES as bO, SYNTH_ENGINE_MODES as bP, SYNTH_FILTER_MODELS as bQ, SYNTH_FILTER_OUTPUTS as bR, SYNTH_MOD_DESTINATIONS as bS, SYNTH_MOD_SOURCES as bT, SYNTH_OSC_WAVEFORMS as bU, type Section as bV, SectionType as bW, type SendTiming as bX, type Sf2InstrumentConfig as bY, type Sf2ProgramStatus as bZ, type SoloProcessor as b_, type ProgressiveEstimate as ba, Project as bb, type ProjectAssistSidecar as bc, type ProjectAutomationCurve as bd, type ProjectAutomationLaneDesc as be, type ProjectAutomationPoint as bf, type ProjectBounceOptions as bg, type ProjectChordSymbol as bh, type ProjectClipCompSegment as bi, type ProjectClipDesc as bj, type ProjectClipFade as bk, type ProjectClipTake as bl, type ProjectCompileResult as bm, type ProjectFadeCurve as bn, type ProjectKeySegment as bo, type ProjectLoopMode as bp, type ProjectLoopRecordingDesc as bq, type ProjectLoopRecordingResult as br, type ProjectMidiClipResult as bs, type ProjectMidiEvent as bt, type ProjectNotePairValidation as bu, type ProjectTrackDesc as bv, type ProjectTrackKind as bw, type ProjectWarpAnchor as bx, type ProjectWarpMapDesc as by, RealtimeEngine as bz, type AnalyzeBpmOptions as c, chromaCens as c$, type SourceBackend as c0, type SpectrumOptions as c1, type SpectrumReport as c2, type StereoAnalysis as c3, type StftPowerResult as c4, type StftResult as c5, StreamAnalyzer as c6, type StreamConfig as c7, type StreamConfigDefaults as c8, type StreamFramesI16 as c9, type TrimSilenceOptions as cA, type ValidateOptions as cB, type VectorscopeReport as cC, type VoiceChangeOptions as cD, type VoiceChangeRealtimeOptions as cE, type VoicePresetId as cF, type WaveformPeakPyramidOptions as cG, type WaveformPeaksOptions as cH, type WaveformPeaksReport as cI, type WebMidiBinding as cJ, type WebMidiCcBinding as cK, type WebMidiInputInfo as cL, amplitudeToDb as cM, analyze as cN, analyzeBpm as cO, analyzeDynamics as cP, analyzeImpulseResponse as cQ, analyzeMelody as cR, analyzeRhythm as cS, analyzeSections as cT, analyzeTimbre as cU, analyzeWithProgress as cV, bassChroma as cW, bindMicrophoneInput as cX, bindWebMidi as cY, chordFunctionalAnalysis as cZ, chroma as c_, type StreamFramesU8 as ca, type StreamQuantizeConfig as cb, StreamingEqualizer as cc, type StreamingEqualizerConfig as cd, StreamingMasteringChain as ce, type StreamingMasteringChainConfig as cf, type StreamingPlatform as cg, StreamingRetune as ch, type StreamingRetuneConfig as ci, type SynthBodyType as cj, type SynthEngineMode as ck, type SynthEnumTables as cl, type SynthFilterModel as cm, type SynthFilterOutput as cn, type SynthModDestination as co, type SynthModRouting as cp, type SynthModSource as cq, type SynthOscWaveform as cr, createSonareEngineCommandRingBuffer, createSonareEngineTelemetryRingBuffer, createSonareMeterRingBuffer, createSonareSpectrumRingBuffer, type SynthPatch as cs, type TempogramMode as ct, type Timbre as cu, type TimbreAnalysisResult as cv, type TimbreFrame as cw, type TimeSignature as cx, type TransientShaperOptions as cy, type TrimSilenceMode as cz, type AnalyzeDynamicsOptions as d, masteringProcessStereo as d$, cqt as d0, createOpfsClipPageProvider as d1, createOpfsClipPageWorker as d2, cyclicTempogram as d3, dbToAmplitude as d4, dbToPower as d5, decompose as d6, decomposeWithInit as d7, deemphasis as d8, detectAcoustic as d9, hzToNote as dA, isSonareError as dB, isWebMidiAvailable as dC, lufs as dD, lufsInterleaved as dE, masterAudio as dF, masterAudioStereo as dG, masterAudioStereoWithProgress as dH, masterAudioWithProgress as dI, mastering as dJ, masteringAssistantSuggest as dK, masteringAudioProfile as dL, masteringChain as dM, masteringChainStereo as dN, masteringChainStereoWithProgress as dO, masteringChainWithProgress as dP, masteringDynamicsCompressor as dQ, masteringDynamicsGate as dR, masteringDynamicsTransientShaper as dS, masteringInsertNames as dT, masteringInsertParamNames as dU, masteringPairAnalysisNames as dV, masteringPairAnalyze as dW, masteringPairProcess as dX, masteringPairProcessorNames as dY, masteringPresetNames as dZ, masteringProcess as d_, detectBeats as da, detectBpm as db, detectChords as dc, detectDownbeats as dd, detectKey as de, decodeFrame, detectKeyCandidates as df, detectOnsets as dg, ebur128LoudnessRange as dh, engineAbiVersion as di, engineCapabilities as dj, estimateRoom as dk, estimateTuning as dl, fixFrames as dm, fixLength as dn, fourierTempogram as dp, frameSignal as dq, framesToSamples as dr, framesToTime as ds, harmonic as dt, hasFfmpegSupport as du, hpss as dv, hpssWithResidual as dw, hybridCqt as dx, hzToMel as dy, hzToMidi as dz, type AnalyzeRhythmOptions as e, realtimeVoiceChangerPresetConfig as e$, masteringProcessorNames as e0, masteringRepairDeclick as e1, masteringRepairDeclip as e2, masteringRepairDecrackle as e3, masteringRepairDehum as e4, masteringRepairDenoiseClassical as e5, masteringRepairDereverbClassical as e6, masteringRepairTrimSilence as e7, masteringStereoAnalysisNames as e8, masteringStereoAnalyze as e9, mixingScenePresetNames as eA, momentaryLufs as eB, nnFilter as eC, nnlsChroma as eD, normalize as eE, noteStretch as eF, noteToHz as eG, onsetEnvelope as eH, onsetStrengthMulti as eI, opfsClipPageWorkerSource as eJ, padCenter as eK, pcen as eL, peakPick as eM, percussive as eN, phaseVocoder as eO, pitchCorrectToMidi as eP, pitchCorrectToMidiTimevarying as eQ, pitchPyin as eR, pitchShift as eS, pitchTuning as eT, pitchYin as eU, plp as eV, polyFeatures as eW, powerToDb as eX, preemphasis as eY, projectAbiVersion as eZ, pseudoCqt as e_, masteringStreamingPreview as ea, melSpectrogram as eb, melToAudio as ec, melToHz as ed, melToStft as ee, meteringCrestFactorDb as ef, meteringDcOffset as eg, meteringDetectClipping as eh, meteringDynamicRange as ei, meteringPeakDb as ej, meteringPhaseScope as ek, meteringPhaseScopeDecimated as el, meteringRmsDb as em, meteringSpectrum as en, encodeFrameHi, encodeFrameLo, meteringSpectrumFrame as eo, meteringStereoCorrelation as ep, meteringStereoWidth as eq, meteringTruePeakDb as er, meteringVectorscope as es, meteringVectorscopeDecimated as et, mfcc as eu, mfccToAudio as ev, mfccToMel as ew, midiToHz as ex, mixStereo as ey, mixingScenePresetJson as ez, type AnalyzeSectionsOptions as f, realtimeVoiceChangerPresetJson as f0, realtimeVoiceChangerPresetNames as f1, remix as f2, resample as f3, rmsEnergy as f4, roomMorph as f5, samplesToFrames as f6, scaleCorrectionSemitones as f7, scalePitchClassEnabled as f8, scaleQuantizeMidi as f9, voiceChangerAbiVersion as fA, voiceCharacterPresetId as fB, vqt as fC, waveformPeakPyramid as fD, waveformPeaks as fE, zeroCrossingRate as fF, zeroCrossings as fG, shortTermLufs as fa, spectralBandwidth as fb, spectralCentroid as fc, spectralContrast as fd, spectralFlatness as fe, spectralRolloff as ff, splitSilence as fg, stft as fh, stftDb as fi, streamAnalyzerConfigDefaults as fj, synthEnumTables as fk, synthPresetNames as fl, synthPresetPatch as fm, synthesizeRir as fn, tempogram as fo, tempogramRatio as fp, timeStretch as fq, timeToFrames as fr, tonnetz as fs, trim as ft, trimSilence as fu, validateRealtimeVoiceChangerPresetJson as fv, vectorNormalize as fw, version as fx, voiceChange as fy, voiceChangeRealtime as fz, type AnalyzeTimbreOptions as g, type AnalyzerStats as h, Audio as i, init, isInitialized, type AutomationCurve as j, type Beat as k, type BindMicrophoneInputOptions as l, type BindWebMidiOptions as m, type BpmAnalysisResult as n, type BpmCandidate as o, type BrowserAudioDecodeOptions as p, popSonareEngineCommandRingBuffer, pushSonareEngineCommandRingBuffer, type BuiltinSynthBinding as q, type BuiltinSynthConfig as r, readSonareEngineTelemetryRingBuffer, readSonareMeterRingBuffer, readSonareSpectrumRingBuffer, registerSonareRealtimeEngineWorkletProcessor, registerSonareRealtimeVoiceChangerWorkletProcessor, registerSonareWorkletProcessor, type BuiltinSynthWaveform as s, sonareEngineCommandRingBufferByteLength, sonareEngineTelemetryRingBufferByteLength, sonareMeterRingBufferByteLength, sonareSpectrumRingBufferByteLength, type ChordAnalysisResult as t, type ChordChange as u, type ChordDetectionOptions as v, ChordQuality as w, writeSonareEngineTelemetryRingBuffer, type ChromaResult as x, type ClippingRegion as y, type ClippingReport as z };