@libraz/libsonare 1.1.0 → 1.2.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/dist/index.d.ts CHANGED
@@ -22,8 +22,25 @@ type PitchClass = (typeof PitchClass)[keyof typeof PitchClass];
22
22
  declare const Mode: {
23
23
  readonly Major: 0;
24
24
  readonly Minor: 1;
25
+ readonly Dorian: 2;
26
+ readonly Phrygian: 3;
27
+ readonly Lydian: 4;
28
+ readonly Mixolydian: 5;
29
+ readonly Locrian: 6;
25
30
  };
26
31
  type Mode = (typeof Mode)[keyof typeof Mode];
32
+ type TempogramMode = 'autocorrelation' | 'auto' | 'ac' | 'cosine' | 0 | 1;
33
+ declare const KeyProfile: {
34
+ readonly KrumhanslSchmuckler: 0;
35
+ readonly Temperley: 1;
36
+ readonly Shaath: 2;
37
+ readonly FaraldoEDMT: 3;
38
+ readonly FaraldoEDMA: 4;
39
+ readonly FaraldoEDMM: 5;
40
+ readonly BellmanBudge: 6;
41
+ };
42
+ type KeyProfile = (typeof KeyProfile)[keyof typeof KeyProfile];
43
+ type KeyProfileName = 'ks' | 'krumhansl' | 'temperley' | 'shaath' | 'keyfinder' | 'faraldo-edmt' | 'edmt' | 'faraldo-edma' | 'edma' | 'faraldo-edmm' | 'edmm' | 'bellman-budge' | 'bellman';
27
44
  /**
28
45
  * Chord quality
29
46
  */
@@ -37,8 +54,26 @@ declare const ChordQuality: {
37
54
  readonly Minor7: 6;
38
55
  readonly Sus2: 7;
39
56
  readonly Sus4: 8;
57
+ readonly Unknown: 9;
58
+ readonly Add9: 10;
59
+ readonly MinorAdd9: 11;
60
+ readonly Dim7: 12;
61
+ readonly HalfDim7: 13;
62
+ readonly Major9: 14;
63
+ readonly Dominant9: 15;
64
+ readonly Sus2Add4: 16;
40
65
  };
41
66
  type ChordQuality = (typeof ChordQuality)[keyof typeof ChordQuality];
67
+ type MasteringPreset = 'pop' | 'edm' | 'acoustic' | 'hipHop' | 'aiMusic' | 'speech' | 'streaming' | 'youtube' | 'broadcast' | 'podcast' | 'audiobook' | 'cinema' | 'jpop' | 'ambient' | 'lofi' | 'classical' | 'drumAndBass' | 'techno' | 'metal' | 'trap' | 'rnb' | 'jazz' | 'kpop' | 'trance' | 'gameOst';
68
+ interface StreamingPlatform {
69
+ name: string;
70
+ targetLufs: number;
71
+ ceilingDb: number;
72
+ }
73
+ type SoloProcessor = 'dynamics.brickwallLimiter' | 'dynamics.compressor' | 'dynamics.deesser' | 'dynamics.expander' | 'dynamics.gate' | 'dynamics.limiter' | 'dynamics.parallelComp' | 'dynamics.sidechainRouter' | 'dynamics.duckingProcessor' | 'dynamics.transientShaper' | 'dynamics.upwardCompressor' | 'dynamics.upwardExpander' | 'dynamics.vocalRider' | 'eq.apiStyle' | 'eq.bandPass' | 'eq.cutFilter' | 'eq.dynamic' | 'eq.equalizer' | 'eq.graphic' | 'eq.linearPhase' | 'eq.midSide' | 'eq.minimumPhase' | 'eq.parametric' | 'eq.pultec' | 'eq.shelving' | 'eq.tilt' | 'final.bitDepth' | 'final.dither' | 'final.outputChain' | 'maximizer.adaptiveRelease' | 'maximizer.loudnessOptimize' | 'maximizer.maximizer' | 'maximizer.softKneeMax' | 'maximizer.truePeakLimiter' | 'multiband.compressor' | 'multiband.dynamicEq' | 'multiband.expander' | 'multiband.imager' | 'multiband.limiter' | 'multiband.saturation' | 'repair.declick' | 'repair.declip' | 'repair.decrackle' | 'repair.dehum' | 'repair.denoiseClassical' | 'repair.dereverbClassical' | 'repair.trimSilence' | 'saturation.bitcrusher' | 'saturation.exciter' | 'saturation.hardClipper' | 'saturation.multibandExciter' | 'saturation.softClipper' | 'saturation.tape' | 'saturation.transformer' | 'saturation.tube' | 'saturation.waveshaper' | 'spectral.airBand' | 'spectral.lowEndFocus' | 'spectral.presenceEnhancer' | 'spectral.spectralShaper' | 'stereo.autoPan' | 'stereo.haasEnhancer' | 'stereo.imager' | 'stereo.monoMaker' | 'stereo.phaseAlign' | 'stereo.stereoBalance';
74
+ type PairProcessor = 'match.applyMatchEq' | 'match.alignReferenceToSource' | 'match.abSwitch' | 'match.abCrossfade';
75
+ type PairAnalysis = 'match.referenceLoudness' | 'match.tonalBalance' | 'match.tonalBalanceLogBands' | 'match.matchEqCurve' | 'match.estimateReferenceDelaySamples';
76
+ type StereoAnalysis = 'stereo.monoCompatCheck' | 'stereo.monoCompatCheckLogBands';
42
77
  /**
43
78
  * Section type
44
79
  */
@@ -50,6 +85,7 @@ declare const SectionType: {
50
85
  readonly Bridge: 4;
51
86
  readonly Instrumental: 5;
52
87
  readonly Outro: 6;
88
+ readonly Unknown: 7;
53
89
  };
54
90
  type SectionType = (typeof SectionType)[keyof typeof SectionType];
55
91
  /**
@@ -62,6 +98,36 @@ interface Key {
62
98
  name: string;
63
99
  shortName: string;
64
100
  }
101
+ interface KeyDetectionOptions {
102
+ nFft?: number;
103
+ hopLength?: number;
104
+ useHpss?: boolean;
105
+ loudnessWeighted?: boolean;
106
+ highPassHz?: number;
107
+ modes?: Mode[] | ('major' | 'minor' | 'dorian' | 'phrygian' | 'lydian' | 'mixolydian' | 'locrian')[] | 'major-minor' | 'all' | 'modal';
108
+ profile?: KeyProfile | KeyProfileName;
109
+ genreHint?: 'auto' | 'edm' | 'electronic' | 'dance' | 'pop' | 'classical' | 'jazz' | string;
110
+ }
111
+ interface KeyCandidate {
112
+ key: Key;
113
+ correlation: number;
114
+ }
115
+ interface ChordDetectionOptions {
116
+ minDuration?: number;
117
+ smoothingWindow?: number;
118
+ threshold?: number;
119
+ useTriadsOnly?: boolean;
120
+ nFft?: number;
121
+ hopLength?: number;
122
+ useBeatSync?: boolean;
123
+ useHmm?: boolean;
124
+ hmmBeamWidth?: number;
125
+ useKeyContext?: boolean;
126
+ keyRoot?: PitchClass;
127
+ keyMode?: Mode;
128
+ detectInversions?: boolean;
129
+ chromaMethod?: 'stft' | 'nnls';
130
+ }
65
131
  /**
66
132
  * Detected beat
67
133
  */
