@libraz/libsonare 1.2.1 → 1.2.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/README.md +56 -4
- package/dist/index.d.ts +820 -296
- package/dist/index.js +770 -128
- package/dist/index.js.map +1 -1
- package/dist/sonare-rt.wasm +0 -0
- package/dist/sonare.js +1 -1
- package/dist/sonare.wasm +0 -0
- package/dist/worklet.d.ts +101 -3
- package/dist/worklet.js +706 -69
- package/dist/worklet.js.map +1 -1
- package/package.json +6 -6
- package/src/index.ts +1764 -287
- package/src/public_types.ts +128 -0
- package/src/sonare.js.d.ts +580 -79
- package/src/stream_types.ts +4 -1
- package/src/worklet.ts +796 -66
- package/src/wasm_types.ts +0 -1259
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ProgressCallback, WasmNnlsChromaResult, WasmDecomposeResult, WasmEngineAutomationPoint, WasmEngineBounceOptions, WasmEngineBounceResult, WasmEngineCaptureStatus, WasmEngineClip, WasmEngineFreezeOptions, WasmEngineFreezeResult, WasmEngineGraphSpec, WasmEngineMarker, WasmEngineMeterTelemetry, WasmEngineMetronomeConfig, WasmEngineParameterInfo, WasmEngineTelemetry, WasmEngineTransportState, WasmHpssWithResidualResult, WasmMatrix2dResult, WasmEngineProcessWithMonitorResult, WasmCyclicTempogramResult, WasmFourierTempogramResult, WasmFrameResult, WasmLufsResult, WasmTempogramResult, WasmTrimResult } from './sonare.js';
|
|
2
|
+
export { ProgressCallback } from './sonare.js';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Pitch class enum (C=0, C#=1, ..., B=11)
|
|
3
6
|
*/
|
|
@@ -268,6 +271,63 @@ interface AcousticResult {
|
|
|
268
271
|
confidence: number;
|
|
269
272
|
isBlind: boolean;
|
|
270
273
|
}
|
|
274
|
+
/** Shoebox geometry + placement shared by RIR synthesis and the room morph. */
|
|
275
|
+
interface RoomGeometryOptions {
|
|
276
|
+
lengthM?: number;
|
|
277
|
+
widthM?: number;
|
|
278
|
+
heightM?: number;
|
|
279
|
+
absorption?: number;
|
|
280
|
+
sourceX?: number;
|
|
281
|
+
sourceY?: number;
|
|
282
|
+
sourceZ?: number;
|
|
283
|
+
listenerX?: number;
|
|
284
|
+
listenerY?: number;
|
|
285
|
+
listenerZ?: number;
|
|
286
|
+
ismOrder?: number;
|
|
287
|
+
seed?: number;
|
|
288
|
+
maxSeconds?: number;
|
|
289
|
+
}
|
|
290
|
+
interface RirSynthOptions extends RoomGeometryOptions {
|
|
291
|
+
sampleRate?: number;
|
|
292
|
+
/** Use the Eyring statistical late-tail model (default true); false = Sabine. */
|
|
293
|
+
preferEyring?: boolean;
|
|
294
|
+
/** Early/late crossover in ms (0 = auto, ~sqrt(V) ms). */
|
|
295
|
+
mixingTimeMs?: number;
|
|
296
|
+
/** Equal-power crossfade width around the mixing time in ms (0 = default). */
|
|
297
|
+
crossfadeMs?: number;
|
|
298
|
+
}
|
|
299
|
+
interface RirResult {
|
|
300
|
+
rir: Float32Array;
|
|
301
|
+
sampleRate: number;
|
|
302
|
+
hasError: boolean;
|
|
303
|
+
}
|
|
304
|
+
interface RoomEstimateOptions {
|
|
305
|
+
aspectHintLw?: number;
|
|
306
|
+
aspectHintLh?: number;
|
|
307
|
+
referenceAbsorption?: number;
|
|
308
|
+
preferEyring?: boolean;
|
|
309
|
+
nOctaveBands?: number;
|
|
310
|
+
/** Analyzer routing: 0 = auto, 1 = blind, 2 = impulse-response. */
|
|
311
|
+
mode?: number;
|
|
312
|
+
/** Analyzer decay-fit span in dB (0 = library default). */
|
|
313
|
+
minDecayDb?: number;
|
|
314
|
+
/** Analyzer noise-floor margin in dB (0 = library default). */
|
|
315
|
+
noiseFloorMarginDb?: number;
|
|
316
|
+
}
|
|
317
|
+
interface RoomEstimateResult {
|
|
318
|
+
volume: number;
|
|
319
|
+
length: number;
|
|
320
|
+
width: number;
|
|
321
|
+
height: number;
|
|
322
|
+
drrDb: number;
|
|
323
|
+
confidence: number;
|
|
324
|
+
absorptionBands: Float32Array;
|
|
325
|
+
rt60Bands: Float32Array;
|
|
326
|
+
}
|
|
327
|
+
interface RoomMorphOptions extends RoomGeometryOptions {
|
|
328
|
+
wet?: number;
|
|
329
|
+
sourceTailSuppression?: number;
|
|
330
|
+
}
|
|
271
331
|
/**
|
|
272
332
|
* HPSS (Harmonic-Percussive Source Separation) result
|
|
273
333
|
*/
|
|
@@ -660,6 +720,61 @@ interface StreamingRetuneConfig {
|
|
|
660
720
|
/** Grain size in samples. Use 0/omit to derive it from the sample rate. */
|
|
661
721
|
grainSize?: number;
|
|
662
722
|
}
|
|
723
|
+
type VoicePresetId = 'neutral-monitor' | 'bright-idol' | 'soft-whisper' | 'deep-narrator' | 'robot-mascot' | 'dark-villain';
|
|
724
|
+
interface RealtimeVoiceChangerPreset {
|
|
725
|
+
schemaVersion: 1;
|
|
726
|
+
id?: string;
|
|
727
|
+
name?: string;
|
|
728
|
+
description?: string;
|
|
729
|
+
macros?: Record<string, number>;
|
|
730
|
+
dsp?: Record<string, unknown>;
|
|
731
|
+
}
|
|
732
|
+
type RealtimeVoiceChangerConfigInput = VoicePresetId | RealtimeVoiceChangerPreset;
|
|
733
|
+
/**
|
|
734
|
+
* Flat (POD) realtime voice-changer configuration. Field names mirror the
|
|
735
|
+
* C ABI `SonareRealtimeVoiceChangerConfig` / Python POD exactly (snake_case),
|
|
736
|
+
* so a config can be round-tripped across bindings without renaming.
|
|
737
|
+
*/
|
|
738
|
+
interface RealtimeVoiceChangerPodConfig {
|
|
739
|
+
input_gain_db: number;
|
|
740
|
+
output_gain_db: number;
|
|
741
|
+
wet_mix: number;
|
|
742
|
+
retune_semitones: number;
|
|
743
|
+
retune_mix: number;
|
|
744
|
+
retune_grain_size: number;
|
|
745
|
+
formant_factor: number;
|
|
746
|
+
formant_amount: number;
|
|
747
|
+
formant_body: number;
|
|
748
|
+
formant_brightness: number;
|
|
749
|
+
formant_nasal: number;
|
|
750
|
+
eq_highpass_hz: number;
|
|
751
|
+
eq_body_db: number;
|
|
752
|
+
eq_presence_db: number;
|
|
753
|
+
eq_air_db: number;
|
|
754
|
+
gate_threshold_db: number;
|
|
755
|
+
gate_attack_ms: number;
|
|
756
|
+
gate_release_ms: number;
|
|
757
|
+
gate_range_db: number;
|
|
758
|
+
compressor_threshold_db: number;
|
|
759
|
+
compressor_ratio: number;
|
|
760
|
+
compressor_attack_ms: number;
|
|
761
|
+
compressor_release_ms: number;
|
|
762
|
+
compressor_makeup_gain_db: number;
|
|
763
|
+
deesser_frequency_hz: number;
|
|
764
|
+
deesser_threshold_db: number;
|
|
765
|
+
deesser_ratio: number;
|
|
766
|
+
deesser_range_db: number;
|
|
767
|
+
reverb_mix: number;
|
|
768
|
+
reverb_time_ms: number;
|
|
769
|
+
reverb_damping: number;
|
|
770
|
+
reverb_seed: number;
|
|
771
|
+
limiter_ceiling_db: number;
|
|
772
|
+
limiter_release_ms: number;
|
|
773
|
+
/** Non-zero enables the 4x-oversampled inter-sample-peak limiter (default enabled). */
|
|
774
|
+
limiter_enable_isp_limiter: boolean;
|
|
775
|
+
/** True-peak ceiling in dBTP applied by the ISP limiter (default -1.0). */
|
|
776
|
+
limiter_isp_ceiling_dbtp: number;
|
|
777
|
+
}
|
|
663
778
|
/** Options for {@link StreamingEqualizer.match}. */
|
|
664
779
|
interface EqMatchOptions {
|
|
665
780
|
sampleRate?: number;
|
|
@@ -733,6 +848,8 @@ interface AnalyzerStats {
|
|
|
733
848
|
*/
|
|
734
849
|
interface FrameBuffer {
|
|
735
850
|
nFrames: number;
|
|
851
|
+
/** Number of mel bands; flat `mel` is `[nFrames * nMels]` row-major. */
|
|
852
|
+
nMels: number;
|
|
736
853
|
timestamps: Float32Array;
|
|
737
854
|
mel: Float32Array;
|
|
738
855
|
chroma: Float32Array;
|
|
@@ -770,7 +887,8 @@ interface StreamFramesI16 {
|
|
|
770
887
|
* Configuration for StreamAnalyzer
|
|
771
888
|
*/
|
|
772
889
|
interface StreamConfig {
|
|
773
|
-
|
|
890
|
+
/** Sample rate in Hz. Optional for parity with the Node/Python bindings (default 44100). */
|
|
891
|
+
sampleRate?: number;
|
|
774
892
|
nFft?: number;
|
|
775
893
|
hopLength?: number;
|
|
776
894
|
nMels?: number;
|
|
@@ -790,186 +908,12 @@ interface StreamConfig {
|
|
|
790
908
|
outputFormat?: number;
|
|
791
909
|
}
|
|
792
910
|
|
|
793
|
-
type ProgressCallback = (progress: number, stage: string) => void;
|
|
794
|
-
interface WasmTrimResult {
|
|
795
|
-
audio: Float32Array;
|
|
796
|
-
startSample: number;
|
|
797
|
-
endSample: number;
|
|
798
|
-
}
|
|
799
|
-
interface WasmFrameResult {
|
|
800
|
-
nFrames: number;
|
|
801
|
-
frames: Float32Array;
|
|
802
|
-
}
|
|
803
|
-
interface WasmTempogramResult {
|
|
804
|
-
nFrames: number;
|
|
805
|
-
winLength: number;
|
|
806
|
-
data: Float32Array;
|
|
807
|
-
}
|
|
808
|
-
interface WasmCyclicTempogramResult {
|
|
809
|
-
nFrames: number;
|
|
810
|
-
nBins: number;
|
|
811
|
-
data: Float32Array;
|
|
812
|
-
}
|
|
813
|
-
interface WasmFourierTempogramResult {
|
|
814
|
-
nBins: number;
|
|
815
|
-
nFrames: number;
|
|
816
|
-
data: Float32Array;
|
|
817
|
-
}
|
|
818
|
-
interface WasmNnlsChromaResult {
|
|
819
|
-
nChroma: number;
|
|
820
|
-
nFrames: number;
|
|
821
|
-
data: Float32Array;
|
|
822
|
-
}
|
|
823
|
-
interface WasmEngineClip {
|
|
824
|
-
id?: number;
|
|
825
|
-
channels: Float32Array[];
|
|
826
|
-
startPpq: number;
|
|
827
|
-
lengthSamples?: number;
|
|
828
|
-
clipOffsetSamples?: number;
|
|
829
|
-
loop?: boolean;
|
|
830
|
-
gain?: number;
|
|
831
|
-
fadeInSamples?: number;
|
|
832
|
-
fadeOutSamples?: number;
|
|
833
|
-
}
|
|
834
|
-
interface WasmEngineParameterInfo {
|
|
835
|
-
id: number;
|
|
836
|
-
name: string;
|
|
837
|
-
unit: string;
|
|
838
|
-
minValue: number;
|
|
839
|
-
maxValue: number;
|
|
840
|
-
defaultValue: number;
|
|
841
|
-
rtSafe: boolean;
|
|
842
|
-
defaultCurve: number;
|
|
843
|
-
}
|
|
844
|
-
interface WasmEngineAutomationPoint {
|
|
845
|
-
ppq: number;
|
|
846
|
-
value: number;
|
|
847
|
-
curveToNext?: number;
|
|
848
|
-
}
|
|
849
|
-
interface WasmEngineMarker {
|
|
850
|
-
id: number;
|
|
851
|
-
ppq: number;
|
|
852
|
-
name?: string;
|
|
853
|
-
}
|
|
854
|
-
interface WasmEngineMetronomeConfig {
|
|
855
|
-
enabled: boolean;
|
|
856
|
-
beatGain?: number;
|
|
857
|
-
accentGain?: number;
|
|
858
|
-
clickSamples?: number;
|
|
859
|
-
}
|
|
860
|
-
interface WasmEngineGraphNode {
|
|
861
|
-
id: string;
|
|
862
|
-
type?: number;
|
|
863
|
-
gainDb?: number;
|
|
864
|
-
numPorts?: number;
|
|
865
|
-
}
|
|
866
|
-
interface WasmEngineGraphConnection {
|
|
867
|
-
sourceNode: string;
|
|
868
|
-
sourcePort: number;
|
|
869
|
-
destNode: string;
|
|
870
|
-
destPort: number;
|
|
871
|
-
mix?: number;
|
|
872
|
-
}
|
|
873
|
-
interface WasmEngineGraphParameterBinding {
|
|
874
|
-
paramId: number;
|
|
875
|
-
nodeId: string;
|
|
876
|
-
}
|
|
877
|
-
interface WasmEngineGraphSpec {
|
|
878
|
-
nodes: WasmEngineGraphNode[];
|
|
879
|
-
connections: WasmEngineGraphConnection[];
|
|
880
|
-
inputNode: string;
|
|
881
|
-
outputNode: string;
|
|
882
|
-
numChannels: number;
|
|
883
|
-
parameterBindings?: WasmEngineGraphParameterBinding[];
|
|
884
|
-
}
|
|
885
|
-
interface WasmEngineTelemetry {
|
|
886
|
-
type: number;
|
|
887
|
-
error: number;
|
|
888
|
-
renderFrame: number;
|
|
889
|
-
timelineSample: number;
|
|
890
|
-
audibleTimelineSample: number;
|
|
891
|
-
graphLatencySamplesQ8: number;
|
|
892
|
-
value: number;
|
|
893
|
-
}
|
|
894
|
-
interface WasmEngineMeterTelemetry {
|
|
895
|
-
targetId: number;
|
|
896
|
-
renderFrame: number;
|
|
897
|
-
seq: number;
|
|
898
|
-
peakDbL: number;
|
|
899
|
-
peakDbR: number;
|
|
900
|
-
rmsDbL: number;
|
|
901
|
-
rmsDbR: number;
|
|
902
|
-
truePeakDbL: number;
|
|
903
|
-
truePeakDbR: number;
|
|
904
|
-
maxTruePeakDb: number;
|
|
905
|
-
correlation: number;
|
|
906
|
-
monoCompatWidth: number;
|
|
907
|
-
momentaryLufs: number;
|
|
908
|
-
shortTermLufs: number;
|
|
909
|
-
integratedLufs: number;
|
|
910
|
-
gainReductionDb: number;
|
|
911
|
-
droppedRecords: number;
|
|
912
|
-
}
|
|
913
|
-
interface WasmEngineCaptureStatus {
|
|
914
|
-
capturedFrames: number;
|
|
915
|
-
overflowCount: number;
|
|
916
|
-
armed: boolean;
|
|
917
|
-
punchEnabled: boolean;
|
|
918
|
-
}
|
|
919
|
-
interface WasmEngineTransportState {
|
|
920
|
-
playing: boolean;
|
|
921
|
-
looping: boolean;
|
|
922
|
-
renderFrame: number;
|
|
923
|
-
samplePosition: number;
|
|
924
|
-
ppq: number;
|
|
925
|
-
bpm: number;
|
|
926
|
-
loopStartPpq: number;
|
|
927
|
-
loopEndPpq: number;
|
|
928
|
-
sampleRate: number;
|
|
929
|
-
}
|
|
930
|
-
interface WasmEngineBounceOptions {
|
|
931
|
-
totalFrames: number;
|
|
932
|
-
blockSize?: number;
|
|
933
|
-
numChannels?: number;
|
|
934
|
-
targetSampleRate?: number;
|
|
935
|
-
sourceSampleRate?: number;
|
|
936
|
-
normalizeLufs?: boolean;
|
|
937
|
-
targetLufs?: number;
|
|
938
|
-
dither?: 0 | 1 | 2 | 3;
|
|
939
|
-
ditherBits?: number;
|
|
940
|
-
ditherSeed?: number;
|
|
941
|
-
}
|
|
942
|
-
interface WasmEngineBounceResult {
|
|
943
|
-
interleaved: Float32Array;
|
|
944
|
-
frames: number;
|
|
945
|
-
numChannels: number;
|
|
946
|
-
sampleRate: number;
|
|
947
|
-
integratedLufs: number;
|
|
948
|
-
}
|
|
949
|
-
interface WasmEngineFreezeOptions {
|
|
950
|
-
totalFrames: number;
|
|
951
|
-
blockSize?: number;
|
|
952
|
-
numChannels?: number;
|
|
953
|
-
clipId?: number;
|
|
954
|
-
startPpq?: number;
|
|
955
|
-
gain?: number;
|
|
956
|
-
}
|
|
957
|
-
interface WasmEngineFreezeResult {
|
|
958
|
-
clipId: number;
|
|
959
|
-
frames: number;
|
|
960
|
-
numChannels: number;
|
|
961
|
-
}
|
|
962
|
-
interface WasmEngineProcessWithMonitorResult {
|
|
963
|
-
output: Float32Array[];
|
|
964
|
-
monitor: Float32Array[];
|
|
965
|
-
}
|
|
966
|
-
|
|
967
911
|
/**
|
|
968
912
|
* sonare - Audio Analysis Library
|
|
969
913
|
*
|
|
970
914
|
* @example
|
|
971
915
|
* ```typescript
|
|
972
|
-
* import { init, detectBpm, detectKey, analyze } from '@libraz/
|
|
916
|
+
* import { init, detectBpm, detectKey, analyze } from '@libraz/libsonare';
|
|
973
917
|
*
|
|
974
918
|
* await init();
|
|
975
919
|
*
|
|
@@ -998,6 +942,12 @@ type EngineFreezeResult = WasmEngineFreezeResult;
|
|
|
998
942
|
type EngineTelemetry = WasmEngineTelemetry;
|
|
999
943
|
type EngineMeterTelemetry = WasmEngineMeterTelemetry;
|
|
1000
944
|
type EngineTransportState = WasmEngineTransportState;
|
|
945
|
+
/** Row-major 2-D matrix as a flat buffer plus its dimensions. */
|
|
946
|
+
type Matrix2dResult = WasmMatrix2dResult;
|
|
947
|
+
/** NMF factor matrices { w, h } from {@link decompose}. */
|
|
948
|
+
type DecomposeResult = WasmDecomposeResult;
|
|
949
|
+
/** Harmonic / percussive / residual signals from {@link hpssWithResidual}. */
|
|
950
|
+
type HpssWithResidualResult = WasmHpssWithResidualResult;
|
|
1001
951
|
declare const EXPECTED_ENGINE_ABI_VERSION = 2;
|
|
1002
952
|
interface EngineCapabilities {
|
|
1003
953
|
engineAbiVersion: number;
|
|
@@ -1015,6 +965,48 @@ interface MixerRealtimeBuffer {
|
|
|
1015
965
|
outRight: Float32Array;
|
|
1016
966
|
process: (numSamples?: number) => void;
|
|
1017
967
|
}
|
|
968
|
+
/**
|
|
969
|
+
* Zero-copy realtime buffer pair for {@link RealtimeVoiceChanger} mono
|
|
970
|
+
* processing. The `input` / `output` `Float32Array`s are typed-memory views
|
|
971
|
+
* onto the WASM heap — write samples into `input`, call `process()`, then
|
|
972
|
+
* read from `output`. The views are owned by the {@link RealtimeVoiceChanger}
|
|
973
|
+
* and remain valid until `delete()` is called on it.
|
|
974
|
+
*/
|
|
975
|
+
interface RealtimeVoiceChangerMonoBuffer {
|
|
976
|
+
input: Float32Array;
|
|
977
|
+
output: Float32Array;
|
|
978
|
+
process: () => void;
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* Zero-copy realtime buffer pair for {@link RealtimeVoiceChanger} interleaved
|
|
982
|
+
* multi-channel processing. Layout is L0,R0,L1,R1,... for stereo. The views
|
|
983
|
+
* are owned by the {@link RealtimeVoiceChanger}.
|
|
984
|
+
*/
|
|
985
|
+
interface RealtimeVoiceChangerInterleavedBuffer {
|
|
986
|
+
input: Float32Array;
|
|
987
|
+
output: Float32Array;
|
|
988
|
+
channels: number;
|
|
989
|
+
process: () => void;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Zero-copy realtime buffer for {@link RealtimeVoiceChanger} planar stereo
|
|
993
|
+
* processing. Each entry in `channels` is a heap-backed `Float32Array` for one
|
|
994
|
+
* channel (matching AudioWorklet's native layout). Process happens in place:
|
|
995
|
+
* write samples into each channel view, call `process()`, then read back from
|
|
996
|
+
* the same views.
|
|
997
|
+
*/
|
|
998
|
+
interface RealtimeVoiceChangerPlanarBuffer {
|
|
999
|
+
channels: Float32Array[];
|
|
1000
|
+
process: () => void;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Per-call validation options accepted by guarded wrappers. Empty-buffer
|
|
1004
|
+
* checks are always performed; pass `{ validate: false }` to opt out of the
|
|
1005
|
+
* O(n) NaN/Inf scan on hot paths.
|
|
1006
|
+
*/
|
|
1007
|
+
interface ValidateOptions {
|
|
1008
|
+
validate?: boolean;
|
|
1009
|
+
}
|
|
1018
1010
|
/**
|
|
1019
1011
|
* Initialize the WASM module.
|
|
1020
1012
|
* Must be called before using any analysis functions.
|
|
@@ -1034,6 +1026,18 @@ declare function isInitialized(): boolean;
|
|
|
1034
1026
|
*/
|
|
1035
1027
|
declare function version(): string;
|
|
1036
1028
|
declare function engineAbiVersion(): number;
|
|
1029
|
+
declare function voiceChangerAbiVersion(): number;
|
|
1030
|
+
/**
|
|
1031
|
+
* Map a voice-character preset ordinal (or canonical id) to its canonical id
|
|
1032
|
+
* string (e.g. `'bright-idol'`). Returns `null` for an out-of-range ordinal.
|
|
1033
|
+
*/
|
|
1034
|
+
declare function voiceCharacterPresetId(preset: VoicePresetId | number): string | null;
|
|
1035
|
+
/**
|
|
1036
|
+
* Return the canonical (normalized) flat POD config for a built-in voice
|
|
1037
|
+
* preset, skipping the JSON round-trip. Accepts a canonical preset id or its
|
|
1038
|
+
* integer ordinal. Returns `null` for an out-of-range ordinal.
|
|
1039
|
+
*/
|
|
1040
|
+
declare function realtimeVoiceChangerPresetConfig(preset: VoicePresetId | number): RealtimeVoiceChangerPodConfig | null;
|
|
1037
1041
|
declare function engineCapabilities(): EngineCapabilities;
|
|
1038
1042
|
declare class RealtimeEngine {
|
|
1039
1043
|
private native;
|
|
@@ -1079,6 +1083,25 @@ declare class RealtimeEngine {
|
|
|
1079
1083
|
captureStatus(): EngineCaptureStatus;
|
|
1080
1084
|
capturedAudio(): Float32Array[];
|
|
1081
1085
|
process(channels: Float32Array[]): Float32Array[];
|
|
1086
|
+
/**
|
|
1087
|
+
* Allocates persistent per-channel WASM-heap scratch for the zero-copy
|
|
1088
|
+
* `getChannelBuffer` / `processPrepared` realtime path. Call once (off the
|
|
1089
|
+
* audio thread) before driving `processPrepared` from an AudioWorklet so the
|
|
1090
|
+
* render callback never allocates on the C++/JS heap.
|
|
1091
|
+
*/
|
|
1092
|
+
prepareChannels(numChannels: number, maxFrames: number): void;
|
|
1093
|
+
/**
|
|
1094
|
+
* Returns a Float32Array view onto the persistent WASM-heap scratch for one
|
|
1095
|
+
* channel (valid for up to `numFrames`). Fill it, call `processPrepared`, then
|
|
1096
|
+
* read the same view back. Re-acquire after WASM memory growth.
|
|
1097
|
+
*/
|
|
1098
|
+
getChannelBuffer(channel: number, numFrames: number): Float32Array;
|
|
1099
|
+
/**
|
|
1100
|
+
* Runs the engine in place over the prepared per-channel scratch buffers.
|
|
1101
|
+
* Allocation-free: safe to call on the AudioWorklet render thread after
|
|
1102
|
+
* `prepareChannels`.
|
|
1103
|
+
*/
|
|
1104
|
+
processPrepared(numFrames: number): void;
|
|
1082
1105
|
processWithMonitor(channels: Float32Array[]): WasmEngineProcessWithMonitorResult;
|
|
1083
1106
|
renderOffline(channels: Float32Array[], blockSize?: number): Float32Array[];
|
|
1084
1107
|
bounceOffline(options: EngineBounceOptions): EngineBounceResult;
|
|
@@ -1091,81 +1114,173 @@ declare class RealtimeEngine {
|
|
|
1091
1114
|
* Detect BPM from audio samples.
|
|
1092
1115
|
*
|
|
1093
1116
|
* @param samples - Audio samples (mono, float32)
|
|
1094
|
-
* @param sampleRate - Sample rate in Hz
|
|
1117
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1095
1118
|
* @returns Detected BPM
|
|
1096
1119
|
*/
|
|
1097
|
-
declare function detectBpm(samples: Float32Array, sampleRate
|
|
1120
|
+
declare function detectBpm(samples: Float32Array, sampleRate?: number): number;
|
|
1098
1121
|
/**
|
|
1099
1122
|
* Detect musical key from audio samples.
|
|
1100
1123
|
*
|
|
1101
1124
|
* @param samples - Audio samples (mono, float32)
|
|
1102
|
-
* @param sampleRate - Sample rate in Hz
|
|
1125
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1103
1126
|
* @returns Detected key
|
|
1104
1127
|
*/
|
|
1105
|
-
declare function detectKey(samples: Float32Array, sampleRate
|
|
1106
|
-
declare function detectKeyCandidates(samples: Float32Array, sampleRate
|
|
1128
|
+
declare function detectKey(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): Key;
|
|
1129
|
+
declare function detectKeyCandidates(samples: Float32Array, sampleRate?: number, options?: KeyDetectionOptions): KeyCandidate[];
|
|
1107
1130
|
/**
|
|
1108
1131
|
* Detect onset times from audio samples.
|
|
1109
1132
|
*
|
|
1110
1133
|
* @param samples - Audio samples (mono, float32)
|
|
1111
|
-
* @param sampleRate - Sample rate in Hz
|
|
1134
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1112
1135
|
* @returns Array of onset times in seconds
|
|
1113
1136
|
*/
|
|
1114
|
-
declare function detectOnsets(samples: Float32Array, sampleRate
|
|
1137
|
+
declare function detectOnsets(samples: Float32Array, sampleRate?: number): Float32Array;
|
|
1115
1138
|
/**
|
|
1116
1139
|
* Detect beat times from audio samples.
|
|
1117
1140
|
*
|
|
1118
1141
|
* @param samples - Audio samples (mono, float32)
|
|
1119
|
-
* @param sampleRate - Sample rate in Hz
|
|
1142
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1120
1143
|
* @returns Array of beat times in seconds
|
|
1121
1144
|
*/
|
|
1122
|
-
declare function detectBeats(samples: Float32Array, sampleRate
|
|
1145
|
+
declare function detectBeats(samples: Float32Array, sampleRate?: number): Float32Array;
|
|
1123
1146
|
/**
|
|
1124
1147
|
* Detect downbeat times from audio samples.
|
|
1125
1148
|
*
|
|
1126
1149
|
* @param samples - Audio samples (mono, float32)
|
|
1127
|
-
* @param sampleRate - Sample rate in Hz
|
|
1150
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1128
1151
|
* @returns Array of downbeat times in seconds
|
|
1129
1152
|
*/
|
|
1130
|
-
declare function detectDownbeats(samples: Float32Array, sampleRate
|
|
1153
|
+
declare function detectDownbeats(samples: Float32Array, sampleRate?: number): Float32Array;
|
|
1131
1154
|
/**
|
|
1132
1155
|
* Detect chords from audio samples.
|
|
1133
1156
|
*
|
|
1134
1157
|
* @param samples - Audio samples (mono, float32)
|
|
1135
|
-
* @param sampleRate - Sample rate in Hz
|
|
1158
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1136
1159
|
* @param options - Optional chord detection settings
|
|
1137
1160
|
* @returns Detected chord segments
|
|
1138
1161
|
*/
|
|
1139
|
-
declare function detectChords(samples: Float32Array, sampleRate
|
|
1162
|
+
declare function detectChords(samples: Float32Array, sampleRate?: number, options?: ChordDetectionOptions): ChordAnalysisResult;
|
|
1140
1163
|
/**
|
|
1141
1164
|
* Perform complete music analysis.
|
|
1142
1165
|
*
|
|
1143
1166
|
* @param samples - Audio samples (mono, float32)
|
|
1144
|
-
* @param sampleRate - Sample rate in Hz
|
|
1167
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1145
1168
|
* @returns Complete analysis result
|
|
1146
1169
|
*/
|
|
1147
|
-
declare function analyze(samples: Float32Array, sampleRate
|
|
1148
|
-
declare function analyzeImpulseResponse(samples: Float32Array, sampleRate
|
|
1149
|
-
declare function detectAcoustic(samples: Float32Array, sampleRate
|
|
1170
|
+
declare function analyze(samples: Float32Array, sampleRate?: number): AnalysisResult;
|
|
1171
|
+
declare function analyzeImpulseResponse(samples: Float32Array, sampleRate?: number, nOctaveBands?: number): AcousticResult;
|
|
1172
|
+
declare function detectAcoustic(samples: Float32Array, sampleRate?: number, nOctaveBands?: number, nThirdOctaveSubbands?: number, minDecayDb?: number, noiseFloorMarginDb?: number): AcousticResult;
|
|
1173
|
+
/**
|
|
1174
|
+
* Synthesize a room impulse response from shoebox geometry. `hasError` is true
|
|
1175
|
+
* when the source/listener falls outside the room (the RIR is then empty).
|
|
1176
|
+
*/
|
|
1177
|
+
declare function synthesizeRir(options?: RirSynthOptions): RirResult;
|
|
1178
|
+
/**
|
|
1179
|
+
* Estimate an equivalent room (volume/dimensions/absorption/DRR) from a
|
|
1180
|
+
* recording or impulse response.
|
|
1181
|
+
*/
|
|
1182
|
+
declare function estimateRoom(samples: Float32Array, sampleRate?: number, options?: RoomEstimateOptions): RoomEstimateResult;
|
|
1183
|
+
/**
|
|
1184
|
+
* Morph a recording's reverberation toward a target room (creative FX, not
|
|
1185
|
+
* dereverberation). Returns the morphed samples (input length plus the target
|
|
1186
|
+
* room's reverb tail).
|
|
1187
|
+
*/
|
|
1188
|
+
declare function roomMorph(samples: Float32Array, sampleRate: number, options?: RoomMorphOptions): Float32Array;
|
|
1150
1189
|
/**
|
|
1151
1190
|
* Perform complete music analysis with progress reporting.
|
|
1152
1191
|
*
|
|
1153
1192
|
* @param samples - Audio samples (mono, float32)
|
|
1154
|
-
* @param sampleRate - Sample rate in Hz
|
|
1193
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1155
1194
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
1156
1195
|
* @returns Complete analysis result
|
|
1157
1196
|
*/
|
|
1158
|
-
declare function analyzeWithProgress(samples: Float32Array, sampleRate: number, onProgress: ProgressCallback): AnalysisResult;
|
|
1197
|
+
declare function analyzeWithProgress(samples: Float32Array, sampleRate: number | undefined, onProgress: ProgressCallback): AnalysisResult;
|
|
1198
|
+
interface BpmCandidate {
|
|
1199
|
+
bpm: number;
|
|
1200
|
+
confidence: number;
|
|
1201
|
+
}
|
|
1202
|
+
interface BpmAnalysisResult {
|
|
1203
|
+
bpm: number;
|
|
1204
|
+
confidence: number;
|
|
1205
|
+
candidates: BpmCandidate[];
|
|
1206
|
+
autocorrelation: Float32Array;
|
|
1207
|
+
tempogram: Float32Array;
|
|
1208
|
+
}
|
|
1209
|
+
interface RhythmAnalysisResult {
|
|
1210
|
+
timeSignature: {
|
|
1211
|
+
numerator: number;
|
|
1212
|
+
denominator: number;
|
|
1213
|
+
confidence: number;
|
|
1214
|
+
};
|
|
1215
|
+
syncopation: number;
|
|
1216
|
+
grooveType: string;
|
|
1217
|
+
patternRegularity: number;
|
|
1218
|
+
tempoStability: number;
|
|
1219
|
+
bpm: number;
|
|
1220
|
+
beatIntervals: Float32Array;
|
|
1221
|
+
}
|
|
1222
|
+
interface DynamicsAnalysisResult {
|
|
1223
|
+
dynamicRangeDb: number;
|
|
1224
|
+
peakDb: number;
|
|
1225
|
+
rmsDb: number;
|
|
1226
|
+
crestFactor: number;
|
|
1227
|
+
loudnessRangeDb: number;
|
|
1228
|
+
isCompressed: boolean;
|
|
1229
|
+
/** Loudness curve timestamps (seconds), parallel to {@link loudnessRmsDb}. */
|
|
1230
|
+
loudnessTimes: Float32Array;
|
|
1231
|
+
/** Loudness curve RMS values (dB), parallel to {@link loudnessTimes}. */
|
|
1232
|
+
loudnessRmsDb: Float32Array;
|
|
1233
|
+
}
|
|
1234
|
+
/** Timbre metrics for one analysis window. Entries are ordered by time in `timbreOverTime`. */
|
|
1235
|
+
interface TimbreFrame {
|
|
1236
|
+
brightness: number;
|
|
1237
|
+
warmth: number;
|
|
1238
|
+
density: number;
|
|
1239
|
+
roughness: number;
|
|
1240
|
+
complexity: number;
|
|
1241
|
+
}
|
|
1242
|
+
interface TimbreAnalysisResult extends TimbreFrame {
|
|
1243
|
+
spectralCentroid: Float32Array;
|
|
1244
|
+
spectralFlatness: Float32Array;
|
|
1245
|
+
spectralRolloff: Float32Array;
|
|
1246
|
+
/** Time-varying timbre metrics, one entry per analysis window. */
|
|
1247
|
+
timbreOverTime: TimbreFrame[];
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Detailed BPM analysis (BPM, confidence, alternate candidates, autocorrelation,
|
|
1251
|
+
* tempogram). Matches the Node `analyzeBpm` / Python `analyze_bpm` surface.
|
|
1252
|
+
*/
|
|
1253
|
+
declare function analyzeBpm(samples: Float32Array, sampleRate?: number, bpmMin?: number, bpmMax?: number, startBpm?: number, nFft?: number, hopLength?: number, maxCandidates?: number): BpmAnalysisResult;
|
|
1254
|
+
/**
|
|
1255
|
+
* Detailed rhythm analysis (time signature, groove, syncopation, beat intervals).
|
|
1256
|
+
*/
|
|
1257
|
+
declare function analyzeRhythm(samples: Float32Array, sampleRate?: number, bpmMin?: number, bpmMax?: number, startBpm?: number, nFft?: number, hopLength?: number): RhythmAnalysisResult;
|
|
1258
|
+
/**
|
|
1259
|
+
* Dynamics analysis (RMS, peak, crest factor, LRA, loudness curve).
|
|
1260
|
+
*/
|
|
1261
|
+
declare function analyzeDynamics(samples: Float32Array, sampleRate?: number, windowSec?: number, hopLength?: number, compressionThreshold?: number): DynamicsAnalysisResult;
|
|
1262
|
+
/**
|
|
1263
|
+
* Timbre analysis (brightness/warmth/density/roughness/complexity plus spectral
|
|
1264
|
+
* features and per-window timbre frames).
|
|
1265
|
+
*/
|
|
1266
|
+
declare function analyzeTimbre(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, nMfcc?: number, windowSec?: number): TimbreAnalysisResult;
|
|
1267
|
+
/**
|
|
1268
|
+
* Whether this WASM build was compiled with FFmpeg support. Mirrors Node /
|
|
1269
|
+
* Python `hasFfmpegSupport`. In the published WASM binding this currently
|
|
1270
|
+
* always returns `false` (FFmpeg is not bundled into the .wasm), but the API
|
|
1271
|
+
* exists so caller code can branch on capabilities portably.
|
|
1272
|
+
*/
|
|
1273
|
+
declare function hasFfmpegSupport(): boolean;
|
|
1159
1274
|
/**
|
|
1160
1275
|
* Perform Harmonic-Percussive Source Separation (HPSS).
|
|
1161
1276
|
*
|
|
1162
1277
|
* @param samples - Audio samples (mono, float32)
|
|
1163
|
-
* @param sampleRate - Sample rate in Hz
|
|
1278
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1164
1279
|
* @param kernelHarmonic - Horizontal median filter size for harmonic (default: 31)
|
|
1165
1280
|
* @param kernelPercussive - Vertical median filter size for percussive (default: 31)
|
|
1166
1281
|
* @returns Separated harmonic and percussive components
|
|
1167
1282
|
*/
|
|
1168
|
-
declare function hpss(samples: Float32Array, sampleRate
|
|
1283
|
+
declare function hpss(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): HpssResult;
|
|
1169
1284
|
/**
|
|
1170
1285
|
* Extract harmonic component from audio.
|
|
1171
1286
|
*
|
|
@@ -1173,7 +1288,7 @@ declare function hpss(samples: Float32Array, sampleRate: number, kernelHarmonic?
|
|
|
1173
1288
|
* @param sampleRate - Sample rate in Hz
|
|
1174
1289
|
* @returns Harmonic component
|
|
1175
1290
|
*/
|
|
1176
|
-
declare function harmonic(samples: Float32Array, sampleRate: number): Float32Array;
|
|
1291
|
+
declare function harmonic(samples: Float32Array, sampleRate: number, options?: ValidateOptions): Float32Array;
|
|
1177
1292
|
/**
|
|
1178
1293
|
* Extract percussive component from audio.
|
|
1179
1294
|
*
|
|
@@ -1181,7 +1296,7 @@ declare function harmonic(samples: Float32Array, sampleRate: number): Float32Arr
|
|
|
1181
1296
|
* @param sampleRate - Sample rate in Hz
|
|
1182
1297
|
* @returns Percussive component
|
|
1183
1298
|
*/
|
|
1184
|
-
declare function percussive(samples: Float32Array, sampleRate: number): Float32Array;
|
|
1299
|
+
declare function percussive(samples: Float32Array, sampleRate: number, options?: ValidateOptions): Float32Array;
|
|
1185
1300
|
/**
|
|
1186
1301
|
* Time-stretch audio without changing pitch.
|
|
1187
1302
|
*
|
|
@@ -1190,7 +1305,7 @@ declare function percussive(samples: Float32Array, sampleRate: number): Float32A
|
|
|
1190
1305
|
* @param rate - Time stretch rate (0.5 = double duration, 2.0 = half duration)
|
|
1191
1306
|
* @returns Time-stretched audio
|
|
1192
1307
|
*/
|
|
1193
|
-
declare function timeStretch(samples: Float32Array, sampleRate: number, rate: number): Float32Array;
|
|
1308
|
+
declare function timeStretch(samples: Float32Array, sampleRate: number, rate: number, options?: ValidateOptions): Float32Array;
|
|
1194
1309
|
/**
|
|
1195
1310
|
* Pitch-shift audio without changing duration.
|
|
1196
1311
|
*
|
|
@@ -1199,7 +1314,7 @@ declare function timeStretch(samples: Float32Array, sampleRate: number, rate: nu
|
|
|
1199
1314
|
* @param semitones - Pitch shift in semitones (+12 = one octave up, -12 = one octave down)
|
|
1200
1315
|
* @returns Pitch-shifted audio
|
|
1201
1316
|
*/
|
|
1202
|
-
declare function pitchShift(samples: Float32Array, sampleRate: number, semitones: number): Float32Array;
|
|
1317
|
+
declare function pitchShift(samples: Float32Array, sampleRate: number, semitones: number, options?: ValidateOptions): Float32Array;
|
|
1203
1318
|
/**
|
|
1204
1319
|
* Pitch-correct audio from a current MIDI note to a target MIDI note.
|
|
1205
1320
|
*
|
|
@@ -1209,7 +1324,7 @@ declare function pitchShift(samples: Float32Array, sampleRate: number, semitones
|
|
|
1209
1324
|
* @param targetMidi - Desired MIDI note number
|
|
1210
1325
|
* @returns Pitch-corrected audio
|
|
1211
1326
|
*/
|
|
1212
|
-
declare function pitchCorrectToMidi(samples: Float32Array, sampleRate
|
|
1327
|
+
declare function pitchCorrectToMidi(samples: Float32Array, sampleRate?: number, currentMidi?: number, targetMidi?: number, options?: ValidateOptions): Float32Array;
|
|
1213
1328
|
/**
|
|
1214
1329
|
* Time-stretch a note region between two sample offsets without changing pitch.
|
|
1215
1330
|
*
|
|
@@ -1220,7 +1335,7 @@ declare function pitchCorrectToMidi(samples: Float32Array, sampleRate: number, c
|
|
|
1220
1335
|
* @param stretchRatio - Stretch ratio (0.5 = double duration, 2.0 = half duration)
|
|
1221
1336
|
* @returns Audio with the note region stretched
|
|
1222
1337
|
*/
|
|
1223
|
-
declare function noteStretch(samples: Float32Array, sampleRate
|
|
1338
|
+
declare function noteStretch(samples: Float32Array, sampleRate?: number, onsetSample?: number, offsetSample?: number, stretchRatio?: number, options?: ValidateOptions): Float32Array;
|
|
1224
1339
|
/**
|
|
1225
1340
|
* Apply a voice change by shifting pitch and formants independently.
|
|
1226
1341
|
*
|
|
@@ -1230,7 +1345,28 @@ declare function noteStretch(samples: Float32Array, sampleRate: number, onsetSam
|
|
|
1230
1345
|
* @param formantFactor - Formant scaling factor (1.0 = unchanged)
|
|
1231
1346
|
* @returns Voice-changed audio
|
|
1232
1347
|
*/
|
|
1233
|
-
declare function voiceChange(samples: Float32Array, sampleRate
|
|
1348
|
+
declare function voiceChange(samples: Float32Array, sampleRate?: number, pitchSemitones?: number, formantFactor?: number, options?: ValidateOptions): Float32Array;
|
|
1349
|
+
/** Options for the offline {@link voiceChangeRealtime} convenience wrapper. */
|
|
1350
|
+
interface VoiceChangeRealtimeOptions extends ValidateOptions {
|
|
1351
|
+
sampleRate?: number;
|
|
1352
|
+
/** Voice-changer preset id or full config object. */
|
|
1353
|
+
preset?: RealtimeVoiceChangerConfigInput;
|
|
1354
|
+
/** Channel count (1 = mono, 2 = interleaved stereo). */
|
|
1355
|
+
channels?: 1 | 2;
|
|
1356
|
+
/** Block size for the internal render loop (default 512). */
|
|
1357
|
+
blockSize?: number;
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Applies the realtime voice-changer chain to a whole buffer in one call.
|
|
1361
|
+
*
|
|
1362
|
+
* Constructs and prepares a {@link RealtimeVoiceChanger}, runs the block loop
|
|
1363
|
+
* for the caller, then disposes it — matching the Python `voice_change_realtime`
|
|
1364
|
+
* and Node `voiceChangeRealtime` convenience wrappers. For mono, `samples` is a
|
|
1365
|
+
* plain mono buffer; for stereo, `samples` is interleaved (L0,R0,L1,R1,...).
|
|
1366
|
+
*
|
|
1367
|
+
* @returns The processed buffer (same layout/length as the input).
|
|
1368
|
+
*/
|
|
1369
|
+
declare function voiceChangeRealtime(samples: Float32Array, options?: VoiceChangeRealtimeOptions): Float32Array;
|
|
1234
1370
|
/**
|
|
1235
1371
|
* Normalize audio to target peak level.
|
|
1236
1372
|
*
|
|
@@ -1239,39 +1375,181 @@ declare function voiceChange(samples: Float32Array, sampleRate: number, pitchSem
|
|
|
1239
1375
|
* @param targetDb - Target peak level in dB (default: 0 dB = full scale)
|
|
1240
1376
|
* @returns Normalized audio
|
|
1241
1377
|
*/
|
|
1242
|
-
declare function normalize(samples: Float32Array, sampleRate: number, targetDb?: number): Float32Array;
|
|
1378
|
+
declare function normalize(samples: Float32Array, sampleRate: number, targetDb?: number, options?: ValidateOptions): Float32Array;
|
|
1243
1379
|
/**
|
|
1244
1380
|
* Apply mastering loudness normalization with a true-peak ceiling.
|
|
1245
1381
|
*
|
|
1246
1382
|
* @param samples - Audio samples (mono, float32)
|
|
1247
|
-
* @param sampleRate - Sample rate in Hz
|
|
1383
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1248
1384
|
* @param targetLufs - Target integrated LUFS (default: -14)
|
|
1249
1385
|
* @param ceilingDb - True/sample peak ceiling in dBFS (default: -1)
|
|
1250
1386
|
* @param truePeakOversample - Oversampling factor used for peak estimation
|
|
1251
1387
|
* @returns Processed audio and loudness metadata
|
|
1252
1388
|
*/
|
|
1253
|
-
declare function mastering(samples: Float32Array, sampleRate
|
|
1389
|
+
declare function mastering(samples: Float32Array, sampleRate?: number, targetLufs?: number, ceilingDb?: number, truePeakOversample?: number): MasteringResult;
|
|
1254
1390
|
declare function masteringProcessorNames(): SoloProcessor[];
|
|
1255
1391
|
declare function masteringPairProcessorNames(): PairProcessor[];
|
|
1256
1392
|
declare function masteringPairAnalysisNames(): PairAnalysis[];
|
|
1257
1393
|
declare function masteringStereoAnalysisNames(): StereoAnalysis[];
|
|
1258
|
-
declare function masteringProcess(processorName: SoloProcessor, samples: Float32Array, sampleRate
|
|
1259
|
-
declare function masteringProcessStereo(processorName: SoloProcessor, left: Float32Array, right: Float32Array, sampleRate
|
|
1260
|
-
declare function masteringPairProcess(processorName: PairProcessor, source: Float32Array, reference: Float32Array, sampleRate
|
|
1261
|
-
declare function masteringPairAnalyze(analysisName: PairAnalysis, source: Float32Array, reference: Float32Array, sampleRate
|
|
1262
|
-
declare function masteringStereoAnalyze(analysisName: StereoAnalysis, left: Float32Array, right: Float32Array, sampleRate
|
|
1263
|
-
declare function masteringAssistantSuggest(samples: Float32Array, sampleRate
|
|
1264
|
-
declare function masteringAudioProfile(samples: Float32Array, sampleRate
|
|
1265
|
-
declare function masteringStreamingPreview(samples: Float32Array, sampleRate
|
|
1394
|
+
declare function masteringProcess(processorName: SoloProcessor, samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringResult;
|
|
1395
|
+
declare function masteringProcessStereo(processorName: SoloProcessor, left: Float32Array, right: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringStereoResult;
|
|
1396
|
+
declare function masteringPairProcess(processorName: PairProcessor, source: Float32Array, reference: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): MasteringResult;
|
|
1397
|
+
declare function masteringPairAnalyze(analysisName: PairAnalysis, source: Float32Array, reference: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1398
|
+
declare function masteringStereoAnalyze(analysisName: StereoAnalysis, left: Float32Array, right: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1399
|
+
declare function masteringAssistantSuggest(samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1400
|
+
declare function masteringAudioProfile(samples: Float32Array, sampleRate?: number, params?: MasteringProcessorParams): string;
|
|
1401
|
+
declare function masteringStreamingPreview(samples: Float32Array, sampleRate?: number, platforms?: StreamingPlatform[]): string;
|
|
1402
|
+
/** Options for `masteringRepairDeclick`. */
|
|
1403
|
+
interface DeclickOptions {
|
|
1404
|
+
threshold?: number;
|
|
1405
|
+
neighborRatio?: number;
|
|
1406
|
+
maxClickSamples?: number;
|
|
1407
|
+
lpcOrder?: number;
|
|
1408
|
+
residualRatio?: number;
|
|
1409
|
+
}
|
|
1410
|
+
/** Algorithms accepted by `masteringRepairDenoiseClassical`. */
|
|
1411
|
+
type DenoiseClassicalMode = 'logMmse' | 'mmseStsa' | 'spectralSubtraction';
|
|
1412
|
+
/** Noise PSD estimators accepted by `masteringRepairDenoiseClassical`. */
|
|
1413
|
+
type DenoiseClassicalNoiseEstimator = 'quantile' | 'mcra' | 'imcra';
|
|
1414
|
+
/** Options for `masteringRepairDenoiseClassical`. */
|
|
1415
|
+
interface DenoiseClassicalOptions {
|
|
1416
|
+
mode?: DenoiseClassicalMode;
|
|
1417
|
+
noiseEstimator?: DenoiseClassicalNoiseEstimator;
|
|
1418
|
+
nFft?: number;
|
|
1419
|
+
hopLength?: number;
|
|
1420
|
+
ddAlpha?: number;
|
|
1421
|
+
gainFloor?: number;
|
|
1422
|
+
overSubtraction?: number;
|
|
1423
|
+
spectralFloor?: number;
|
|
1424
|
+
noiseEstimationQuantile?: number;
|
|
1425
|
+
speechPresenceGain?: boolean;
|
|
1426
|
+
gainSmoothing?: boolean;
|
|
1427
|
+
}
|
|
1428
|
+
/** Offline LPC-based declicker. */
|
|
1429
|
+
declare function masteringRepairDeclick(samples: Float32Array, sampleRate: number, options?: DeclickOptions): Float32Array;
|
|
1430
|
+
/** Offline STFT-domain classical denoiser (LogMMSE / MMSE-STSA / SpectralSubtraction). */
|
|
1431
|
+
declare function masteringRepairDenoiseClassical(samples: Float32Array, sampleRate: number, options?: DenoiseClassicalOptions): Float32Array;
|
|
1432
|
+
/** Options for `masteringRepairDeclip`. */
|
|
1433
|
+
interface DeclipOptions {
|
|
1434
|
+
clipThreshold?: number;
|
|
1435
|
+
lpcOrder?: number;
|
|
1436
|
+
iterations?: number;
|
|
1437
|
+
lpcBlend?: number;
|
|
1438
|
+
}
|
|
1439
|
+
/** Algorithms accepted by `masteringRepairDecrackle`. */
|
|
1440
|
+
type DecrackleMode = 'median' | 'waveletShrinkage';
|
|
1441
|
+
/** Options for `masteringRepairDecrackle`. */
|
|
1442
|
+
interface DecrackleOptions {
|
|
1443
|
+
threshold?: number;
|
|
1444
|
+
mode?: DecrackleMode;
|
|
1445
|
+
levels?: number;
|
|
1446
|
+
}
|
|
1447
|
+
/** Options for `masteringRepairDehum`. */
|
|
1448
|
+
interface DehumOptions {
|
|
1449
|
+
fundamentalHz?: number;
|
|
1450
|
+
harmonics?: number;
|
|
1451
|
+
q?: number;
|
|
1452
|
+
adaptive?: boolean;
|
|
1453
|
+
searchRangeHz?: number;
|
|
1454
|
+
adaptation?: number;
|
|
1455
|
+
frameSize?: number;
|
|
1456
|
+
pllBandwidth?: number;
|
|
1457
|
+
}
|
|
1458
|
+
/** Options for `masteringRepairDereverbClassical`. */
|
|
1459
|
+
interface DereverbClassicalOptions {
|
|
1460
|
+
threshold?: number;
|
|
1461
|
+
attenuation?: number;
|
|
1462
|
+
nFft?: number;
|
|
1463
|
+
hopLength?: number;
|
|
1464
|
+
t60Sec?: number;
|
|
1465
|
+
lateDelayMs?: number;
|
|
1466
|
+
overSubtraction?: number;
|
|
1467
|
+
spectralFloor?: number;
|
|
1468
|
+
wpeEnabled?: boolean;
|
|
1469
|
+
wpeIterations?: number;
|
|
1470
|
+
wpeTaps?: number;
|
|
1471
|
+
wpeStrength?: number;
|
|
1472
|
+
}
|
|
1473
|
+
/** Trimming modes accepted by `masteringRepairTrimSilence`. */
|
|
1474
|
+
type TrimSilenceMode = 'peak' | 'lufsGated';
|
|
1475
|
+
/** Options for `masteringRepairTrimSilence`. */
|
|
1476
|
+
interface TrimSilenceOptions {
|
|
1477
|
+
threshold?: number;
|
|
1478
|
+
paddingSamples?: number;
|
|
1479
|
+
mode?: TrimSilenceMode;
|
|
1480
|
+
gateLufs?: number;
|
|
1481
|
+
windowMs?: number;
|
|
1482
|
+
}
|
|
1483
|
+
/** Offline LPC-based declipper. */
|
|
1484
|
+
declare function masteringRepairDeclip(samples: Float32Array, sampleRate: number, options?: DeclipOptions): Float32Array;
|
|
1485
|
+
/** Offline crackle suppressor (median or wavelet-shrinkage). */
|
|
1486
|
+
declare function masteringRepairDecrackle(samples: Float32Array, sampleRate: number, options?: DecrackleOptions): Float32Array;
|
|
1487
|
+
/** Offline mains-hum remover. */
|
|
1488
|
+
declare function masteringRepairDehum(samples: Float32Array, sampleRate: number, options?: DehumOptions): Float32Array;
|
|
1489
|
+
/** Offline classical dereverberator (spectral subtraction + optional WPE). */
|
|
1490
|
+
declare function masteringRepairDereverbClassical(samples: Float32Array, sampleRate: number, options?: DereverbClassicalOptions): Float32Array;
|
|
1491
|
+
/** Offline silence trimmer (peak threshold or LUFS-gated). */
|
|
1492
|
+
declare function masteringRepairTrimSilence(samples: Float32Array, sampleRate: number, options?: TrimSilenceOptions): Float32Array;
|
|
1493
|
+
/** Compressor sidechain detector mode. */
|
|
1494
|
+
type CompressorDetector = 'peak' | 'rms' | 'log_rms';
|
|
1495
|
+
/** Options for `masteringDynamicsCompressor`. */
|
|
1496
|
+
interface CompressorOptions extends ValidateOptions {
|
|
1497
|
+
thresholdDb?: number;
|
|
1498
|
+
ratio?: number;
|
|
1499
|
+
attackMs?: number;
|
|
1500
|
+
releaseMs?: number;
|
|
1501
|
+
kneeDb?: number;
|
|
1502
|
+
makeupGainDb?: number;
|
|
1503
|
+
autoMakeup?: boolean;
|
|
1504
|
+
detector?: CompressorDetector | number;
|
|
1505
|
+
sidechainHpfEnabled?: boolean;
|
|
1506
|
+
sidechainHpfHz?: number;
|
|
1507
|
+
pdrTimeMs?: number;
|
|
1508
|
+
pdrReleaseScale?: number;
|
|
1509
|
+
}
|
|
1510
|
+
/** Options for `masteringDynamicsGate`. */
|
|
1511
|
+
interface GateOptions extends ValidateOptions {
|
|
1512
|
+
thresholdDb?: number;
|
|
1513
|
+
attackMs?: number;
|
|
1514
|
+
releaseMs?: number;
|
|
1515
|
+
rangeDb?: number;
|
|
1516
|
+
holdMs?: number;
|
|
1517
|
+
closeThresholdDb?: number;
|
|
1518
|
+
keyHpfHz?: number;
|
|
1519
|
+
}
|
|
1520
|
+
/** Options for `masteringDynamicsTransientShaper`. */
|
|
1521
|
+
interface TransientShaperOptions extends ValidateOptions {
|
|
1522
|
+
attackGainDb?: number;
|
|
1523
|
+
sustainGainDb?: number;
|
|
1524
|
+
fastAttackMs?: number;
|
|
1525
|
+
fastReleaseMs?: number;
|
|
1526
|
+
slowAttackMs?: number;
|
|
1527
|
+
slowReleaseMs?: number;
|
|
1528
|
+
sensitivity?: number;
|
|
1529
|
+
maxGainDb?: number;
|
|
1530
|
+
gainSmoothingMs?: number;
|
|
1531
|
+
lookaheadMs?: number;
|
|
1532
|
+
}
|
|
1533
|
+
/** Result envelope returned by offline mastering dynamics processors. */
|
|
1534
|
+
interface DynamicsResult {
|
|
1535
|
+
samples: Float32Array;
|
|
1536
|
+
latencySamples: number;
|
|
1537
|
+
}
|
|
1538
|
+
/** Offline feed-forward compressor (soft knee, optional auto-makeup / sidechain HPF). */
|
|
1539
|
+
declare function masteringDynamicsCompressor(samples: Float32Array, sampleRate: number, options?: CompressorOptions): DynamicsResult;
|
|
1540
|
+
/** Offline noise gate (hysteresis, hold, optional key HPF). */
|
|
1541
|
+
declare function masteringDynamicsGate(samples: Float32Array, sampleRate: number, options?: GateOptions): DynamicsResult;
|
|
1542
|
+
/** Offline transient shaper (envelope-difference attack/sustain control). */
|
|
1543
|
+
declare function masteringDynamicsTransientShaper(samples: Float32Array, sampleRate: number, options?: TransientShaperOptions): DynamicsResult;
|
|
1266
1544
|
/**
|
|
1267
1545
|
* Apply a configurable mastering chain in WASM.
|
|
1268
1546
|
*
|
|
1269
1547
|
* @param samples - Audio samples (mono, float32)
|
|
1270
|
-
* @param sampleRate - Sample rate in Hz
|
|
1548
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1271
1549
|
* @param config - Chain stage configuration
|
|
1272
1550
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1273
1551
|
*/
|
|
1274
|
-
declare function masteringChain(samples: Float32Array, sampleRate: number, config: MasteringChainConfig): MasteringChainResult;
|
|
1552
|
+
declare function masteringChain(samples: Float32Array, sampleRate: number | undefined, config: MasteringChainConfig): MasteringChainResult;
|
|
1275
1553
|
/**
|
|
1276
1554
|
* Apply a configurable stereo mastering chain in WASM.
|
|
1277
1555
|
*
|
|
@@ -1281,17 +1559,17 @@ declare function masteringChain(samples: Float32Array, sampleRate: number, confi
|
|
|
1281
1559
|
* @param config - Chain stage configuration
|
|
1282
1560
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1283
1561
|
*/
|
|
1284
|
-
declare function masteringChainStereo(left: Float32Array, right: Float32Array, sampleRate: number, config: MasteringChainConfig): MasteringStereoChainResult;
|
|
1562
|
+
declare function masteringChainStereo(left: Float32Array, right: Float32Array, sampleRate: number | undefined, config: MasteringChainConfig): MasteringStereoChainResult;
|
|
1285
1563
|
/**
|
|
1286
1564
|
* Apply a configurable mastering chain in WASM with progress reporting.
|
|
1287
1565
|
*
|
|
1288
1566
|
* @param samples - Audio samples (mono, float32)
|
|
1289
|
-
* @param sampleRate - Sample rate in Hz
|
|
1567
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1290
1568
|
* @param config - Chain stage configuration
|
|
1291
1569
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
1292
1570
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1293
1571
|
*/
|
|
1294
|
-
declare function masteringChainWithProgress(samples: Float32Array, sampleRate: number, config: MasteringChainConfig, onProgress: ProgressCallback): MasteringChainResult;
|
|
1572
|
+
declare function masteringChainWithProgress(samples: Float32Array, sampleRate: number | undefined, config: MasteringChainConfig, onProgress: ProgressCallback): MasteringChainResult;
|
|
1295
1573
|
/**
|
|
1296
1574
|
* Apply a configurable stereo mastering chain in WASM with progress reporting.
|
|
1297
1575
|
*
|
|
@@ -1302,7 +1580,7 @@ declare function masteringChainWithProgress(samples: Float32Array, sampleRate: n
|
|
|
1302
1580
|
* @param onProgress - Progress callback (progress: 0-1, stage: string)
|
|
1303
1581
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1304
1582
|
*/
|
|
1305
|
-
declare function masteringChainStereoWithProgress(left: Float32Array, right: Float32Array, sampleRate: number, config: MasteringChainConfig, onProgress: ProgressCallback): MasteringStereoChainResult;
|
|
1583
|
+
declare function masteringChainStereoWithProgress(left: Float32Array, right: Float32Array, sampleRate: number | undefined, config: MasteringChainConfig, onProgress: ProgressCallback): MasteringStereoChainResult;
|
|
1306
1584
|
/**
|
|
1307
1585
|
* List built-in mastering preset identifiers.
|
|
1308
1586
|
*
|
|
@@ -1313,12 +1591,12 @@ declare function masteringPresetNames(): MasteringPreset[];
|
|
|
1313
1591
|
* Apply a named mastering preset chain to mono audio.
|
|
1314
1592
|
*
|
|
1315
1593
|
* @param samples - Audio samples (mono, float32)
|
|
1316
|
-
* @param sampleRate - Sample rate in Hz
|
|
1594
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1317
1595
|
* @param presetName - Preset identifier from {@link masteringPresetNames}
|
|
1318
1596
|
* @param overrides - Optional flat overrides (dot-notation, e.g. `'loudness.targetLufs'`) applied on top of the preset. Pass `null` for preset defaults.
|
|
1319
1597
|
* @returns Processed audio, loudness metadata, and applied stage names
|
|
1320
1598
|
*/
|
|
1321
|
-
declare function masterAudio(samples: Float32Array, sampleRate: number, presetName: MasteringPreset, overrides?: Record<string, number | boolean> | null): MasteringChainResult;
|
|
1599
|
+
declare function masterAudio(samples: Float32Array, sampleRate: number | undefined, presetName: MasteringPreset, overrides?: Record<string, number | boolean> | null): MasteringChainResult;
|
|
1322
1600
|
/**
|
|
1323
1601
|
* Apply a named mastering preset chain to stereo audio.
|
|
1324
1602
|
*
|
|
@@ -1329,17 +1607,26 @@ declare function masterAudio(samples: Float32Array, sampleRate: number, presetNa
|
|
|
1329
1607
|
* @param overrides - Optional flat overrides (dot-notation, e.g. `'loudness.targetLufs'`) applied on top of the preset. Pass `null` for preset defaults.
|
|
1330
1608
|
* @returns Processed stereo audio, loudness metadata, and applied stage names
|
|
1331
1609
|
*/
|
|
1332
|
-
declare function masterAudioStereo(left: Float32Array, right: Float32Array, sampleRate: number, presetName: MasteringPreset, overrides?: Record<string, number | boolean> | null): MasteringStereoChainResult;
|
|
1610
|
+
declare function masterAudioStereo(left: Float32Array, right: Float32Array, sampleRate: number | undefined, presetName: MasteringPreset, overrides?: Record<string, number | boolean> | null): MasteringStereoChainResult;
|
|
1611
|
+
/**
|
|
1612
|
+
* Mono `masterAudio` with per-stage progress reporting. `onProgress` is invoked
|
|
1613
|
+
* with `(progress, stage)` between each chain stage (progress is in [0,1]).
|
|
1614
|
+
*/
|
|
1615
|
+
declare function masterAudioWithProgress(samples: Float32Array, sampleRate: number | undefined, presetName: MasteringPreset, onProgress: ProgressCallback, overrides?: Record<string, number | boolean> | null): MasteringChainResult;
|
|
1616
|
+
/**
|
|
1617
|
+
* Stereo `masterAudio` with per-stage progress reporting.
|
|
1618
|
+
*/
|
|
1619
|
+
declare function masterAudioStereoWithProgress(left: Float32Array, right: Float32Array, sampleRate: number | undefined, presetName: MasteringPreset, onProgress: ProgressCallback, overrides?: Record<string, number | boolean> | null): MasteringStereoChainResult;
|
|
1333
1620
|
declare function mixingScenePresetNames(): string[];
|
|
1334
1621
|
/**
|
|
1335
1622
|
* Get a built-in mixing scene preset serialized as JSON. This is the canonical
|
|
1336
1623
|
* name shared with the Node and Python bindings; the returned JSON loads
|
|
1337
1624
|
* directly into a {@link Mixer} via {@link Mixer.fromSceneJson}.
|
|
1338
1625
|
*
|
|
1339
|
-
* @param
|
|
1626
|
+
* @param presetName - Preset name (see {@link mixingScenePresetNames})
|
|
1340
1627
|
* @returns Scene JSON string
|
|
1341
1628
|
*/
|
|
1342
|
-
declare function mixingScenePresetJson(
|
|
1629
|
+
declare function mixingScenePresetJson(presetName: string): string;
|
|
1343
1630
|
declare function mixStereo(leftChannels: Float32Array[], rightChannels: Float32Array[], sampleRate?: number, options?: MixOptions): MixResult;
|
|
1344
1631
|
/**
|
|
1345
1632
|
* Block-by-block streaming variant of {@link masteringChain}.
|
|
@@ -1508,23 +1795,86 @@ declare class StreamingRetune {
|
|
|
1508
1795
|
/** Release the underlying WASM object. Safe to call only once. */
|
|
1509
1796
|
delete(): void;
|
|
1510
1797
|
}
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1798
|
+
declare class RealtimeVoiceChanger {
|
|
1799
|
+
private changer;
|
|
1800
|
+
constructor(config?: RealtimeVoiceChangerConfigInput);
|
|
1801
|
+
prepare(sampleRate: number, maxBlockSize?: number, channels?: number): void;
|
|
1802
|
+
reset(): void;
|
|
1803
|
+
setConfig(config: RealtimeVoiceChangerConfigInput): void;
|
|
1804
|
+
configJson(): string;
|
|
1805
|
+
latencySamples(): number;
|
|
1806
|
+
processMono(samples: Float32Array): Float32Array;
|
|
1807
|
+
processMonoInto(samples: Float32Array, output: Float32Array): void;
|
|
1808
|
+
processInterleaved(samples: Float32Array, channels: number): Float32Array;
|
|
1809
|
+
processInterleavedInto(samples: Float32Array, channels: number, output: Float32Array): void;
|
|
1810
|
+
/**
|
|
1811
|
+
* Acquire a typed-memory view onto the WASM heap for mono input.
|
|
1812
|
+
*
|
|
1813
|
+
* Write your input samples into the returned `Float32Array` directly (e.g.
|
|
1814
|
+
* via `input.set(source)`); no copy crosses the JS↔C++ bridge until
|
|
1815
|
+
* {@link processPreparedMono} is called. The view is owned by this
|
|
1816
|
+
* RealtimeVoiceChanger and becomes invalid after {@link delete}; it may
|
|
1817
|
+
* also be invalidated if you later call this method with a larger
|
|
1818
|
+
* `numSamples` value (the underlying buffer may be reallocated).
|
|
1819
|
+
*/
|
|
1820
|
+
getMonoInputBuffer(numSamples: number): Float32Array;
|
|
1821
|
+
/** Mono output view counterpart to {@link getMonoInputBuffer}. */
|
|
1822
|
+
getMonoOutputBuffer(numSamples: number): Float32Array;
|
|
1823
|
+
/**
|
|
1824
|
+
* Process the previously-acquired mono input buffer in place. The output
|
|
1825
|
+
* appears in the buffer returned by {@link getMonoOutputBuffer}. No JS↔C++
|
|
1826
|
+
* sample-level crossings happen on this call — it just hands control to
|
|
1827
|
+
* the underlying DSP on already-on-heap data.
|
|
1828
|
+
*/
|
|
1829
|
+
processPreparedMono(numSamples: number): void;
|
|
1830
|
+
/** Interleaved input view (layout L0,R0,L1,R1,...). */
|
|
1831
|
+
getInterleavedInputBuffer(numFrames: number, numChannels: number): Float32Array;
|
|
1832
|
+
/** Interleaved output view counterpart. */
|
|
1833
|
+
getInterleavedOutputBuffer(numFrames: number, numChannels: number): Float32Array;
|
|
1834
|
+
/**
|
|
1835
|
+
* Process the previously-acquired interleaved buffer in place. Output
|
|
1836
|
+
* appears in the buffer returned by {@link getInterleavedOutputBuffer}.
|
|
1837
|
+
*/
|
|
1838
|
+
processPreparedInterleaved(numFrames: number, numChannels: number): void;
|
|
1839
|
+
/**
|
|
1840
|
+
* Planar-channel input/output view (one Float32Array per channel). Matches
|
|
1841
|
+
* AudioWorklet's native layout; processing happens in place.
|
|
1842
|
+
*/
|
|
1843
|
+
getPlanarChannelBuffer(channel: number, numFrames: number): Float32Array;
|
|
1844
|
+
/**
|
|
1845
|
+
* Process the previously-acquired planar channel buffers in place. Each
|
|
1846
|
+
* channel must have been obtained from {@link getPlanarChannelBuffer}
|
|
1847
|
+
* with the same `numFrames`. Output replaces input in the same buffers.
|
|
1848
|
+
*/
|
|
1849
|
+
processPreparedPlanar(numFrames: number): void;
|
|
1850
|
+
/**
|
|
1851
|
+
* Convenience factory for the mono zero-copy path: returns the input/output
|
|
1852
|
+
* heap views plus a `process()` thunk wired to the same `numSamples`. The
|
|
1853
|
+
* views are reused across calls and become invalid after {@link delete}.
|
|
1854
|
+
*/
|
|
1855
|
+
createRealtimeMonoBuffer(numSamples: number): RealtimeVoiceChangerMonoBuffer;
|
|
1856
|
+
/** Same as {@link createRealtimeMonoBuffer} but for interleaved I/O. */
|
|
1857
|
+
createRealtimeInterleavedBuffer(numFrames: number, numChannels: number): RealtimeVoiceChangerInterleavedBuffer;
|
|
1858
|
+
/**
|
|
1859
|
+
* Convenience factory for the planar zero-copy path. Acquires one
|
|
1860
|
+
* heap-backed Float32Array per channel and returns a `process()` thunk
|
|
1861
|
+
* wired to the same `numFrames`. Buffers are reused across calls and
|
|
1862
|
+
* become invalid after {@link delete}.
|
|
1863
|
+
*/
|
|
1864
|
+
createRealtimePlanarBuffer(numFrames: number, numChannels: number): RealtimeVoiceChangerPlanarBuffer;
|
|
1865
|
+
delete(): void;
|
|
1866
|
+
}
|
|
1867
|
+
declare function realtimeVoiceChangerPresetNames(): VoicePresetId[];
|
|
1868
|
+
declare function realtimeVoiceChangerPresetJson(name: VoicePresetId): string;
|
|
1869
|
+
declare function validateRealtimeVoiceChangerPresetJson(json: string): {
|
|
1870
|
+
ok: boolean;
|
|
1871
|
+
normalizedJson?: string;
|
|
1872
|
+
error?: string;
|
|
1873
|
+
};
|
|
1524
1874
|
/**
|
|
1525
1875
|
* Persistent, scene-based stereo mixer.
|
|
1526
1876
|
*
|
|
1527
|
-
* Build one from a scene JSON string (e.g. {@link
|
|
1877
|
+
* Build one from a scene JSON string (e.g. {@link mixingScenePresetJson} or a
|
|
1528
1878
|
* hand-authored scene), then feed per-strip stereo blocks through
|
|
1529
1879
|
* {@link processStereo} to get the routed stereo master. Strips, sends, buses,
|
|
1530
1880
|
* and inserts are described entirely by the scene; the routing graph is
|
|
@@ -1536,7 +1886,7 @@ declare function mixerScenePresetJson(preset: string): string;
|
|
|
1536
1886
|
*
|
|
1537
1887
|
* @example
|
|
1538
1888
|
* ```typescript
|
|
1539
|
-
* const mixer = Mixer.fromSceneJson(
|
|
1889
|
+
* const mixer = Mixer.fromSceneJson(mixingScenePresetJson('basicStereo'), 48000, 512);
|
|
1540
1890
|
* try {
|
|
1541
1891
|
* const out = mixer.processStereo([stripL], [stripR]);
|
|
1542
1892
|
* } finally {
|
|
@@ -1623,6 +1973,16 @@ declare class Mixer {
|
|
|
1623
1973
|
removeVcaGroup(id: string): void;
|
|
1624
1974
|
/** Number of VCA groups in the mixer topology. */
|
|
1625
1975
|
vcaGroupCount(): number;
|
|
1976
|
+
/** Set the strip's input trim in dB. */
|
|
1977
|
+
setInputTrimDb(stripIndex: number, db: number): void;
|
|
1978
|
+
/** Set the strip's fader level in dB. */
|
|
1979
|
+
setFaderDb(stripIndex: number, db: number): void;
|
|
1980
|
+
/** Set the strip's pan position. */
|
|
1981
|
+
setPan(stripIndex: number, pan: number, panMode?: PanMode | number): void;
|
|
1982
|
+
/** Set the strip's stereo width. */
|
|
1983
|
+
setWidth(stripIndex: number, width: number): void;
|
|
1984
|
+
/** Set the strip's mute state. */
|
|
1985
|
+
setMuted(stripIndex: number, muted: boolean): void;
|
|
1626
1986
|
/**
|
|
1627
1987
|
* Set a strip's solo state. Takes effect on the next process without a
|
|
1628
1988
|
* graph recompile.
|
|
@@ -1736,22 +2096,22 @@ declare function trim(samples: Float32Array, sampleRate: number, thresholdDb?: n
|
|
|
1736
2096
|
* Compute Short-Time Fourier Transform (STFT).
|
|
1737
2097
|
*
|
|
1738
2098
|
* @param samples - Audio samples (mono, float32)
|
|
1739
|
-
* @param sampleRate - Sample rate in Hz
|
|
2099
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1740
2100
|
* @param nFft - FFT size (default: 2048)
|
|
1741
2101
|
* @param hopLength - Hop length (default: 512)
|
|
1742
2102
|
* @returns STFT result with magnitude and power spectrograms
|
|
1743
2103
|
*/
|
|
1744
|
-
declare function stft(samples: Float32Array, sampleRate
|
|
2104
|
+
declare function stft(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): StftResult;
|
|
1745
2105
|
/**
|
|
1746
2106
|
* Compute STFT and return magnitude in decibels.
|
|
1747
2107
|
*
|
|
1748
2108
|
* @param samples - Audio samples (mono, float32)
|
|
1749
|
-
* @param sampleRate - Sample rate in Hz
|
|
2109
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1750
2110
|
* @param nFft - FFT size (default: 2048)
|
|
1751
2111
|
* @param hopLength - Hop length (default: 512)
|
|
1752
2112
|
* @returns STFT result with dB values
|
|
1753
2113
|
*/
|
|
1754
|
-
declare function stftDb(samples: Float32Array, sampleRate
|
|
2114
|
+
declare function stftDb(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): {
|
|
1755
2115
|
nBins: number;
|
|
1756
2116
|
nFrames: number;
|
|
1757
2117
|
db: Float32Array;
|
|
@@ -1760,25 +2120,25 @@ declare function stftDb(samples: Float32Array, sampleRate: number, nFft?: number
|
|
|
1760
2120
|
* Compute Mel spectrogram.
|
|
1761
2121
|
*
|
|
1762
2122
|
* @param samples - Audio samples (mono, float32)
|
|
1763
|
-
* @param sampleRate - Sample rate in Hz
|
|
2123
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1764
2124
|
* @param nFft - FFT size (default: 2048)
|
|
1765
2125
|
* @param hopLength - Hop length (default: 512)
|
|
1766
2126
|
* @param nMels - Number of Mel bands (default: 128)
|
|
1767
2127
|
* @returns Mel spectrogram result
|
|
1768
2128
|
*/
|
|
1769
|
-
declare function melSpectrogram(samples: Float32Array, sampleRate
|
|
2129
|
+
declare function melSpectrogram(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number): MelSpectrogramResult;
|
|
1770
2130
|
/**
|
|
1771
2131
|
* Compute MFCC (Mel-Frequency Cepstral Coefficients).
|
|
1772
2132
|
*
|
|
1773
2133
|
* @param samples - Audio samples (mono, float32)
|
|
1774
|
-
* @param sampleRate - Sample rate in Hz
|
|
2134
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1775
2135
|
* @param nFft - FFT size (default: 2048)
|
|
1776
2136
|
* @param hopLength - Hop length (default: 512)
|
|
1777
2137
|
* @param nMels - Number of Mel bands (default: 128)
|
|
1778
|
-
* @param nMfcc - Number of MFCC coefficients (default:
|
|
2138
|
+
* @param nMfcc - Number of MFCC coefficients (default: 20)
|
|
1779
2139
|
* @returns MFCC result
|
|
1780
2140
|
*/
|
|
1781
|
-
declare function mfcc(samples: Float32Array, sampleRate
|
|
2141
|
+
declare function mfcc(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nMels?: number, nMfcc?: number): MfccResult;
|
|
1782
2142
|
/**
|
|
1783
2143
|
* Approximate inverse of a Mel filterbank: Mel power spectrogram -> STFT power
|
|
1784
2144
|
* spectrogram. Mirrors `feature::mel_to_stft`.
|
|
@@ -1788,10 +2148,11 @@ declare function mfcc(samples: Float32Array, sampleRate: number, nFft?: number,
|
|
|
1788
2148
|
* @param nFrames - Number of time frames
|
|
1789
2149
|
* @param sampleRate - Sample rate in Hz
|
|
1790
2150
|
* @param nFft - FFT size (default: 2048)
|
|
1791
|
-
* @param
|
|
2151
|
+
* @param fmin - Lower Mel band edge in Hz (default: 0)
|
|
2152
|
+
* @param fmax - Upper Mel band edge in Hz (default: sr/2 when 0)
|
|
1792
2153
|
* @returns STFT power spectrogram result
|
|
1793
2154
|
*/
|
|
1794
|
-
declare function melToStft(melPower: Float32Array, nMels: number, nFrames: number, sampleRate
|
|
2155
|
+
declare function melToStft(melPower: Float32Array, nMels: number, nFrames: number, sampleRate?: number, nFft?: number, fmin?: number, fmax?: number): StftPowerResult;
|
|
1795
2156
|
/**
|
|
1796
2157
|
* Reconstruct audio from a Mel power spectrogram via Griffin-Lim. Mirrors
|
|
1797
2158
|
* `feature::mel_to_audio`.
|
|
@@ -1802,10 +2163,12 @@ declare function melToStft(melPower: Float32Array, nMels: number, nFrames: numbe
|
|
|
1802
2163
|
* @param sampleRate - Sample rate in Hz
|
|
1803
2164
|
* @param nFft - FFT size (default: 2048)
|
|
1804
2165
|
* @param hopLength - Hop length (default: 512)
|
|
2166
|
+
* @param fmin - Minimum Mel frequency in Hz (default: 0)
|
|
2167
|
+
* @param fmax - Maximum Mel frequency in Hz (default: 0 = sr/2)
|
|
1805
2168
|
* @param nIter - Griffin-Lim iterations (default: 32)
|
|
1806
2169
|
* @returns Reconstructed audio samples (mono, float32)
|
|
1807
2170
|
*/
|
|
1808
|
-
declare function melToAudio(melPower: Float32Array, nMels: number, nFrames: number, sampleRate
|
|
2171
|
+
declare function melToAudio(melPower: Float32Array, nMels: number, nFrames: number, sampleRate?: number, nFft?: number, hopLength?: number, fmin?: number, fmax?: number, nIter?: number): Float32Array;
|
|
1809
2172
|
/**
|
|
1810
2173
|
* Invert MFCC coefficients back to a Mel power spectrogram. Mirrors
|
|
1811
2174
|
* `feature::mfcc_to_mel`.
|
|
@@ -1825,110 +2188,173 @@ declare function mfccToMel(mfccCoefficients: Float32Array, nMfcc: number, nFrame
|
|
|
1825
2188
|
* @param nMfcc - Number of MFCC coefficients
|
|
1826
2189
|
* @param nFrames - Number of time frames
|
|
1827
2190
|
* @param nMels - Number of Mel bins (default: 128)
|
|
1828
|
-
* @param sampleRate - Sample rate in Hz
|
|
2191
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1829
2192
|
* @param nFft - FFT size (default: 2048)
|
|
1830
2193
|
* @param hopLength - Hop length (default: 512)
|
|
2194
|
+
* @param fmin - Minimum Mel frequency in Hz (default: 0)
|
|
2195
|
+
* @param fmax - Maximum Mel frequency in Hz (default: 0 = sr/2)
|
|
1831
2196
|
* @param nIter - Griffin-Lim iterations (default: 32)
|
|
1832
2197
|
* @returns Reconstructed audio samples (mono, float32)
|
|
1833
2198
|
*/
|
|
1834
|
-
declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels
|
|
2199
|
+
declare function mfccToAudio(mfccCoefficients: Float32Array, nMfcc: number, nFrames: number, nMels?: number, sampleRate?: number, nFft?: number, hopLength?: number, fmin?: number, fmax?: number, nIter?: number): Float32Array;
|
|
1835
2200
|
/**
|
|
1836
2201
|
* Compute chromagram (pitch class distribution).
|
|
1837
2202
|
*
|
|
1838
2203
|
* @param samples - Audio samples (mono, float32)
|
|
1839
|
-
* @param sampleRate - Sample rate in Hz
|
|
2204
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1840
2205
|
* @param nFft - FFT size (default: 2048)
|
|
1841
2206
|
* @param hopLength - Hop length (default: 512)
|
|
1842
2207
|
* @returns Chroma features result
|
|
1843
2208
|
*/
|
|
1844
|
-
declare function chroma(samples: Float32Array, sampleRate
|
|
2209
|
+
declare function chroma(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): ChromaResult;
|
|
1845
2210
|
/**
|
|
1846
2211
|
* Compute spectral centroid (center of mass of spectrum).
|
|
1847
2212
|
*
|
|
1848
2213
|
* @param samples - Audio samples (mono, float32)
|
|
1849
|
-
* @param sampleRate - Sample rate in Hz
|
|
2214
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1850
2215
|
* @param nFft - FFT size (default: 2048)
|
|
1851
2216
|
* @param hopLength - Hop length (default: 512)
|
|
1852
2217
|
* @returns Spectral centroid in Hz for each frame
|
|
1853
2218
|
*/
|
|
1854
|
-
declare function spectralCentroid(samples: Float32Array, sampleRate
|
|
2219
|
+
declare function spectralCentroid(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
2220
|
+
/**
|
|
2221
|
+
* Compute spectral contrast (librosa.feature.spectral_contrast).
|
|
2222
|
+
*
|
|
2223
|
+
* @returns Matrix2d of shape (nBands + 1) x nFrames.
|
|
2224
|
+
*/
|
|
2225
|
+
declare function spectralContrast(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, nBands?: number, fmin?: number, quantile?: number): WasmMatrix2dResult;
|
|
2226
|
+
/**
|
|
2227
|
+
* Fit per-frame polynomial coefficients (librosa.feature.poly_features).
|
|
2228
|
+
*
|
|
2229
|
+
* @returns Matrix2d of shape (order + 1) x nFrames.
|
|
2230
|
+
*/
|
|
2231
|
+
declare function polyFeatures(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, order?: number): WasmMatrix2dResult;
|
|
2232
|
+
/**
|
|
2233
|
+
* Locate zero-crossing indices of a signal (librosa.zero_crossings).
|
|
2234
|
+
*/
|
|
2235
|
+
declare function zeroCrossings(samples: Float32Array, threshold?: number, refMagnitude?: boolean, pad?: boolean, zeroPos?: boolean): Int32Array;
|
|
2236
|
+
/**
|
|
2237
|
+
* Estimate the global tuning offset from a set of frequencies
|
|
2238
|
+
* (librosa.pitch_tuning). Returns a deviation in fractions of a bin.
|
|
2239
|
+
*/
|
|
2240
|
+
declare function pitchTuning(frequencies: Float32Array, resolution?: number, binsPerOctave?: number): number;
|
|
2241
|
+
/**
|
|
2242
|
+
* Estimate the tuning offset of an audio signal (librosa.estimate_tuning).
|
|
2243
|
+
*/
|
|
2244
|
+
declare function estimateTuning(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, resolution?: number, binsPerOctave?: number): number;
|
|
2245
|
+
/**
|
|
2246
|
+
* Non-negative matrix factorisation of a flattened [nFeatures x nFrames]
|
|
2247
|
+
* spectrogram (librosa.decompose.decompose). Returns the W and H factors.
|
|
2248
|
+
*/
|
|
2249
|
+
declare function decompose(s: Float32Array, nFeatures: number, nFrames: number, nComponents: number, nIter?: number, beta?: number): WasmDecomposeResult;
|
|
2250
|
+
/**
|
|
2251
|
+
* Nearest-neighbour filtering of a flattened [nFeatures x nFrames] spectrogram
|
|
2252
|
+
* (librosa.decompose.nn_filter).
|
|
2253
|
+
*/
|
|
2254
|
+
declare function nnFilter(s: Float32Array, nFeatures: number, nFrames: number, aggregate?: string, k?: number, width?: number): WasmMatrix2dResult;
|
|
2255
|
+
/**
|
|
2256
|
+
* Reorder/concatenate a signal by interval slices (librosa.effects.remix).
|
|
2257
|
+
*
|
|
2258
|
+
* @param intervals - Flat (start, end) sample pairs (even length).
|
|
2259
|
+
*/
|
|
2260
|
+
declare function remix(samples: Float32Array, intervals: Int32Array | ArrayLike<number>, sampleRate?: number, alignZeros?: boolean): Float32Array;
|
|
2261
|
+
/**
|
|
2262
|
+
* Phase-vocoder time-scale modification (rate > 1 faster, < 1 slower).
|
|
2263
|
+
*/
|
|
2264
|
+
declare function phaseVocoder(samples: Float32Array, rate: number, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
2265
|
+
/**
|
|
2266
|
+
* HPSS into harmonic / percussive / residual signals.
|
|
2267
|
+
*/
|
|
2268
|
+
declare function hpssWithResidual(samples: Float32Array, sampleRate?: number, kernelHarmonic?: number, kernelPercussive?: number): WasmHpssWithResidualResult;
|
|
2269
|
+
/**
|
|
2270
|
+
* Channel-weighted multichannel integrated loudness + LRA (ITU-R BS.1770 /
|
|
2271
|
+
* EBU R128) from an interleaved buffer of `frames * channels` samples. The
|
|
2272
|
+
* per-channel frame count is derived from the buffer length and `channels`.
|
|
2273
|
+
*/
|
|
2274
|
+
declare function lufsInterleaved(samples: Float32Array, channels: number, sampleRate?: number): WasmLufsResult;
|
|
2275
|
+
/**
|
|
2276
|
+
* Standards-compliant EBU R128 loudness range (LRA) in LU.
|
|
2277
|
+
*/
|
|
2278
|
+
declare function ebur128LoudnessRange(samples: Float32Array, sampleRate?: number): number;
|
|
1855
2279
|
/**
|
|
1856
2280
|
* Compute spectral bandwidth.
|
|
1857
2281
|
*
|
|
1858
2282
|
* @param samples - Audio samples (mono, float32)
|
|
1859
|
-
* @param sampleRate - Sample rate in Hz
|
|
2283
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1860
2284
|
* @param nFft - FFT size (default: 2048)
|
|
1861
2285
|
* @param hopLength - Hop length (default: 512)
|
|
1862
2286
|
* @returns Spectral bandwidth in Hz for each frame
|
|
1863
2287
|
*/
|
|
1864
|
-
declare function spectralBandwidth(samples: Float32Array, sampleRate
|
|
2288
|
+
declare function spectralBandwidth(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
1865
2289
|
/**
|
|
1866
2290
|
* Compute spectral rolloff frequency.
|
|
1867
2291
|
*
|
|
1868
2292
|
* @param samples - Audio samples (mono, float32)
|
|
1869
|
-
* @param sampleRate - Sample rate in Hz
|
|
2293
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1870
2294
|
* @param nFft - FFT size (default: 2048)
|
|
1871
2295
|
* @param hopLength - Hop length (default: 512)
|
|
1872
2296
|
* @param rollPercent - Percentage threshold (default: 0.85)
|
|
1873
2297
|
* @returns Rolloff frequency in Hz for each frame
|
|
1874
2298
|
*/
|
|
1875
|
-
declare function spectralRolloff(samples: Float32Array, sampleRate
|
|
2299
|
+
declare function spectralRolloff(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, rollPercent?: number): Float32Array;
|
|
1876
2300
|
/**
|
|
1877
2301
|
* Compute spectral flatness.
|
|
1878
2302
|
*
|
|
1879
2303
|
* @param samples - Audio samples (mono, float32)
|
|
1880
|
-
* @param sampleRate - Sample rate in Hz
|
|
2304
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1881
2305
|
* @param nFft - FFT size (default: 2048)
|
|
1882
2306
|
* @param hopLength - Hop length (default: 512)
|
|
1883
2307
|
* @returns Spectral flatness for each frame (0 = tonal, 1 = noise-like)
|
|
1884
2308
|
*/
|
|
1885
|
-
declare function spectralFlatness(samples: Float32Array, sampleRate
|
|
2309
|
+
declare function spectralFlatness(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number): Float32Array;
|
|
1886
2310
|
/**
|
|
1887
2311
|
* Compute zero crossing rate.
|
|
1888
2312
|
*
|
|
1889
2313
|
* @param samples - Audio samples (mono, float32)
|
|
1890
|
-
* @param sampleRate - Sample rate in Hz
|
|
2314
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1891
2315
|
* @param frameLength - Frame length (default: 2048)
|
|
1892
2316
|
* @param hopLength - Hop length (default: 512)
|
|
1893
2317
|
* @returns Zero crossing rate for each frame
|
|
1894
2318
|
*/
|
|
1895
|
-
declare function zeroCrossingRate(samples: Float32Array, sampleRate
|
|
2319
|
+
declare function zeroCrossingRate(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
1896
2320
|
/**
|
|
1897
2321
|
* Compute RMS energy.
|
|
1898
2322
|
*
|
|
1899
2323
|
* @param samples - Audio samples (mono, float32)
|
|
1900
|
-
* @param sampleRate - Sample rate in Hz
|
|
2324
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1901
2325
|
* @param frameLength - Frame length (default: 2048)
|
|
1902
2326
|
* @param hopLength - Hop length (default: 512)
|
|
1903
2327
|
* @returns RMS energy for each frame
|
|
1904
2328
|
*/
|
|
1905
|
-
declare function rmsEnergy(samples: Float32Array, sampleRate
|
|
2329
|
+
declare function rmsEnergy(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number): Float32Array;
|
|
1906
2330
|
/**
|
|
1907
2331
|
* Detect pitch using YIN algorithm.
|
|
1908
2332
|
*
|
|
1909
2333
|
* @param samples - Audio samples (mono, float32)
|
|
1910
|
-
* @param sampleRate - Sample rate in Hz
|
|
2334
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1911
2335
|
* @param frameLength - Frame length (default: 2048)
|
|
1912
2336
|
* @param hopLength - Hop length (default: 512)
|
|
1913
2337
|
* @param fmin - Minimum frequency in Hz (default: 65)
|
|
1914
2338
|
* @param fmax - Maximum frequency in Hz (default: 2093)
|
|
1915
2339
|
* @param threshold - YIN threshold (default: 0.3)
|
|
2340
|
+
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
1916
2341
|
* @returns Pitch detection result
|
|
1917
2342
|
*/
|
|
1918
|
-
declare function pitchYin(samples: Float32Array, sampleRate
|
|
2343
|
+
declare function pitchYin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
1919
2344
|
/**
|
|
1920
2345
|
* Detect pitch using pYIN algorithm (probabilistic YIN with HMM smoothing).
|
|
1921
2346
|
*
|
|
1922
2347
|
* @param samples - Audio samples (mono, float32)
|
|
1923
|
-
* @param sampleRate - Sample rate in Hz
|
|
2348
|
+
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
1924
2349
|
* @param frameLength - Frame length (default: 2048)
|
|
1925
2350
|
* @param hopLength - Hop length (default: 512)
|
|
1926
2351
|
* @param fmin - Minimum frequency in Hz (default: 65)
|
|
1927
2352
|
* @param fmax - Maximum frequency in Hz (default: 2093)
|
|
1928
2353
|
* @param threshold - YIN threshold (default: 0.3)
|
|
2354
|
+
* @param fillNa - If true, return 0 for unvoiced f0 frames; otherwise keep NaN (default: false)
|
|
1929
2355
|
* @returns Pitch detection result
|
|
1930
2356
|
*/
|
|
1931
|
-
declare function pitchPyin(samples: Float32Array, sampleRate
|
|
2357
|
+
declare function pitchPyin(samples: Float32Array, sampleRate?: number, frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
1932
2358
|
/**
|
|
1933
2359
|
* Convert frequency in Hz to Mel scale.
|
|
1934
2360
|
*
|
|
@@ -1975,20 +2401,20 @@ declare function noteToHz(note: string): number;
|
|
|
1975
2401
|
* Convert frame index to time in seconds.
|
|
1976
2402
|
*
|
|
1977
2403
|
* @param frames - Frame index
|
|
1978
|
-
* @param sr - Sample rate in Hz
|
|
1979
|
-
* @param hopLength - Hop length in samples
|
|
2404
|
+
* @param sr - Sample rate in Hz (default: 22050)
|
|
2405
|
+
* @param hopLength - Hop length in samples (default: 512)
|
|
1980
2406
|
* @returns Time in seconds
|
|
1981
2407
|
*/
|
|
1982
|
-
declare function framesToTime(frames: number, sr
|
|
2408
|
+
declare function framesToTime(frames: number, sr?: number, hopLength?: number): number;
|
|
1983
2409
|
/**
|
|
1984
2410
|
* Convert time in seconds to frame index.
|
|
1985
2411
|
*
|
|
1986
2412
|
* @param time - Time in seconds
|
|
1987
|
-
* @param sr - Sample rate in Hz
|
|
1988
|
-
* @param hopLength - Hop length in samples
|
|
2413
|
+
* @param sr - Sample rate in Hz (default: 22050)
|
|
2414
|
+
* @param hopLength - Hop length in samples (default: 512)
|
|
1989
2415
|
* @returns Frame index
|
|
1990
2416
|
*/
|
|
1991
|
-
declare function timeToFrames(time: number, sr
|
|
2417
|
+
declare function timeToFrames(time: number, sr?: number, hopLength?: number): number;
|
|
1992
2418
|
declare function framesToSamples(frames: number, hopLength?: number, nFft?: number): number;
|
|
1993
2419
|
declare function samplesToFrames(samples: number, hopLength?: number, nFft?: number): number;
|
|
1994
2420
|
declare function powerToDb(values: Float32Array, ref?: number, amin?: number, topDb?: number): Float32Array;
|
|
@@ -2000,16 +2426,16 @@ declare function deemphasis(samples: Float32Array, coef?: number, zi?: number):
|
|
|
2000
2426
|
declare function trimSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): WasmTrimResult;
|
|
2001
2427
|
declare function splitSilence(samples: Float32Array, topDb?: number, frameLength?: number, hopLength?: number): Int32Array;
|
|
2002
2428
|
declare function frameSignal(samples: Float32Array, frameLength: number, hopLength: number): WasmFrameResult;
|
|
2003
|
-
declare function padCenter(values: Float32Array,
|
|
2004
|
-
declare function fixLength(values: Float32Array,
|
|
2429
|
+
declare function padCenter(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
2430
|
+
declare function fixLength(values: Float32Array, targetSize: number, padValue?: number): Float32Array;
|
|
2005
2431
|
declare function fixFrames(frames: Int32Array, xMin?: number, xMax?: number, pad?: boolean): Int32Array;
|
|
2006
2432
|
declare function peakPick(values: Float32Array, preMax: number, postMax: number, preAvg: number, postAvg: number, delta: number, wait: number): Int32Array;
|
|
2007
2433
|
declare function vectorNormalize(values: Float32Array, normType?: number, threshold?: number): Float32Array;
|
|
2008
2434
|
declare function pcen(values: Float32Array, nBins: number, nFrames: number, options?: Record<string, number>): Float32Array;
|
|
2009
2435
|
declare function tonnetz(chromagram: Float32Array, nChroma: number, nFrames: number): Float32Array;
|
|
2010
|
-
declare function tempogram(onsetEnvelope: Float32Array, sampleRate
|
|
2011
|
-
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate
|
|
2012
|
-
declare function plp(onsetEnvelope: Float32Array, sampleRate
|
|
2436
|
+
declare function tempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, mode?: TempogramMode): WasmTempogramResult;
|
|
2437
|
+
declare function cyclicTempogram(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, winLength?: number, bpmMin?: number, nBins?: number): WasmCyclicTempogramResult;
|
|
2438
|
+
declare function plp(onsetEnvelope: Float32Array, sampleRate?: number, hopLength?: number, tempoMin?: number, tempoMax?: number, winLength?: number): Float32Array;
|
|
2013
2439
|
/**
|
|
2014
2440
|
* Compute NNLS (non-negative least squares) chromagram.
|
|
2015
2441
|
*
|
|
@@ -2050,7 +2476,7 @@ declare function vqt(samples: Float32Array, sampleRate?: number, hopLength?: num
|
|
|
2050
2476
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
2051
2477
|
* @param nFft - FFT size (default: 2048)
|
|
2052
2478
|
* @param hopLength - Hop length (default: 512)
|
|
2053
|
-
* @param minSectionSec - Minimum section duration in seconds (default:
|
|
2479
|
+
* @param minSectionSec - Minimum section duration in seconds (default: 4.0)
|
|
2054
2480
|
* @returns Array of detected sections
|
|
2055
2481
|
*/
|
|
2056
2482
|
declare function analyzeSections(samples: Float32Array, sampleRate?: number, nFft?: number, hopLength?: number, minSectionSec?: number): Section[];
|
|
@@ -2105,7 +2531,7 @@ declare function tempogramRatio(tempogramData: Float32Array, winLength?: number,
|
|
|
2105
2531
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
2106
2532
|
* @returns Loudness measurement result
|
|
2107
2533
|
*/
|
|
2108
|
-
declare function lufs(samples: Float32Array, sampleRate?: number): LufsResult;
|
|
2534
|
+
declare function lufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): LufsResult;
|
|
2109
2535
|
/**
|
|
2110
2536
|
* Compute the momentary loudness (LUFS) over time.
|
|
2111
2537
|
*
|
|
@@ -2113,7 +2539,7 @@ declare function lufs(samples: Float32Array, sampleRate?: number): LufsResult;
|
|
|
2113
2539
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
2114
2540
|
* @returns Momentary LUFS values over time
|
|
2115
2541
|
*/
|
|
2116
|
-
declare function momentaryLufs(samples: Float32Array, sampleRate?: number): Float32Array;
|
|
2542
|
+
declare function momentaryLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
2117
2543
|
/**
|
|
2118
2544
|
* Compute the short-term loudness (LUFS) over time.
|
|
2119
2545
|
*
|
|
@@ -2121,7 +2547,105 @@ declare function momentaryLufs(samples: Float32Array, sampleRate?: number): Floa
|
|
|
2121
2547
|
* @param sampleRate - Sample rate in Hz (default: 22050)
|
|
2122
2548
|
* @returns Short-term LUFS values over time
|
|
2123
2549
|
*/
|
|
2124
|
-
declare function shortTermLufs(samples: Float32Array, sampleRate?: number): Float32Array;
|
|
2550
|
+
declare function shortTermLufs(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): Float32Array;
|
|
2551
|
+
/** One contiguous run of clipped samples reported by `meteringDetectClipping`. */
|
|
2552
|
+
interface ClippingRegion {
|
|
2553
|
+
startSample: number;
|
|
2554
|
+
endSample: number;
|
|
2555
|
+
length: number;
|
|
2556
|
+
peak: number;
|
|
2557
|
+
}
|
|
2558
|
+
/** Aggregated clipping report. */
|
|
2559
|
+
interface ClippingReport {
|
|
2560
|
+
clippedSamples: number;
|
|
2561
|
+
clippingRatio: number;
|
|
2562
|
+
maxClippedPeak: number;
|
|
2563
|
+
regions: ClippingRegion[];
|
|
2564
|
+
}
|
|
2565
|
+
/** Sliding-window dynamic range report. */
|
|
2566
|
+
interface DynamicRangeReport {
|
|
2567
|
+
dynamicRangeDb: number;
|
|
2568
|
+
lowPercentileDb: number;
|
|
2569
|
+
highPercentileDb: number;
|
|
2570
|
+
windowRmsDb: Float32Array;
|
|
2571
|
+
}
|
|
2572
|
+
declare function meteringPeakDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
2573
|
+
declare function meteringRmsDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
2574
|
+
declare function meteringCrestFactorDb(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
2575
|
+
declare function meteringDcOffset(samples: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
2576
|
+
/**
|
|
2577
|
+
* Inter-sample (true) peak in dBFS. `oversampleFactor` must be a power of two
|
|
2578
|
+
* in [1, 16]; pass 0 to use the library default (4).
|
|
2579
|
+
*/
|
|
2580
|
+
declare function meteringTruePeakDb(samples: Float32Array, sampleRate?: number, oversampleFactor?: number, options?: ValidateOptions): number;
|
|
2581
|
+
/**
|
|
2582
|
+
* Detect contiguous runs of clipped samples.
|
|
2583
|
+
*
|
|
2584
|
+
* @param threshold Linear absolute threshold (default 0.999).
|
|
2585
|
+
* @param minRegionSamples Minimum run length to report (default 1).
|
|
2586
|
+
*/
|
|
2587
|
+
declare function meteringDetectClipping(samples: Float32Array, sampleRate?: number, threshold?: number, minRegionSamples?: number, options?: ValidateOptions): ClippingReport;
|
|
2588
|
+
/**
|
|
2589
|
+
* Sliding-window dynamic range. Pass 0 for any parameter to use the library
|
|
2590
|
+
* default (window=3 s, hop=1 s, low=0.10, high=0.95).
|
|
2591
|
+
*/
|
|
2592
|
+
declare function meteringDynamicRange(samples: Float32Array, sampleRate?: number, windowSec?: number, hopSec?: number, lowPercentile?: number, highPercentile?: number, options?: ValidateOptions): DynamicRangeReport;
|
|
2593
|
+
/** Mid/side vectorscope point series for a (left, right) stereo pair. */
|
|
2594
|
+
interface VectorscopeReport {
|
|
2595
|
+
mid: Float32Array;
|
|
2596
|
+
side: Float32Array;
|
|
2597
|
+
}
|
|
2598
|
+
/** Phase-scope (Lissajous) point series plus summary stats. */
|
|
2599
|
+
interface PhaseScopeReport {
|
|
2600
|
+
mid: Float32Array;
|
|
2601
|
+
side: Float32Array;
|
|
2602
|
+
radius: Float32Array;
|
|
2603
|
+
angleRad: Float32Array;
|
|
2604
|
+
correlation: number;
|
|
2605
|
+
averageAbsAngleRad: number;
|
|
2606
|
+
maxRadius: number;
|
|
2607
|
+
}
|
|
2608
|
+
/** Options for `meteringSpectrum`. */
|
|
2609
|
+
interface SpectrumOptions {
|
|
2610
|
+
/** FFT size. Pass 0 / omit for the library default (2048). */
|
|
2611
|
+
nFft?: number;
|
|
2612
|
+
/** Apply fractional-octave smoothing to magnitude. */
|
|
2613
|
+
applyOctaveSmoothing?: boolean;
|
|
2614
|
+
/** Smoothing fraction (e.g. 3 = 1/3-octave). 0 / omit = library default (3). */
|
|
2615
|
+
octaveFraction?: number;
|
|
2616
|
+
/** Linear reference for the dB conversion. 0 / omit = 1.0. */
|
|
2617
|
+
dbRef?: number;
|
|
2618
|
+
/** Linear floor used to avoid log(0). 0 / omit = library default. */
|
|
2619
|
+
dbAmin?: number;
|
|
2620
|
+
}
|
|
2621
|
+
/** Single-frame magnitude / power / dB spectrum returned by `meteringSpectrum`. */
|
|
2622
|
+
interface SpectrumReport {
|
|
2623
|
+
frequencies: Float32Array;
|
|
2624
|
+
magnitude: Float32Array;
|
|
2625
|
+
power: Float32Array;
|
|
2626
|
+
db: Float32Array;
|
|
2627
|
+
nFft: number;
|
|
2628
|
+
sampleRate: number;
|
|
2629
|
+
}
|
|
2630
|
+
/** Pearson correlation in [-1, 1] between two equal-length channels. */
|
|
2631
|
+
declare function meteringStereoCorrelation(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
2632
|
+
/** Side / mid energy ratio: 0 = pure mono, ~1 = wide stereo. */
|
|
2633
|
+
declare function meteringStereoWidth(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): number;
|
|
2634
|
+
/** Per-sample mid/side point series (one entry per input frame). */
|
|
2635
|
+
declare function meteringVectorscope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): VectorscopeReport;
|
|
2636
|
+
/** Phase-scope point series plus summary stats. */
|
|
2637
|
+
declare function meteringPhaseScope(left: Float32Array, right: Float32Array, sampleRate?: number, options?: ValidateOptions): PhaseScopeReport;
|
|
2638
|
+
/** Single-frame spectrum view (uses the first `nFft` samples of `samples`). */
|
|
2639
|
+
declare function meteringSpectrum(samples: Float32Array, sampleRate?: number, options?: SpectrumOptions & ValidateOptions): SpectrumReport;
|
|
2640
|
+
/**
|
|
2641
|
+
* Snap a MIDI value to the nearest pitch class enabled by `modeMask`.
|
|
2642
|
+
*
|
|
2643
|
+
* `modeMask` is a 12-bit mask. For natural C major use `0b101010110101`.
|
|
2644
|
+
* `referenceMidi` defaults to A4 (69) when passed as 0.
|
|
2645
|
+
*/
|
|
2646
|
+
declare function scaleQuantizeMidi(root: number, modeMask: number, midi: number, referenceMidi?: number): number;
|
|
2647
|
+
declare function scaleCorrectionSemitones(root: number, modeMask: number, midi: number, referenceMidi?: number): number;
|
|
2648
|
+
declare function scalePitchClassEnabled(root: number, modeMask: number, pitchClass: number): boolean;
|
|
2125
2649
|
/**
|
|
2126
2650
|
* Resample audio to a different sample rate.
|
|
2127
2651
|
*
|
|
@@ -2136,7 +2660,7 @@ declare function resample(samples: Float32Array, srcSr: number, targetSr: number
|
|
|
2136
2660
|
*
|
|
2137
2661
|
* @example
|
|
2138
2662
|
* ```typescript
|
|
2139
|
-
* import { init, Audio } from '@libraz/
|
|
2663
|
+
* import { init, Audio } from '@libraz/libsonare';
|
|
2140
2664
|
*
|
|
2141
2665
|
* await init();
|
|
2142
2666
|
*
|
|
@@ -2175,9 +2699,9 @@ declare class Audio {
|
|
|
2175
2699
|
percussive(): Float32Array;
|
|
2176
2700
|
timeStretch(rate: number): Float32Array;
|
|
2177
2701
|
pitchShift(semitones: number): Float32Array;
|
|
2178
|
-
pitchCorrectToMidi(currentMidi
|
|
2179
|
-
noteStretch(onsetSample
|
|
2180
|
-
voiceChange(pitchSemitones
|
|
2702
|
+
pitchCorrectToMidi(currentMidi?: number, targetMidi?: number): Float32Array;
|
|
2703
|
+
noteStretch(onsetSample?: number, offsetSample?: number, stretchRatio?: number): Float32Array;
|
|
2704
|
+
voiceChange(pitchSemitones?: number, formantFactor?: number): Float32Array;
|
|
2181
2705
|
normalize(targetDb?: number): Float32Array;
|
|
2182
2706
|
mastering(targetLufs?: number, ceilingDb?: number, truePeakOversample?: number): MasteringResult;
|
|
2183
2707
|
masteringChain(config: MasteringChainConfig): MasteringChainResult;
|
|
@@ -2204,8 +2728,8 @@ declare class Audio {
|
|
|
2204
2728
|
spectralFlatness(nFft?: number, hopLength?: number): Float32Array;
|
|
2205
2729
|
zeroCrossingRate(frameLength?: number, hopLength?: number): Float32Array;
|
|
2206
2730
|
rmsEnergy(frameLength?: number, hopLength?: number): Float32Array;
|
|
2207
|
-
pitchYin(frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number): PitchResult;
|
|
2208
|
-
pitchPyin(frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number): PitchResult;
|
|
2731
|
+
pitchYin(frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
2732
|
+
pitchPyin(frameLength?: number, hopLength?: number, fmin?: number, fmax?: number, threshold?: number, fillNa?: boolean): PitchResult;
|
|
2209
2733
|
resample(targetSr: number): Float32Array;
|
|
2210
2734
|
}
|
|
2211
2735
|
/**
|
|
@@ -2213,7 +2737,7 @@ declare class Audio {
|
|
|
2213
2737
|
*
|
|
2214
2738
|
* @example
|
|
2215
2739
|
* ```typescript
|
|
2216
|
-
* import { init, StreamAnalyzer } from '@libraz/
|
|
2740
|
+
* import { init, StreamAnalyzer } from '@libraz/libsonare';
|
|
2217
2741
|
*
|
|
2218
2742
|
* await init();
|
|
2219
2743
|
*
|
|
@@ -2316,4 +2840,4 @@ declare class StreamAnalyzer {
|
|
|
2316
2840
|
dispose(): void;
|
|
2317
2841
|
}
|
|
2318
2842
|
|
|
2319
|
-
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
|
|
2843
|
+
export { type AcousticResult, type AnalysisResult, type AnalyzerStats, Audio, type AutomationCurve, type BarChord, type Beat, type BpmAnalysisResult, type BpmCandidate, type Chord, type ChordAnalysisResult, type ChordChange, type ChordDetectionOptions, ChordQuality, type ChromaResult, type ClippingRegion, type ClippingReport, type CompressorDetector, type CompressorOptions, type CqtResult, type DeclickOptions, type DeclipOptions, type DecomposeResult, type DecrackleMode, type DecrackleOptions, type DehumOptions, type DenoiseClassicalMode, type DenoiseClassicalNoiseEstimator, type DenoiseClassicalOptions, type DereverbClassicalOptions, type DynamicRangeReport, type Dynamics, type DynamicsAnalysisResult, type DynamicsResult, EXPECTED_ENGINE_ABI_VERSION, 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 GateOptions, type GoniometerPoint, type HpssResult, type HpssWithResidualResult, 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 Matrix2dResult, type MelPowerResult, 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, type PhaseScopeReport, PitchClass as Pitch, PitchClass, type PitchResult, type ProgressiveEstimate, RealtimeEngine, RealtimeVoiceChanger, type RealtimeVoiceChangerConfigInput, type RealtimeVoiceChangerInterleavedBuffer, type RealtimeVoiceChangerMonoBuffer, type RealtimeVoiceChangerPlanarBuffer, type RealtimeVoiceChangerPodConfig, type RhythmAnalysisResult, type RhythmFeatures, type RirResult, type RirSynthOptions, type RoomEstimateOptions, type RoomEstimateResult, type RoomGeometryOptions, type RoomMorphOptions, type Section, SectionType, type SendTiming, type SoloProcessor, type SpectrumOptions, type SpectrumReport, type StereoAnalysis, type StftPowerResult, type StftResult, StreamAnalyzer, type StreamConfig, type StreamFramesI16, type StreamFramesU8, StreamingEqualizer, type StreamingEqualizerConfig, StreamingMasteringChain, type StreamingPlatform, StreamingRetune, type StreamingRetuneConfig, type TempogramMode, type Timbre, type TimbreAnalysisResult, type TimbreFrame, type TimeSignature, type TransientShaperOptions, type TrimSilenceMode, type TrimSilenceOptions, type ValidateOptions, type VectorscopeReport, type VoiceChangeRealtimeOptions, type VoicePresetId, amplitudeToDb, analyze, analyzeBpm, analyzeDynamics, analyzeImpulseResponse, analyzeMelody, analyzeRhythm, analyzeSections, analyzeTimbre, analyzeWithProgress, chroma, cqt, cyclicTempogram, dbToAmplitude, dbToPower, decompose, deemphasis, detectAcoustic, detectBeats, detectBpm, detectChords, detectDownbeats, detectKey, detectKeyCandidates, detectOnsets, ebur128LoudnessRange, engineAbiVersion, engineCapabilities, estimateRoom, estimateTuning, fixFrames, fixLength, fourierTempogram, frameSignal, framesToSamples, framesToTime, harmonic, hasFfmpegSupport, hpss, hpssWithResidual, hzToMel, hzToMidi, hzToNote, init, isInitialized, lufs, lufsInterleaved, masterAudio, masterAudioStereo, masterAudioStereoWithProgress, masterAudioWithProgress, mastering, masteringAssistantSuggest, masteringAudioProfile, masteringChain, masteringChainStereo, masteringChainStereoWithProgress, masteringChainWithProgress, masteringDynamicsCompressor, masteringDynamicsGate, masteringDynamicsTransientShaper, masteringPairAnalysisNames, masteringPairAnalyze, masteringPairProcess, masteringPairProcessorNames, masteringPresetNames, masteringProcess, masteringProcessStereo, masteringProcessorNames, masteringRepairDeclick, masteringRepairDeclip, masteringRepairDecrackle, masteringRepairDehum, masteringRepairDenoiseClassical, masteringRepairDereverbClassical, masteringRepairTrimSilence, masteringStereoAnalysisNames, masteringStereoAnalyze, masteringStreamingPreview, melSpectrogram, melToAudio, melToHz, melToStft, meteringCrestFactorDb, meteringDcOffset, meteringDetectClipping, meteringDynamicRange, meteringPeakDb, meteringPhaseScope, meteringRmsDb, meteringSpectrum, meteringStereoCorrelation, meteringStereoWidth, meteringTruePeakDb, meteringVectorscope, mfcc, mfccToAudio, mfccToMel, midiToHz, mixStereo, mixingScenePresetJson, mixingScenePresetNames, momentaryLufs, nnFilter, nnlsChroma, normalize, noteStretch, noteToHz, onsetEnvelope, padCenter, pcen, peakPick, percussive, phaseVocoder, pitchCorrectToMidi, pitchPyin, pitchShift, pitchTuning, pitchYin, plp, polyFeatures, powerToDb, preemphasis, realtimeVoiceChangerPresetConfig, realtimeVoiceChangerPresetJson, realtimeVoiceChangerPresetNames, remix, resample, rmsEnergy, roomMorph, samplesToFrames, scaleCorrectionSemitones, scalePitchClassEnabled, scaleQuantizeMidi, shortTermLufs, spectralBandwidth, spectralCentroid, spectralContrast, spectralFlatness, spectralRolloff, splitSilence, stft, stftDb, synthesizeRir, tempogram, tempogramRatio, timeStretch, timeToFrames, tonnetz, trim, trimSilence, validateRealtimeVoiceChangerPresetJson, vectorNormalize, version, voiceChange, voiceChangeRealtime, voiceChangerAbiVersion, voiceCharacterPresetId, vqt, zeroCrossingRate, zeroCrossings };
|