@@ -74,12 +140,16 @@ interface Beat {
74
140
  */
75
141
  interface Chord {
76
142
  root: PitchClass;
143
+ bass: PitchClass;
77
144
  quality: ChordQuality;
78
145
  start: number;
79
146
  end: number;
80
147
  confidence: number;
81
148
  name: string;
82
149
  }
150
+ interface ChordAnalysisResult {
151
+ chords: Chord[];
152
+ }
83
153
  /**
84
154
  * Detected section
85
155
  */
@@ -91,6 +161,45 @@ interface Section {
91
161
  confidence: number;
92
162
  name: string;
93
163
  }
164
+ /**
165
+ * A single melody contour point (mirrors the C `SonareMelodyPoint`).
166
+ */
167
+ interface MelodyPoint {
168
+ /** Frame time in seconds. */
169
+ time: number;
170
+ /** Estimated fundamental frequency in Hz (0 when unvoiced). */
171
+ frequency: number;
172
+ /** Voicing confidence in `[0, 1]`. */
173
+ confidence: number;
174
+ }
175
+ /**
176
+ * Melody analysis result (mirrors the C `SonareMelodyResult`).
177
+ */
178
+ interface MelodyResult {
179
+ points: MelodyPoint[];
180
+ pitchRangeOctaves: number;
181
+ pitchStability: number;
182
+ meanFrequency: number;
183
+ vibratoRate: number;
184
+ }
185
+ /**
186
+ * Constant-Q / Variable-Q transform magnitude result (mirrors the C
187
+ * `SonareCqtResult`).
188
+ */
189
+ interface CqtResult {
190
+ /** Number of frequency bins. */
191
+ nBins: number;
192
+ /** Number of time frames. */
193
+ nFrames: number;
194
+ /** Hop length in samples. */
195
+ hopLength: number;
196
+ /** Sample rate in Hz. */
197
+ sampleRate: number;
198
+ /** Row-major `[nBins x nFrames]` magnitude matrix. */
199
+ magnitude: Float32Array;
200
+ /** Center frequency (Hz) of each of the `nBins` bins. */
201
+ frequencies: Float32Array;
202
+ }
94
203
  /**
95
204
  * Timbre characteristics
96
205
  */
@@ -143,6 +252,22 @@ interface AnalysisResult {
143
252
  rhythm: RhythmFeatures;
144
253
  form: string;
145
254
  }
255
+ /**
256
+ * Room acoustic parameters from an impulse response
257
+ */
258
+ interface AcousticResult {
259
+ rt60: number;
260
+ edt: number;
261
+ c50: number;
262
+ c80: number;
263
+ d50: number;
264
+ rt60Bands: Float32Array;
265
+ edtBands: Float32Array;
266
+ c50Bands: Float32Array;
267
+ c80Bands: Float32Array;
268
+ confidence: number;
269
+ isBlind: boolean;
270
+ }
146
271
  /**
147
272
  * HPSS (Harmonic-Percussive Source Separation) result
148
273
  */
@@ -163,6 +288,68 @@ interface MasteringResult {
163
288
  latencySamples?: number;
164
289
  }
165
290
  type MasteringProcessorParams = Record<string, number | boolean>;
291
+ type PanMode = 'balance' | 'stereoPan' | 'stereo-pan' | 'dualPan' | 'dual-pan' | number;
292
+ interface MixOptions {
293
+ inputTrimDb?: number | number[];
294
+ faderDb?: number | number[];
295
+ pan?: number | number[];
296
+ panMode?: PanMode | PanMode[];
297
+ width?: number | number[];
298
+ muted?: boolean | boolean[];
299
+ }
300
+ interface MixMeterSnapshot {
301
+ peakDbL: number;
302
+ peakDbR: number;
303
+ rmsDbL: number;
304
+ rmsDbR: number;
305
+ correlation: number;
306
+ monoCompatWidth: number;
307
+ monoCompatPeak: number;
308
+ monoCompatSideRms: number;
309
+ likelyMonoCompatible: boolean;
310
+ momentaryLufs: number;
311
+ shortTermLufs: number;
312
+ integratedLufs: number;
313
+ gainReductionDb: number;
314
+ truePeakDbL: number;
315
+ truePeakDbR: number;
316
+ maxTruePeakDb: number;
317
+ seq: number;
318
+ }
319
+ interface MixResult {
320
+ left: Float32Array;
321
+ right: Float32Array;
322
+ sampleRate: number;
323
+ meters: MixMeterSnapshot[];
324
+ }
325
+ /** Mixed stereo master returned by {@link Mixer.processStereo}. */
326
+ interface MixerProcessResult {
327
+ left: Float32Array;
328
+ right: Float32Array;
329
+ sampleRate: number;
330
+ }
331
+ /**
332
+ * Interpolation curve for scheduled automation events
333
+ * (see {@link Mixer.scheduleInsertAutomation}).
334
+ */
335
+ type AutomationCurve = 'linear' | 'exponential' | 'hold' | 's-curve';
336
+ /**
337
+ * Pan law applied when computing left/right gains from a pan position
338
+ * (see {@link Mixer.setPanLaw}). Maps to the underlying integer code.
339
+ */
340
+ type PanLaw = 'const3dB' | 'const4.5dB' | 'const6dB' | 'linear0dB';
341
+ /**
342
+ * Meter tap point for reading a strip's meter snapshot
343
+ * (see {@link Mixer.meterTap} and {@link Mixer.stripMeter}).
344
+ */
345
+ type MeterTap = 'preFader' | 'postFader';
346
+ /** Pre/post-fader send timing (see {@link Mixer.addSend}). */
347
+ type SendTiming = 'preFader' | 'postFader';
348
+ /** A single goniometer (left/right) sample returned by {@link Mixer.readGoniometerLatest}. */
349
+ interface GoniometerPoint {
350
+ left: number;
351
+ right: number;
352
+ }
166
353
  interface MasteringChainConfig {
167
354
  repair?: {
168
355
  denoise?: boolean;
@@ -213,6 +400,7 @@ interface MasteringChainConfig {
213
400
  attackMs?: number;
214
401
  releaseMs?: number;
215
402
  rangeDb?: number;
403
+ bandpassQ?: number;
216
404
  };
217
405
  transientShaper?: {
218
406
  attackGainDb?: number;
@@ -349,6 +537,22 @@ interface MfccResult {
349
537
  nFrames: number;
350
538
  coefficients: Float32Array;
351
539
  }
540
+ /**
541
+ * STFT power spectrogram result (from inverse Mel reconstruction)
542
+ */
543
+ interface StftPowerResult {
544
+ nBins: number;
545
+ nFrames: number;
546
+ power: Float32Array;
547
+ }
548
+ /**
549
+ * Mel power spectrogram result (from inverse MFCC reconstruction)
550
+ */
551
+ interface MelPowerResult {
552
+ nMels: number;
553
+ nFrames: number;
554
+ power: Float32Array;
555
+ }
352
556
  /**
353
557
  * Chroma features result
354
558
  */
@@ -371,6 +575,87 @@ interface PitchResult {
371
575
  medianF0: number;
372
576
  meanF0: number;
373
577
  }
578
+ /**
579
+ * Loudness measurement result (EBU R128 / ITU-R BS.1770)
580
+ */
581
+ interface LufsResult {
582
+ integratedLufs: number;
583
+ momentaryLufs: number;
584
+ shortTermLufs: number;
585
+ loudnessRange: number;
586
+ }
587
+ /**
588
+ * Realtime equalizer spectrum snapshot.
589
+ *
590
+ * Mirrors the C++ `EqualizerSpectrumSnapshot`: `preLeft`/`preRight` and
591
+ * `postLeft`/`postRight` are the pre- and post-EQ spectrum streams (trimmed to
592
+ * their valid count). `bandGainDb` holds per-band applied gain (24 entries),
593
+ * `profileDb` the smoothed magnitude profile (16 entries), `lastAutoGainDb`
594
+ * the latest auto-gain compensation, and `seq` increments each time a new
595
+ * snapshot is published.
596
+ */
597
+ interface EqSpectrumSnapshot {
598
+ preLeft: Float32Array;
599
+ preRight: Float32Array;
600
+ postLeft: Float32Array;
601
+ postRight: Float32Array;
602
+ bandGainDb: Float32Array;
603
+ profileDb: Float32Array;
604
+ lastAutoGainDb: number;
605
+ seq: number;
606
+ }
607
+ /**
608
+ * Equalizer band type (string union mirroring `sonare::mastering::eq::EqBandType`).
609
+ */
610
+ type EqBandType = 'Peak' | 'LowShelf' | 'HighShelf' | 'LowPass' | 'HighPass' | 'BandPass' | 'Notch' | 'TiltShelf' | 'FlatTilt';
611
+ /** Biquad coefficient design mode. */
612
+ type EqCoeffMode = 'Rbj' | 'Vicanek';
613
+ /** Stereo placement for an EQ band. */
614
+ type EqStereoPlacement = 'Stereo' | 'Left' | 'Right' | 'Mid' | 'Side';
615
+ /** Per-band phase behaviour. */
616
+ type EqBandPhase = 'Inherit' | 'ZeroLatency' | 'NaturalPhase' | 'LinearPhase';
617
+ /**
618
+ * Equalizer band configuration accepted by {@link StreamingEqualizer.setBand}.
619
+ *
620
+ * All fields are optional; omitted values fall back to the C++ band defaults
621
+ * (Peak, 1000 Hz, 0 dB gain, Butterworth Q, disabled).
622
+ */
623
+ interface EqBand {
624
+ type?: EqBandType;
625
+ frequencyHz?: number;
626
+ gainDb?: number;
627
+ q?: number;
628
+ enabled?: boolean;
629
+ coeffMode?: EqCoeffMode;
630
+ slopeDbOct?: number;
631
+ placement?: EqStereoPlacement;
632
+ phase?: EqBandPhase;
633
+ soloed?: boolean;
634
+ bypassed?: boolean;
635
+ proportionalQ?: boolean;
636
+ proportionalQStrength?: number;
637
+ dynamic?: boolean;
638
+ thresholdDb?: number;
639
+ autoThreshold?: boolean;
640
+ ratio?: number;
641
+ rangeDb?: number;
642
+ attackMs?: number;
643
+ releaseMs?: number;
644
+ lookaheadMs?: number;
645
+ externalSidechain?: boolean;
646
+ sidechainFreqHz?: number;
647
+ sidechainQ?: number;
648
+ }
649
+ /** Construction options for {@link StreamingEqualizer}. */
650
+ interface StreamingEqualizerConfig {
651
+ sampleRate?: number;
652
+ maxBlockSize?: number;
653
+ }
654
+ /** Options for {@link StreamingEqualizer.match}. */
655
+ interface EqMatchOptions {
656
+ sampleRate?: number;
657
+ maxBands?: number;
658
+ }
374
659
 
375
660
  /**
376
661
  * A detected chord change in the progression
@@ -411,6 +696,7 @@ interface ProgressiveEstimate {
411
696
  chordRoot: PitchClass;
412
697
  chordQuality: ChordQuality;
413
698
  chordConfidence: number;
699
+ chordStartTime: number;
414
700
  chordProgression: ChordChange[];
415
701
  barChordProgression: BarChord[];
416
702
  currentBar: number;
@@ -449,6 +735,28 @@ interface FrameBuffer {
449
735
  chordQuality: Int32Array;
450
736
  chordConfidence: Float32Array;
451
737
  }
738
+ interface StreamFramesU8 {
739
+ nFrames: number;
740
+ nMels: number;
741
+ timestamps: Float32Array;
742
+ mel: Uint8Array;
743
+ chroma: Uint8Array;
744
+ onsetStrength: Uint8Array;
745
+ rmsEnergy: Uint8Array;
746
+ spectralCentroid: Uint8Array;
747
+ spectralFlatness: Uint8Array;
748
+ }
749
+ interface StreamFramesI16 {
750
+ nFrames: number;
751
+ nMels: number;
752
+ timestamps: Float32Array;
753
+ mel: Int16Array;
754
+ chroma: Int16Array;
755
+ onsetStrength: Int16Array;
756
+ rmsEnergy: Int16Array;
757
+ spectralCentroid: Int16Array;
758
+ spectralFlatness: Int16Array;
759
+ }
452
760
  /**
453
761
  * Configuration for StreamAnalyzer
454
762
  */
@@ -457,10 +765,20 @@ interface StreamConfig {
457
765
  nFft?: number;
458
766
  hopLength?: number;
459
767
  nMels?: number;
768
+ fmin?: number;
769
+ fmax?: number;
770
+ tuningRefHz?: number;
771
+ computeMagnitude?: boolean;
460
772
  computeMel?: boolean;
461
773
  computeChroma?: boolean;
462
774
  computeOnset?: boolean;
775
+ computeSpectral?: boolean;
463
776
  emitEveryNFrames?: number;
777
+ magnitudeDownsample?: number;
778
+ keyUpdateIntervalSec?: number;
779
+ bpmUpdateIntervalSec?: number;
780
+ window?: number;
781
+ outputFormat?: number;
464
782
  }
465
783
 
466
784
  type ProgressCallback = (progress: number, stage: string) => void;
@@ -478,6 +796,164 @@ interface WasmTempogramResult {
478
796
  winLength: number;
479
797
  data: Float32Array;
480
798
  }
799
+ interface WasmCyclicTempogramResult {
800
+ nFrames: number;
801
+ nBins: number;
802
+ data: Float32Array;
803
+ }
804
+ interface WasmFourierTempogramResult {
805
+ nBins: number;
806
+ nFrames: number;
807
+ data: Float32Array;
808
+ }
809
+ interface WasmNnlsChromaResult {
810
+ nChroma: number;
811
+ nFrames: number;
812
+ data: Float32Array;
813
+ }
814
+ interface WasmEngineClip {
815
+ id?: number;
816
+ channels: Float32Array[];
817
+ startPpq: number;
818
+ lengthSamples?: number;
819
+ clipOffsetSamples?: number;
820
+ loop?: boolean;
821
+ gain?: number;
822
+ fadeInSamples?: number;
823
+ fadeOutSamples?: number;
824
+ }
825
+ interface WasmEngineParameterInfo {
826
+ id: number;
827
+ name: string;
828
+ unit: string;
829
+ minValue: number;
830
+ maxValue: number;
831
+ defaultValue: number;
832
+ rtSafe: boolean;
833
+ defaultCurve: number;
834
+ }
835
+ interface WasmEngineAutomationPoint {
836
+ ppq: number;
837
+ value: number;
838
+ curveToNext?: number;
839
+ }
840
+ interface WasmEngineMarker {
841
+ id: number;
842
+ ppq: number;
843
+ name?: string;
844
+ }
845
+ interface WasmEngineMetronomeConfig {
846
+ enabled: boolean;
847
+ beatGain?: number;
848
+ accentGain?: number;
849
+ clickSamples?: number;
850
+ }
851
+ interface WasmEngineGraphNode {
852
+ id: string;
853
+ type?: number;
854
+ gainDb?: number;
855
+ numPorts?: number;
856
+ }
857
+ interface WasmEngineGraphConnection {
858
+ sourceNode: string;
859
+ sourcePort: number;
860
+ destNode: string;
861
+ destPort: number;
862
+ mix?: number;
863
+ }
864
+ interface WasmEngineGraphParameterBinding {
865
+ paramId: number;
866
+ nodeId: string;
867
+ }
868
+ interface WasmEngineGraphSpec {
869
+ nodes: WasmEngineGraphNode[];
870
+ connections: WasmEngineGraphConnection[];
871
+ inputNode: string;
872
+ outputNode: string;
873
+ numChannels: number;
874
+ parameterBindings?: WasmEngineGraphParameterBinding[];
875
+ }
876
+ interface WasmEngineTelemetry {
877
+ type: number;
878
+ error: number;
879
+ renderFrame: number;
880
+ timelineSample: number;
881
+ audibleTimelineSample: number;
882
+ graphLatencySamplesQ8: number;
883
+ value: number;
884
+ }
885
+ interface WasmEngineMeterTelemetry {
886
+ targetId: number;
887
+ renderFrame: number;
888
+ seq: number;
889
+ peakDbL: number;
890
+ peakDbR: number;
891
+ rmsDbL: number;
892
+ rmsDbR: number;
893
+ truePeakDbL: number;
894
+ truePeakDbR: number;
895
+ maxTruePeakDb: number;
896
+ correlation: number;
897
+ monoCompatWidth: number;
898
+ momentaryLufs: number;
899
+ shortTermLufs: number;
900
+ integratedLufs: number;
901
+ gainReductionDb: number;
902
+ droppedRecords: number;
903
+ }
904
+ interface WasmEngineCaptureStatus {
905
+ capturedFrames: number;
906
+ overflowCount: number;
907
+ armed: boolean;
908
+ punchEnabled: boolean;
909
+ }
910
+ interface WasmEngineTransportState {
911
+ playing: boolean;
912
+ looping: boolean;
913
+ renderFrame: number;
914
+ samplePosition: number;
915
+ ppq: number;
916
+ bpm: number;
917
+ loopStartPpq: number;
918
+ loopEndPpq: number;
919
+ sampleRate: number;
920
+ }
921
+ interface WasmEngineBounceOptions {
922
+ totalFrames: number;
923
+ blockSize?: number;
924
+ numChannels?: number;
925
+ targetSampleRate?: number;
926
+ sourceSampleRate?: number;
927
+ normalizeLufs?: boolean;
928
+ targetLufs?: number;
929
+ dither?: 0 | 1 | 2 | 3;
930
+ ditherBits?: number;
931
+ ditherSeed?: number;
932
+ }
933
+ interface WasmEngineBounceResult {
934
+ interleaved: Float32Array;
935
+ frames: number;
936
+ numChannels: number;
937
+ sampleRate: number;
938
+ integratedLufs: number;
939
+ }
940
+ interface WasmEngineFreezeOptions {
941
+ totalFrames: number;
942
+ blockSize?: number;
943
+ numChannels?: number;
944
+ clipId?: number;
945
+ startPpq?: number;
946
+ gain?: number;
947
+ }
948
+ interface WasmEngineFreezeResult {
949
+ clipId: number;
950
+ frames: number;
951
+ numChannels: number;
952
+ }
953
+ interface WasmEngineProcessWithMonitorResult {
954
+ output: Float32Array[];
955
+ monitor: Float32Array[];
956
+ }
481
957
 
482
958
  /**
483
959
  * sonare - Audio Analysis Library
@@ -499,6 +975,37 @@ interface WasmTempogramResult {
499
975
  * ```
500
976
  */
501
977
 
978
+ type EngineClip = WasmEngineClip;
979
+ type EngineParameterInfo = WasmEngineParameterInfo;
980
+ type EngineAutomationPoint = WasmEngineAutomationPoint;
981
+ type EngineMarker = WasmEngineMarker;
982
+ type EngineMetronomeConfig = WasmEngineMetronomeConfig;
983
+ type EngineGraphSpec = WasmEngineGraphSpec;
984
+ type EngineCaptureStatus = WasmEngineCaptureStatus;
985
+ type EngineBounceOptions = WasmEngineBounceOptions;
986
+ type EngineBounceResult = WasmEngineBounceResult;
987
+ type EngineFreezeOptions = WasmEngineFreezeOptions;
988
+ type EngineFreezeResult = WasmEngineFreezeResult;
989
+ type EngineTelemetry = WasmEngineTelemetry;
990
+ type EngineMeterTelemetry = WasmEngineMeterTelemetry;
991
+ type EngineTransportState = WasmEngineTransportState;
992
+ declare const EXPECTED_ENGINE_ABI_VERSION = 2;
993
+ interface EngineCapabilities {
994
+ engineAbiVersion: number;
995
+ expectedEngineAbiVersion: number;
996
+ abiCompatible: boolean;
997
+ sharedArrayBuffer: boolean;
998
+ atomics: boolean;
999
+ audioWorklet: boolean;
1000
+ mode: 'sab' | 'postMessage';
1001
+ }
1002
+ interface MixerRealtimeBuffer {
1003
+ leftInputs: Float32Array[];
1004
+ rightInputs: Float32Array[];
1005
+ outLeft: Float32Array;
1006
+ outRight: Float32Array;
1007
+ process: (numSamples?: number) => void;
1008
+ }
502
1009
  /**
503
1010
  * Initialize the WASM module.
504
1011
  * Must be called before using any analysis functions.
@@ -517,6 +1024,60 @@ declare function isInitialized(): boolean;
517
1024
  * Get the library version.
518
1025
  */
519
1026
  declare function version(): string;
1027
+ declare function engineAbiVersion(): number;
1028
+ declare function engineCapabilities(): EngineCapabilities;
1029
+ declare class RealtimeEngine {
1030
+ private native;
1031
+ constructor(sampleRate?: number, maxBlockSize?: number, commandCapacity?: number, telemetryCapacity?: number);
1032
+ prepare(sampleRate: number, maxBlockSize: number, commandCapacity?: number, telemetryCapacity?: number): void;
1033
+ /** Queue a sample-accurate parameter change (engine kSetParam). */
1034
+ setParameter(paramId: number, value: number, renderFrame?: number): void;
1035
+ /** Queue a smoothed parameter change (engine kSetParamSmoothed). */
1036
+ setParameterSmoothed(paramId: number, value: number, renderFrame?: number): void;
1037
+ /** Read back the current transport state snapshot. */
1038
+ getTransportState(): EngineTransportState;
1039
+ play(renderFrame?: number): void;
1040
+ stop(renderFrame?: number): void;
1041
+ seekSample(timelineSample: number, renderFrame?: number): void;
1042
+ seekPpq(ppq: number, renderFrame?: number): void;
1043
+ setTempo(bpm: number): void;
1044
+ setTimeSignature(numerator: number, denominator: number): void;
1045
+ setLoop(startPpq: number, endPpq: number, enabled?: boolean): void;
1046
+ addParameter(info: EngineParameterInfo): void;
1047
+ parameterCount(): number;
1048
+ parameterInfoByIndex(index: number): EngineParameterInfo;
1049
+ parameterInfo(id: number): EngineParameterInfo;
1050
+ setAutomationLane(paramId: number, points: EngineAutomationPoint[]): void;
1051
+ automationLaneCount(): number;
1052
+ setMarkers(markers: EngineMarker[]): void;
1053
+ markerCount(): number;
1054
+ markerByIndex(index: number): EngineMarker;
1055
+ marker(id: number): EngineMarker;
1056
+ seekMarker(markerId: number, renderFrame?: number): void;
1057
+ setLoopFromMarkers(startMarkerId: number, endMarkerId: number): void;
1058
+ setMetronome(config: EngineMetronomeConfig): void;
1059
+ metronome(): Required<EngineMetronomeConfig>;
1060
+ countInEndSample(startSample: number, bars: number): number;
1061
+ setGraph(spec: EngineGraphSpec): void;
1062
+ graphNodeCount(): number;
1063
+ graphConnectionCount(): number;
1064
+ setClips(clips: EngineClip[]): void;
1065
+ clipCount(): number;
1066
+ setCaptureBuffer(numChannels: number, capacityFrames: number): void;
1067
+ armCapture(armed?: boolean): void;
1068
+ setCapturePunch(startSample: number, endSample: number, enabled?: boolean): void;
1069
+ resetCapture(): void;
1070
+ captureStatus(): EngineCaptureStatus;
1071
+ capturedAudio(): Float32Array[];
1072
+ process(channels: Float32Array[]): Float32Array[];
1073
+ processWithMonitor(channels: Float32Array[]): WasmEngineProcessWithMonitorResult;
1074
+ renderOffline(channels: Float32Array[], blockSize?: number): Float32Array[];
1075
+ bounceOffline(options: EngineBounceOptions): EngineBounceResult;
1076
+ freezeOffline(options: EngineFreezeOptions): EngineFreezeResult;
1077
+ drainTelemetry(maxRecords?: number): EngineTelemetry[];
1078
+ drainMeterTelemetry(maxRecords?: number): EngineMeterTelemetry[];
1079
+ destroy(): void;
1080
+ }
520
1081
  /**
521
1082
  * Detect BPM from audio samples.
522
1083
  *
@@ -532,7 +1093,8 @@ declare function detectBpm(samples: Float32Array, sampleRate: number): number;
532
1093
  * @param sampleRate - Sample rate in Hz
533
1094
  * @returns Detected key
534
1095
  */
535
- declare function detectKey(samples: Float32Array, sampleRate: number): Key;
1096
+ declare function detectKey(samples: Float32Array, sampleRate: number, options?: KeyDetectionOptions): Key;
1097
+ declare function detectKeyCandidates(samples: Float32Array, sampleRate: number, options?: KeyDetectionOptions): KeyCandidate[];
536
1098
  /**
537
1099
  * Detect onset times from audio samples.
538
1100
  *
@@ -549,6 +1111,23 @@ declare function detectOnsets(samples: Float32Array, sampleRate: number): Float3
549
1111
  * @returns Array of beat times in seconds
550
1112
  */
551
1113
  declare function detectBeats(samples: Float32Array, sampleRate: number): Float32Array;
1114
+ /**
1115
+ * Detect downbeat times from audio samples.
1116
+ *
1117
+ * @param samples - Audio samples (mono, float32)
1118
+ * @param sampleRate - Sample rate in Hz
1119
+ * @returns Array of downbeat times in seconds
1120
+ */
1121
+ declare function detectDownbeats(samples: Float32Array, sampleRate: number): Float32Array;
1122
+ /**
1123
+ * Detect chords from audio samples.
1124
+ *
1125
+ * @param samples - Audio samples (mono, float32)
1126
+ * @param sampleRate - Sample rate in Hz
1127
+ * @param options - Optional chord detection settings
1128
+ * @returns Detected chord segments
1129
+ */
1130
+ declare function detectChords(samples: Float32Array, sampleRate: number, options?: ChordDetectionOptions): ChordAnalysisResult;
552
1131
  /**
553
1132
  * Perform complete music analysis.
554
1133
  *
@@ -557,6 +1136,8 @@ declare function detectBeats(samples: Float32Array, sampleRate: number): Float32
557
1136
  * @returns Complete analysis result
558
1137
  */
559
1138
  declare function analyze(samples: Float32Array, sampleRate: number): AnalysisResult;
1139
+ declare function analyzeImpulseResponse(samples: Float32Array, sampleRate: number, nOctaveBands?: number): AcousticResult;
1140
+ declare function detectAcoustic(samples: Float32Array, sampleRate: number, nOctaveBands?: number, nThirdOctaveSubbands?: number, minDecayDb?: number, noiseFloorMarginDb?: number): AcousticResult;
560
1141
  /**
561
1142
  * Perform complete music analysis with progress reporting.
562
1143
  *
@@ -610,6 +1191,37 @@ declare function timeStretch(samples: Float32Array, sampleRate: number, rate: nu
610
1191
  * @returns Pitch-shifted audio
611
1192
  */
612
1193
  declare function pitchShift(samples: Float32Array, sampleRate: number, semitones: number): Float32Array;
1194
+ /**
1195
+ * Pitch-correct audio from a current MIDI note to a target MIDI note.
1196
+ *
1197
+ * @param samples - Audio samples (mono, float32)
1198
+ * @param sampleRate - Sample rate in Hz
1199
+ * @param currentMidi - Detected/current MIDI note number
1200
+ * @param targetMidi - Desired MIDI note number
1201
+ * @returns Pitch-corrected audio
1202
+ */
1203
+ declare function pitchCorrectToMidi(samples: Float32Array, sampleRate: number, currentMidi: number, targetMidi: number): Float32Array;
1204
+ /**
1205
+ * Time-stretch a note region between two sample offsets without changing pitch.
1206
+ *
1207
+ * @param samples - Audio samples (mono, float32)
1208
+ * @param sampleRate - Sample rate in Hz
1209
+ * @param onsetSample - Note onset position in samples
1210
+ * @param offsetSample - Note offset position in samples
1211
+ * @param stretchRatio - Stretch ratio (0.5 = double duration, 2.0 = half duration)
1212
+ * @returns Audio with the note region stretched
1213
+ */
1214
+ declare function noteStretch(samples: Float32Array, sampleRate: number, onsetSample: number, offsetSample: number, stretchRatio: number): Float32Array;
1215
+ /**
1216
+ * Apply a voice change by shifting pitch and formants independently.
1217
+ *
1218
+ * @param samples - Audio samples (mono, float32)
1219
+ * @param sampleRate - Sample rate in Hz
1220
+ * @param pitchSemitones - Pitch shift in semitones
1221
+ * @param formantFactor - Formant scaling factor (1.0 = unchanged)
1222
+ * @returns Voice-changed audio
1223
+ */
1224
+ declare function voiceChange(samples: Float32Array, sampleRate: number, pitchSemitones: number, formantFactor: number): Float32Array;
613
1225
  /**
614
1226
  * Normalize audio to target peak level.
615
1227
  *
@@ -630,15 +1242,18 @@ declare function normalize(samples: Float32Array, sampleRate: number, targetDb?:
630
1242
  * @returns Processed audio and loudness metadata
631
1243
  */
632
1244
  declare function mastering(samples: Float32Array, sampleRate: number, targetLufs?: number, ceilingDb?: number, truePeakOversample?: number): MasteringResult;
633
- declare function masteringProcessorNames(): string[];
634
- declare function masteringPairProcessorNames(): string[];
635
- declare function masteringPairAnalysisNames(): string[];
636
- declare function masteringStereoAnalysisNames(): string[];
637
- declare function masteringProcess(processorName: string, samples: Float32Array, sampleRate: number, params?: MasteringProcessorParams): MasteringResult;
638
- declare function masteringProcessStereo(processorName: string, left: Float32Array, right: Float32Array, sampleRate: number, params?: MasteringProcessorParams): MasteringStereoResult;
639
- declare function masteringPairProcess(processorName: string, source: Float32Array, reference: Float32Array, sampleRate: number, params?: MasteringProcessorParams): MasteringResult;
640
- declare function masteringPairAnalyze(analysisName: string, source: Float32Array, reference: Float32Array, sampleRate: number, params?: MasteringProcessorParams): string;
641
- declare function masteringStereoAnalyze(analysisName: string, left: Float32Array, right: Float32Array, sampleRate: number, params?: MasteringProcessorParams): string;
1245
+ declare function masteringProcessorNames(): SoloProcessor[];
1246
+ declare function masteringPairProcessorNames(): PairProcessor[];
1247
+ declare function masteringPairAnalysisNames(): PairAnalysis[];
1248
+ declare function masteringStereoAnalysisNames(): StereoAnalysis[];
1249
+ declare function masteringProcess(processorName: SoloProcessor, samples: Float32Array, sampleRate: number, params?: MasteringProcessorParams): MasteringResult;
1250
+ declare function masteringProcessStereo(processorName: SoloProcessor, left: Float32Array, right: Float32Array, sampleRate: number, params?: MasteringProcessorParams): MasteringStereoResult;
1251
+ declare function masteringPairProcess(processorName: PairProcessor, source: Float32Array, reference: Float32Array, sampleRate: number, params?: MasteringProcessorParams): MasteringResult;
1252
+ declare function masteringPairAnalyze(analysisName: PairAnalysis, source: Float32Array, reference: Float32Array, sampleRate: number, params?: MasteringProcessorParams): string;
1253
+ declare function masteringStereoAnalyze(analysisName: StereoAnalysis, left: Float32Array, right: Float32Array, sampleRate: number, params?: MasteringProcessorParams): string;
1254
+ declare function masteringAssistantSuggest(samples: Float32Array, sampleRate: number, params?: MasteringProcessorParams): string;
1255
+ declare function masteringAudioProfile(samples: Float32Array, sampleRate: number, params?: MasteringProcessorParams): string;
1256
+ declare function masteringStreamingPreview(samples: Float32Array, sampleRate: number, platforms?: StreamingPlatform[]): string;
642
1257
  /**
643
1258
  * Apply a configurable mastering chain in WASM.
644
1259
  *
@@ -684,7 +1299,7 @@ declare function masteringChainStereoWithProgress(left: Float32Array, right: Flo
684
1299
  *
685
1300
  * @returns Preset names in display order (e.g. "pop", "edm", "aiMusic")
686
1301
  */
687
- declare function masteringPresetNames(): string[];
1302
+ declare function masteringPresetNames(): MasteringPreset[];
688
1303
  /**
689
1304
  * Apply a named mastering preset chain to mono audio.
690
1305
  *
@@ -694,7 +1309,7 @@ declare function masteringPresetNames(): string[];
694
1309
  * @param overrides - Optional flat overrides (dot-notation, e.g. `'loudness.targetLufs'`) applied on top of the preset. Pass `null` for preset defaults.
695
1310
  * @returns Processed audio, loudness metadata, and applied stage names
696
1311
  */
697
- declare function masterAudio(samples: Float32Array, sampleRate: number, presetName: string, overrides?: Record<string, number | boolean> | null): MasteringChainResult;
1312
+ declare function masterAudio(samples: Float32Array, sampleRate: number, presetName: MasteringPreset, overrides?: Record<string, number | boolean> | null): MasteringChainResult;
698
1313
  /**
699
1314
  * Apply a named mastering preset chain to stereo audio.
700
1315
  *
@@ -705,7 +1320,18 @@ declare function masterAudio(samples: Float32Array, sampleRate: number, presetNa
705
1320
  * @param overrides - Optional flat overrides (dot-notation, e.g. `'loudness.targetLufs'`) applied on top of the preset. Pass `null` for preset defaults.
706
1321
  * @returns Processed stereo audio, loudness metadata, and applied stage names
707
1322
  */
708
- declare function masterAudioStereo(left: Float32Array, right: Float32Array, sampleRate: number, presetName: string, overrides?: Record<string, number | boolean> | null): MasteringStereoChainResult;
1323
+ declare function masterAudioStereo(left: Float32Array, right: Float32Array, sampleRate: number, presetName: MasteringPreset, overrides?: Record<string, number | boolean> | null): MasteringStereoChainResult;
1324
+ declare function mixingScenePresetNames(): string[];
1325
+ /**
1326
+ * Get a built-in mixing scene preset serialized as JSON. This is the canonical
1327
+ * name shared with the Node and Python bindings; the returned JSON loads
1328
+ * directly into a {@link Mixer} via {@link Mixer.fromSceneJson}.
1329
+ *
1330
+ * @param preset - Preset name (see {@link mixingScenePresetNames})
1331
+ * @returns Scene JSON string
1332
+ */
1333
+ declare function mixingScenePresetJson(preset: string): string;
1334
+ declare function mixStereo(leftChannels: Float32Array[], rightChannels: Float32Array[], sampleRate?: number, options?: MixOptions): MixResult;
709
1335
  /**
710
1336
  * Block-by-block streaming variant of {@link masteringChain}.
711
1337
  *
@@ -758,6 +1384,305 @@ declare class StreamingMasteringChain {
758
1384
  /** Release the underlying WASM object. Safe to call only once. */
759
1385
  delete(): void;
760
1386
  }
1387
+ /**
1388
+ * Block-by-block streaming equalizer wrapping the unified C++
1389
+ * `EqualizerProcessor` (up to 24 bands, RBJ/Vicanek biquads, dynamic EQ,
1390
+ * linear-phase FIR, mid/side processing, and auto-gain).
1391
+ *
1392
+ * State is maintained across {@link processMono}/{@link processStereo} calls.
1393
+ * Call {@link delete} (or use `try/finally`) to release the underlying WASM
1394
+ * object — the embind handle is not garbage-collected automatically.
1395
+ *
1396
+ * @example
1397
+ * ```typescript
1398
+ * const eq = new StreamingEqualizer({ sampleRate: 48000, maxBlockSize: 512 });
1399
+ * try {
1400
+ * eq.setBand(0, { type: 'HighShelf', frequencyHz: 8000, gainDb: 6, enabled: true });
1401
+ * const out = eq.processStereo(left, right);
1402
+ * const snapshot = eq.spectrum();
1403
+ * } finally {
1404
+ * eq.delete();
1405
+ * }
1406
+ * ```
1407
+ */
1408
+ declare class StreamingEqualizer {
1409
+ private eq;
1410
+ constructor(config?: StreamingEqualizerConfig);
1411
+ /**
1412
+ * Configure the band at `index` (0..23). Omitted fields use C++ defaults.
1413
+ */
1414
+ setBand(index: number, band: EqBand): void;
1415
+ /** Disable and reset every band. */
1416
+ clear(): void;
1417
+ /**
1418
+ * Set the global phase mode: 1=ZeroLatency, 2=NaturalPhase, 3=LinearPhase.
1419
+ */
1420
+ setPhaseMode(mode: number): void;
1421
+ /** Enable or disable output auto-gain compensation. */
1422
+ setAutoGain(enabled: boolean): void;
1423
+ /** Set all-band EQ gain scale as a 0.0..2.0 multiplier. */
1424
+ setGainScale(scale: number): void;
1425
+ /** Set post-EQ output gain in dB. */
1426
+ setOutputGainDb(gainDb: number): void;
1427
+ /** Set post-EQ stereo balance in -1.0..1.0; mono input ignores pan. */
1428
+ setOutputPan(pan: number): void;
1429
+ /**
1430
+ * Provide a mono external sidechain key for dynamic bands that opt into
1431
+ * `external_sidechain`. The samples are copied into an owned buffer.
1432
+ */
1433
+ setSidechainMono(samples: Float32Array): void;
1434
+ /**
1435
+ * Provide a stereo external sidechain key. Both channels must match length.
1436
+ */
1437
+ setSidechainStereo(left: Float32Array, right: Float32Array): void;
1438
+ /** Release any borrowed external sidechain buffers. */
1439
+ clearSidechain(): void;
1440
+ /** Auto-gain applied on the most recent block, in dB. */
1441
+ lastAutoGainDb(): number;
1442
+ /** Reported processing latency in samples (non-zero for linear-phase bands). */
1443
+ latencySamples(): number;
1444
+ /**
1445
+ * Process one mono block, returning the equalized samples (same length).
1446
+ */
1447
+ processMono(samples: Float32Array): Float32Array;
1448
+ /**
1449
+ * Process one stereo block, returning the equalized channels.
1450
+ */
1451
+ processStereo(left: Float32Array, right: Float32Array): {
1452
+ left: Float32Array;
1453
+ right: Float32Array;
1454
+ };
1455
+ /**
1456
+ * Read the latest pre/post spectrum snapshot for metering. `seq` increments
1457
+ * each time a new snapshot is published.
1458
+ */
1459
+ spectrum(): EqSpectrumSnapshot;
1460
+ /**
1461
+ * Configure bands so the source spectrum matches the reference spectrum.
1462
+ *
1463
+ * @param source - Source audio (mono samples)
1464
+ * @param reference - Reference audio (mono samples)
1465
+ * @param options - `sampleRate` (default 48000) and `maxBands` (default 8)
1466
+ */
1467
+ match(source: Float32Array, reference: Float32Array, options?: EqMatchOptions): void;
1468
+ /** Release the underlying WASM object. Safe to call only once. */
1469
+ delete(): void;
1470
+ }
1471
+ /**
1472
+ * Get a built-in mixing scene preset serialized as JSON, normalized through the
1473
+ * C mixer API (the same path {@link Mixer.fromSceneJson} uses to load it).
1474
+ *
1475
+ * @deprecated Use {@link mixingScenePresetJson}, the canonical name shared with
1476
+ * the Node and Python bindings. This alias is retained for backwards
1477
+ * compatibility and may be removed in a future release. Both functions return a
1478
+ * scene JSON string that loads cleanly into a {@link Mixer}.
1479
+ *
1480
+ * @param preset - Preset name (see {@link mixingScenePresetNames})
1481
+ * @returns Scene JSON string
1482
+ */
1483
+ declare function mixerScenePresetJson(preset: string): string;
1484
+ /**
1485
+ * Persistent, scene-based stereo mixer.
1486
+ *
1487
+ * Build one from a scene JSON string (e.g. {@link mixerScenePresetJson} or a
1488
+ * hand-authored scene), then feed per-strip stereo blocks through
1489
+ * {@link processStereo} to get the routed stereo master. Strips, sends, buses,
1490
+ * and inserts are described entirely by the scene; the routing graph is
1491
+ * compiled lazily on the first {@link processStereo} call (or eagerly via
1492
+ * {@link compile}).
1493
+ *
1494
+ * Call {@link delete} (or use a `try/finally`) to release the underlying WASM
1495
+ * object — the embind handle is not garbage-collected automatically.
1496
+ *
1497
+ * @example
1498
+ * ```typescript
1499
+ * const mixer = Mixer.fromSceneJson(mixerScenePresetJson('basicStereo'), 48000, 512);
1500
+ * try {
1501
+ * const out = mixer.processStereo([stripL], [stripR]);
1502
+ * } finally {
1503
+ * mixer.delete();
1504
+ * }
1505
+ * ```
1506
+ */
1507
+ declare class Mixer {
1508
+ private mixer;
1509
+ private constructor();
1510
+ /**
1511
+ * Build a mixer from a scene JSON string.
1512
+ *
1513
+ * @param json - Scene JSON (strips, buses, sends, connections, inserts)
1514
+ * @param sampleRate - Sample rate in Hz (default: 48000)
1515
+ * @param blockSize - Maximum block size per {@link processStereo} call (default: 512)
1516
+ */
1517
+ static fromSceneJson(json: string, sampleRate?: number, blockSize?: number): Mixer;
1518
+ /** Rebuild and compile the routing graph from the current scene topology. */
1519
+ compile(): void;
1520
+ /**
1521
+ * Mix one block of per-strip stereo audio into the stereo master.
1522
+ *
1523
+ * @param leftChannels - `leftChannels[i]` is the left channel of strip `i`
1524
+ * @param rightChannels - `rightChannels[i]` is the right channel of strip `i`
1525
+ * @returns Mixed stereo master (`left`, `right`, `sampleRate`)
1526
+ */
1527
+ processStereo(leftChannels: Float32Array[], rightChannels: Float32Array[]): MixerProcessResult;
1528
+ /**
1529
+ * Mix one block into caller-owned output arrays.
1530
+ *
1531
+ * This avoids allocating the result object and result `Float32Array`s. It is
1532
+ * intended for realtime bridges such as AudioWorklet; the input channel count
1533
+ * must match the scene strip count and all arrays must have the same length.
1534
+ */
1535
+ processStereoInto(leftChannels: Float32Array[], rightChannels: Float32Array[], outLeft: Float32Array, outRight: Float32Array): void;
1536
+ /**
1537
+ * Create reusable WASM-heap input/output views for realtime-style processing.
1538
+ *
1539
+ * Fill `leftInputs[i]` / `rightInputs[i]`, call `process()`, then read
1540
+ * `outLeft` / `outRight`. The views are owned by this mixer and become invalid
1541
+ * after {@link delete}.
1542
+ */
1543
+ createRealtimeBuffer(): MixerRealtimeBuffer;
1544
+ /** Number of strips in the mixer (e.g. strips loaded from the scene). */
1545
+ stripCount(): number;
1546
+ /**
1547
+ * Schedule sample-accurate insert-parameter automation on a strip's insert.
1548
+ *
1549
+ * @param stripIndex - Strip index in `[0, stripCount())`
1550
+ * @param insertIndex - Index into the strip's combined insert sequence
1551
+ * (`[pre-inserts... post-inserts...]`)
1552
+ * @param paramId - Processor-specific parameter id
1553
+ * @param samplePos - Absolute samples from the start of processing (the mixer
1554
+ * advances an internal position from 0 on the first {@link processStereo}
1555
+ * call; recompiling resets it to 0)
1556
+ * @param value - Target parameter value
1557
+ * @param curve - Interpolation curve (default: `'linear'`)
1558
+ * @throws If the strip index is out of range or the schedule call fails
1559
+ * (unknown curve, out-of-range insert index, or full event lane)
1560
+ */
1561
+ scheduleInsertAutomation(stripIndex: number, insertIndex: number, paramId: number, samplePos: number, value: number, curve?: AutomationCurve): void;
1562
+ /**
1563
+ * Resolve a strip's index in `[0, stripCount())` from its scene id, or `null`
1564
+ * when no strip with that id exists (matches the Node binding's `number | null`).
1565
+ */
1566
+ stripById(id: string): number | null;
1567
+ /**
1568
+ * Add a bus to the mixer topology. `role` is one of `'master'`, `'aux'`, or
1569
+ * `'submix'` (defaults to `'aux'`). Marks the routing graph dirty; call
1570
+ * {@link compile} (or {@link processStereo}) to rebuild.
1571
+ */
1572
+ addBus(id: string, role?: string): void;
1573
+ /** Remove a bus by id. Marks the routing graph dirty. */
1574
+ removeBus(id: string): void;
1575
+ /** Number of buses in the mixer topology. */
1576
+ busCount(): number;
1577
+ /**
1578
+ * Add a VCA group with the given gain offset (dB). `members` is a list of
1579
+ * strip ids governed by the group (may be empty).
1580
+ */
1581
+ addVcaGroup(id: string, gainDb?: number, members?: string[]): void;
1582
+ /** Remove a VCA group by id. */
1583
+ removeVcaGroup(id: string): void;
1584
+ /** Number of VCA groups in the mixer topology. */
1585
+ vcaGroupCount(): number;
1586
+ /**
1587
+ * Set a strip's solo state. Takes effect on the next process without a
1588
+ * graph recompile.
1589
+ */
1590
+ setSoloed(stripIndex: number, soloed: boolean): void;
1591
+ /**
1592
+ * Mark a strip solo-safe so it is never implied-muted by another strip's
1593
+ * solo. Takes effect on the next process without a graph recompile.
1594
+ */
1595
+ setSoloSafe(stripIndex: number, soloSafe: boolean): void;
1596
+ /** Invert the polarity of the left and/or right channel of a strip. */
1597
+ setPolarityInvert(stripIndex: number, invertLeft: boolean, invertRight: boolean): void;
1598
+ /** Set the strip's pan law. */
1599
+ setPanLaw(stripIndex: number, panLaw: PanLaw | number): void;
1600
+ /**
1601
+ * Set a per-strip channel delay in samples. This changes the strip's reported
1602
+ * latency; recompile to re-run latency compensation.
1603
+ */
1604
+ setChannelDelaySamples(stripIndex: number, delaySamples: number): void;
1605
+ /** Set the strip's live VCA gain offset in dB (not persisted to the scene). */
1606
+ setVcaOffsetDb(stripIndex: number, offsetDb: number): void;
1607
+ /** Set independent left/right pan positions (dual-pan mode). */
1608
+ setDualPan(stripIndex: number, leftPan: number, rightPan: number): void;
1609
+ /**
1610
+ * Add a send to a strip after construction.
1611
+ *
1612
+ * @param stripIndex - Strip index in `[0, stripCount())`
1613
+ * @param id - Send id
1614
+ * @param destinationBusId - Destination bus id
1615
+ * @param sendDb - Initial send level in dB
1616
+ * @param timing - `'preFader'` or `'postFader'` (default: `'postFader'`)
1617
+ * @returns The new send's index
1618
+ */
1619
+ addSend(stripIndex: number, id: string, destinationBusId: string, sendDb: number, timing?: SendTiming | number): number;
1620
+ /** Set the send level (in dB) for an existing send by index. */
1621
+ setSendDb(stripIndex: number, sendIndex: number, sendDb: number): void;
1622
+ /**
1623
+ * Read a strip's meter snapshot at the given tap point.
1624
+ *
1625
+ * @param stripIndex - Strip index in `[0, stripCount())`
1626
+ * @param tap - `'preFader'` or `'postFader'` (default: `'postFader'`)
1627
+ */
1628
+ meterTap(stripIndex: number, tap?: MeterTap): MixMeterSnapshot;
1629
+ /**
1630
+ * Read a strip's meter snapshot. Alias of {@link meterTap}, provided for
1631
+ * cross-binding (Node/Python) parity.
1632
+ *
1633
+ * @param stripIndex - Strip index in `[0, stripCount())`
1634
+ * @param tap - `'preFader'` or `'postFader'` (default: `'postFader'`)
1635
+ */
1636
+ stripMeter(stripIndex: number, tap?: MeterTap): MixMeterSnapshot;
1637
+ /**
1638
+ * Schedule sample-accurate fader automation on a strip.
1639
+ *
1640
+ * @param stripIndex - Strip index in `[0, stripCount())`
1641
+ * @param samplePos - Absolute samples from the start of processing
1642
+ * @param faderDb - Target fader level in dB
1643
+ * @param curve - Interpolation curve (default: `'linear'`)
1644
+ */
1645
+ scheduleFaderAutomation(stripIndex: number, samplePos: number, faderDb: number, curve?: AutomationCurve): void;
1646
+ /**
1647
+ * Schedule sample-accurate pan automation on a strip.
1648
+ *
1649
+ * @param stripIndex - Strip index in `[0, stripCount())`
1650
+ * @param samplePos - Absolute samples from the start of processing
1651
+ * @param pan - Target pan position
1652
+ * @param curve - Interpolation curve (default: `'linear'`)
1653
+ */
1654
+ schedulePanAutomation(stripIndex: number, samplePos: number, pan: number, curve?: AutomationCurve): void;
1655
+ /**
1656
+ * Schedule sample-accurate width automation on a strip.
1657
+ *
1658
+ * @param stripIndex - Strip index in `[0, stripCount())`
1659
+ * @param samplePos - Absolute samples from the start of processing
1660
+ * @param width - Target stereo width
1661
+ * @param curve - Interpolation curve (default: `'linear'`)
1662
+ */
1663
+ scheduleWidthAutomation(stripIndex: number, samplePos: number, width: number, curve?: AutomationCurve): void;
1664
+ /**
1665
+ * Schedule sample-accurate send-level automation on a strip's send.
1666
+ *
1667
+ * @param stripIndex - Strip index in `[0, stripCount())`
1668
+ * @param sendIndex - Send index in the strip's add order
1669
+ * @param samplePos - Absolute samples from the start of processing
1670
+ * @param db - Target send level in dB
1671
+ * @param curve - Interpolation curve (default: `'linear'`)
1672
+ */
1673
+ scheduleSendAutomation(stripIndex: number, sendIndex: number, samplePos: number, db: number, curve?: AutomationCurve): void;
1674
+ /**
1675
+ * Read up to `maxPoints` of a strip's most recent goniometer samples
1676
+ * (oldest to newest).
1677
+ */
1678
+ readGoniometerLatest(stripIndex: number, maxPoints: number): GoniometerPoint[];
1679
+ /** Serialize the current scene (strips, buses, sends, connections) to JSON. */
1680
+ toSceneJson(): string;
1681
+ /** Release the underlying WASM object. Safe to call only once. */
1682
+ delete(): void;
1683
+ /** Alias for {@link delete}, provided for cross-binding (Node) compatibility. */
1684
+ destroy(): void;
1685
+ }
761
1686
  /**
762
1687
  * Trim silence from beginning and end of audio.
763
1688
  *
@@ -814,6 +1739,59 @@ declare function melSpectrogram(samples: Float32Array, sampleRate: number, nFft?
814
1739
  * @returns MFCC result
815
1740
  */
816
1741
  declare function mfcc(samples: Float32Array, sampleRate: number, nFft?: number, hopLength?: number, nMels?: number, nMfcc?: number): MfccResult;
1742
+ /**
1743
+ * Approximate inverse of a Mel filterbank: Mel power spectrogram -> STFT power
1744
+ * spectrogram. Mirrors `feature::mel_to_stft`.
1745
+ *
1746
+ * @param melPower - Mel power spectrogram [nMels x nFrames] row-major
1747
+ * @param nMels - Number of Mel bands
1748
+ * @param nFrames - Number of time frames
1749
+ * @param sampleRate - Sample rate in Hz
1750
+ * @param nFft - FFT size (default: 2048)
1751
+ * @param hopLength - Hop length (default: 512)
1752
+ * @returns STFT power spectrogram result
1753
+ */
1754
+ declare function melToStft(melPower: Float32Array, nMels: number, nFrames: number, sampleRate: number, nFft?: number, hopLength?: number, fmin?: number, fmax?: number): StftPowerResult;
1755
+ /**
1756
+ * Reconstruct audio from a Mel power spectrogram via Griffin-Lim. Mirrors
1757
+ * `feature::mel_to_audio`.
1758
+ *
1759
+ * @param melPower - Mel power spectrogram [nMels x nFrames] row-major
1760
+ * @param nMels - Number of Mel bands
1761
+ * @param nFrames - Number of time frames
1762
+ * @param sampleRate - Sample rate in Hz
1763
+ * @param nFft - FFT size (default: 2048)
1764
+ * @param hopLength - Hop length (default: 512)
1765
+ * @param nIter - Griffin-Lim iterations (default: 32)
1766
+ * @returns Reconstructed audio samples (mono, float32)
1767
+ */
1768
+ declare function melToAudio(melPower: Float32Array, nMels: number, nFrames: number, sampleRate: number, nFft?: number, hopLength?: number, nIter?: number, fmin?: number, fmax?: number): Float32Array;
1769
+ /**
1770
+ * Invert MFCC coefficients back to a Mel power spectrogram. Mirrors
1771
+ * `feature::mfcc_to_mel`.
1772
+ *
1773
+ * @param mfccCoefficients - MFCC matrix [nMfcc x nFrames] row-major
1774
+ * @param nMfcc - Number of MFCC coefficients
1775
+ * @param nFrames - Number of time frames
1776
+ * @param nMels - Number of Mel bins to reconstruct (default: 128)
1777
+ * @returns Mel power spectrogram result
1778
+ */
1779
+ declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels?: number): MelPowerResult;
1780
+ /**
1781
+ * Reconstruct audio directly from MFCC coefficients via Griffin-Lim. Mirrors
1782
+ * `feature::mfcc_to_audio`.
1783
+ *
1784
+ * @param mfccCoefficients - MFCC matrix [nMfcc x nFrames] row-major
1785
+ * @param nMfcc - Number of MFCC coefficients
1786
+ * @param nFrames - Number of time frames
1787
+ * @param nMels - Number of Mel bins (default: 128)
1788
+ * @param sampleRate - Sample rate in Hz
1789
+ * @param nFft - FFT size (default: 2048)
1790
+ * @param hopLength - Hop length (default: 512)
1791
+ * @param nIter - Griffin-Lim iterations (default: 32)
1792
+ * @returns Reconstructed audio samples (mono, float32)
1793
+ */
1794
+ declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels: number, sampleRate: number, nFft?: number, hopLength?: number, nIter?: number, fmin?: number, fmax?: number): Float32Array;
817
1795
  /**
818
1796
  * Compute chromagram (pitch class distribution).
819
1797
  *
@@ -989,8 +1967,121 @@ declare function peakPick(values: Float32Array, preMax: number, postMax: number,
989
1967
  declare function vectorNormalize(values: Float32Array, normType?: number, threshold?: number): Float32Array;
990
1968
  declare function pcen(values: Float32Array, nBins: number, nFrames: number, options?: Record<string, number>): Float32Array;
991
1969
  declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
992
- declare function tempogram(onsetEnvelope: Float32Array, sampleRate: number, hopLength?: number, winLength?: number): WasmTempogramResult;
1970
+ declare function tempogram(onsetEnvelope: Float32Array, sampleRate: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
1971
+ declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
993
1972
  declare function plp(onsetEnvelope: Float32Array, sampleRate: number, hopLength?: number, tempoMin?: number, tempoMax?: number, winLength?: number): Float32Array;
1973
+ /**
1974
+ * Compute NNLS (non-negative least squares) chromagram.
1975
+ *
1976
+ * @param samples - Audio samples (mono, float32)
1977
+ * @param sampleRate - Sample rate in Hz (default: 22050)
1978
+ * @returns NNLS chroma result
1979
+ */
1980
+ declare function nnlsChroma(samples: Float32Array, sampleRate?: number): WasmNnlsChromaResult;
1981
+ /**
1982
+ * Compute the Constant-Q Transform magnitude.
1983
+ *
1984
+ * @param samples - Audio samples (mono, float32)
1985
+ * @param sampleRate - Sample rate in Hz (default: 22050)
1986
+ * @param hopLength - Hop length (default: 512)
1987
+ * @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
1988
+ * @param nBins - Number of frequency bins (default: 84)
1989
+ * @param binsPerOctave - Bins per octave (default: 12)
1990
+ * @returns CQT magnitude result
1991
+ */
1992
+ declare function cqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number): CqtResult;
1993
+ /**
1994
+ * Compute the Variable-Q Transform magnitude (gamma controls Q).
1995
+ *
1996
+ * @param samples - Audio samples (mono, float32)
1997
+ * @param sampleRate - Sample rate in Hz (default: 22050)
1998
+ * @param hopLength - Hop length (default: 512)
1999
+ * @param fmin - Minimum frequency in Hz (default: 32.70319566257483, C1)
2000
+ * @param nBins - Number of frequency bins (default: 84)
2001
+ * @param binsPerOctave - Bins per octave (default: 12)
2002
+ * @param gamma - Bandwidth offset; 0 is equivalent to CQT (default: 0)
2003
+ * @returns VQT magnitude result (same shape as CQT)
2004
+ */
2005
+ declare function vqt(samples: Float32Array, sampleRate?: number, hopLength?: number, fmin?: number, nBins?: number, binsPerOctave?: number, gamma?: number): CqtResult;
2006
+ /**
2007
+ * Detect song-structure sections (intro/verse/chorus/...).
2008
+ *
2009
+ * @param samples - Audio samples (mono, float32)
2010
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2011
+ * @param nFft - FFT size (default: 2048)
2012
+ * @param hopLength - Hop length (default: 512)
2013
+ * @param minSectionSec - Minimum section duration in seconds (default: 8.0)
2014
+ * @returns Array of detected sections
2015
+ */
2016
+ declare function analyzeSections(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, minSectionSec?: number): Section[];
2017
+ /**
2018
+ * Extract the melody contour from monophonic audio via YIN.
2019
+ *
2020
+ * @param samples - Audio samples (mono, float32)
2021
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2022
+ * @param fmin - Minimum frequency in Hz (default: 65.0)
2023
+ * @param fmax - Maximum frequency in Hz (default: 2093.0)
2024
+ * @param frameLength - Frame length in samples (default: 2048)
2025
+ * @param hopLength - Hop length (default: 512)
2026
+ * @param threshold - YIN threshold; lower is stricter (default: 0.1)
2027
+ * @returns Melody contour with per-frame pitch points and summary stats
2028
+ */
2029
+ declare function analyzeMelody(samples: Float32Array, sampleRate?: number, fmin?: number, fmax?: number, frameLength?: number, hopLength?: number, threshold?: number): MelodyResult;
2030
+ /**
2031
+ * Compute the onset strength envelope.
2032
+ *
2033
+ * @param samples - Audio samples (mono, float32)
2034
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2035
+ * @param nFft - FFT size (default: 2048)
2036
+ * @param hopLength - Hop length (default: 512)
2037
+ * @param nMels - Number of Mel bands (default: 128)
2038
+ * @returns Onset envelope for each frame
2039
+ */
2040
+ declare function onsetEnvelope(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number): Float32Array;
2041
+ /**
2042
+ * Compute the Fourier tempogram from an onset envelope.
2043
+ *
2044
+ * @param onsetEnvelope - Onset strength envelope (float32)
2045
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2046
+ * @param hopLength - Hop length (default: 512)
2047
+ * @param winLength - Window length in frames (default: 384)
2048
+ * @returns Fourier tempogram result
2049
+ */
2050
+ declare function fourierTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number): WasmFourierTempogramResult;
2051
+ /**
2052
+ * Compute tempogram ratio features.
2053
+ *
2054
+ * @param tempogramData - Tempogram data (float32)
2055
+ * @param winLength - Window length in frames (default: 384)
2056
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2057
+ * @param hopLength - Hop length (default: 512)
2058
+ * @returns Tempogram ratio features
2059
+ */
2060
+ declare function tempogramRatio(tempogramData: Float32Array, winLength?: number, sampleRate?: number, hopLength?: number): Float32Array;
2061
+ /**
2062
+ * Measure loudness (EBU R128 / ITU-R BS.1770).
2063
+ *
2064
+ * @param samples - Audio samples (mono, float32)
2065
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2066
+ * @returns Loudness measurement result
2067
+ */
2068
+ declare function lufs(samples: Float32Array, sampleRate?: number): LufsResult;
2069
+ /**
2070
+ * Compute the momentary loudness (LUFS) over time.
2071
+ *
2072
+ * @param samples - Audio samples (mono, float32)
2073
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2074
+ * @returns Momentary LUFS values over time
2075
+ */
2076
+ declare function momentaryLufs(samples: Float32Array, sampleRate?: number): Float32Array;
2077
+ /**
2078
+ * Compute the short-term loudness (LUFS) over time.
2079
+ *
2080
+ * @param samples - Audio samples (mono, float32)
2081
+ * @param sampleRate - Sample rate in Hz (default: 22050)
2082
+ * @returns Short-term LUFS values over time
2083
+ */
2084
+ declare function shortTermLufs(samples: Float32Array, sampleRate?: number): Float32Array;
994
2085
  /**
995
2086
  * Resample audio to a different sample rate.
996
2087
  *
@@ -1031,9 +2122,12 @@ declare class Audio {
1031
2122
  /** Duration in seconds. */
1032
2123
  get duration(): number;
1033
2124
  detectBpm(): number;
1034
- detectKey(): Key;
2125
+ detectKey(options?: KeyDetectionOptions): Key;
2126
+ detectKeyCandidates(options?: KeyDetectionOptions): KeyCandidate[];
1035
2127
  detectOnsets(): Float32Array;
1036
2128
  detectBeats(): Float32Array;
2129
+ detectDownbeats(): Float32Array;
2130
+ detectChords(options?: ChordDetectionOptions): ChordAnalysisResult;
1037
2131
  analyze(): AnalysisResult;
1038
2132
  analyzeWithProgress(onProgress: ProgressCallback): AnalysisResult;
1039
2133
  hpss(kernelHarmonic?: number, kernelPercussive?: number): HpssResult;
@@ -1041,11 +2135,14 @@ declare class Audio {
1041
2135
  percussive(): Float32Array;
1042
2136
  timeStretch(rate: number): Float32Array;
1043
2137
  pitchShift(semitones: number): Float32Array;
2138
+ pitchCorrectToMidi(currentMidi: number, targetMidi: number): Float32Array;
2139
+ noteStretch(onsetSample: number, offsetSample: number, stretchRatio: number): Float32Array;
2140
+ voiceChange(pitchSemitones: number, formantFactor: number): Float32Array;
1044
2141
  normalize(targetDb?: number): Float32Array;
1045
2142
  mastering(targetLufs?: number, ceilingDb?: number, truePeakOversample?: number): MasteringResult;
1046
2143
  masteringChain(config: MasteringChainConfig): MasteringChainResult;
1047
- masterAudio(presetName: string, overrides?: Record<string, number | boolean> | null): MasteringChainResult;
1048
- masteringProcess(processorName: string, params?: MasteringProcessorParams): MasteringResult;
2144
+ masterAudio(presetName: MasteringPreset, overrides?: Record<string, number | boolean> | null): MasteringChainResult;
2145
+ masteringProcess(processorName: SoloProcessor, params?: MasteringProcessorParams): MasteringResult;
1049
2146
  trim(thresholdDb?: number): Float32Array;
1050
2147
  stft(nFft?: number, hopLength?: number): StftResult;
1051
2148
  stftDb(nFft?: number, hopLength?: number): {
@@ -1056,6 +2153,11 @@ declare class Audio {
1056
2153
  melSpectrogram(nFft?: number, hopLength?: number, nMels?: number): MelSpectrogramResult;
1057
2154
  mfcc(nFft?: number, hopLength?: number, nMels?: number, nMfcc?: number): MfccResult;
1058
2155
  chroma(nFft?: number, hopLength?: number): ChromaResult;
2156
+ nnlsChroma(): WasmNnlsChromaResult;
2157
+ onsetEnvelope(nFft?: number, hopLength?: number, nMels?: number): Float32Array;
2158
+ lufs(): LufsResult;
2159
+ momentaryLufs(): Float32Array;
2160
+ shortTermLufs(): Float32Array;
1059
2161
  spectralCentroid(nFft?: number, hopLength?: number): Float32Array;
1060
2162
  spectralBandwidth(nFft?: number, hopLength?: number): Float32Array;
1061
2163
  spectralRolloff(nFft?: number, hopLength?: number, rollPercent?: number): Float32Array;
@@ -1119,6 +2221,8 @@ declare class StreamAnalyzer {
1119
2221
  * @returns Frame buffer with analysis results
1120
2222
  */
1121
2223
  readFrames(maxFrames: number): FrameBuffer;
2224
+ readFramesU8(maxFrames: number): StreamFramesU8;
2225
+ readFramesI16(maxFrames: number): StreamFramesI16;
1122
2226
  /**
1123
2227
  * Reset the analyzer state.
1124
2228
  *
@@ -1172,4 +2276,4 @@ declare class StreamAnalyzer {
1172
2276
  dispose(): void;
1173
2277
  }
1174
2278
 
1175
- export { type AnalysisResult, type AnalyzerStats, Audio, type BarChord, type Beat, type Chord, type ChordChange, ChordQuality, type ChromaResult, type Dynamics, type FrameBuffer, type HpssResult, type Key, type MasteringChainConfig, type MasteringChainResult, type MasteringProcessorParams, type MasteringResult, type MasteringStereoChainResult, type MasteringStereoResult, type MelSpectrogramResult, type MfccResult, Mode, type PatternScore, PitchClass as Pitch, PitchClass, type PitchResult, type ProgressCallback, type ProgressiveEstimate, type RhythmFeatures, type Section, SectionType, type StftResult, StreamAnalyzer, type StreamConfig, StreamingMasteringChain, type Timbre, type TimeSignature, amplitudeToDb, analyze, analyzeWithProgress, chroma, dbToAmplitude, dbToPower, deemphasis, detectBeats, detectBpm, detectKey, detectOnsets, fixFrames, fixLength, frameSignal, framesToSamples, framesToTime, harmonic, hpss, hzToMel, hzToMidi, hzToNote, init, isInitialized, masterAudio, masterAudioStereo, mastering, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorNames, masteringStereoAnalysisNames, masteringStereoAnalyze, melSpectrogram, melToHz, mfcc, midiToHz, normalize, noteToHz, padCenter, pcen, peakPick, percussive, pitchPyin, pitchShift, pitchYin, plp, powerToDb, preemphasis, resample, rmsEnergy, samplesToFrames, spectralBandwidth, spectralCentroid, spectralFlatness, spectralRolloff, splitSilence, stft, stftDb, tempogram, timeStretch, timeToFrames, tonnetz, trim, trimSilence, vectorNormalize, version, zeroCrossingRate };
2279
+ export { type AcousticResult, type AnalysisResult, type AnalyzerStats, Audio, type AutomationCurve, type BarChord, type Beat, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, ChordQuality, type ChromaResult, type CqtResult, type Dynamics, EXPECTED_ENGINE_ABI_VERSION, type EngineAutomationPoint, type EngineBounceOptions, type EngineBounceResult, type EngineCapabilities, type EngineCaptureStatus, type EngineClip, type EngineFreezeOptions, type EngineFreezeResult, type EngineGraphSpec, type EngineMarker, type EngineMeterTelemetry, type EngineMetronomeConfig, type EngineParameterInfo, type EngineTelemetry, type EngineTransportState, type EqBand, type EqBandPhase, type EqBandType, type EqCoeffMode, type EqMatchOptions, type EqSpectrumSnapshot, type EqStereoPlacement, type FrameBuffer, type GoniometerPoint, type HpssResult, type Key, type KeyCandidate, type KeyDetectionOptions, KeyProfile, type KeyProfileName, type LufsResult, type MasteringChainConfig, type MasteringChainResult, type MasteringPreset, type MasteringProcessorParams, type MasteringResult, type MasteringStereoChainResult, type MasteringStereoResult, type MelSpectrogramResult, type MelodyPoint, type MelodyResult, type MeterTap, type MfccResult, type MixMeterSnapshot, type MixOptions, type MixResult, Mixer, type MixerProcessResult, type MixerRealtimeBuffer, Mode, type PairAnalysis, type PairProcessor, type PanLaw, type PanMode, type PatternScore, PitchClass as Pitch, PitchClass, type PitchResult, type ProgressCallback, type ProgressiveEstimate, RealtimeEngine, type RhythmFeatures, type Section, SectionType, type SendTiming, type SoloProcessor, type StereoAnalysis, type StftResult, StreamAnalyzer, type StreamConfig, type StreamFramesI16, type StreamFramesU8, StreamingEqualizer, type StreamingEqualizerConfig, StreamingMasteringChain, type StreamingPlatform, type Timbre, type TimeSignature, amplitudeToDb, analyze, analyzeImpulseResponse, analyzeMelody, analyzeSections, analyzeWithProgress, chroma, cqt, cyclicTempogram, dbToAmplitude, dbToPower, deemphasis, detectAcoustic, detectBeats, detectBpm, detectChords, detectDownbeats, detectKey, detectKeyCandidates, detectOnsets, engineAbiVersion, engineCapabilities, fixFrames, fixLength, fourierTempogram, frameSignal, framesToSamples, framesToTime, harmonic, hpss, hzToMel, hzToMidi, hzToNote, init, isInitialized, lufs, masterAudio, masterAudioStereo, mastering, masteringAssistantSuggest, masteringAudioProfile, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorNames, masteringStereoAnalysisNames, masteringStereoAnalyze, masteringStreamingPreview, melSpectrogram, melToAudio, melToHz, melToStft, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixerScenePresetJson, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnlsChroma, normalize, noteStretch, noteToHz, onsetEnvelope, padCenter, pcen, peakPick, percussive, pitchCorrectToMidi, pitchPyin, pitchShift, pitchYin, plp, powerToDb, preemphasis, resample, rmsEnergy, samplesToFrames, shortTermLufs, spectralBandwidth, spectralCentroid, spectralFlatness, spectralRolloff, splitSilence, stft, stftDb, tempogram, tempogramRatio, timeStretch, timeToFrames, tonnetz, trim, trimSilence, vectorNormalize, version, voiceChange, vqt, zeroCrossingRate };