@libraz/libsonare 1.5.2 → 1.5.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 +18 -3
- package/dist/index.d.ts +1147 -181
- package/dist/index.js +4826 -3941
- package/dist/index.js.map +1 -1
- package/dist/sonare.js +1 -1
- package/dist/sonare.wasm +0 -0
- package/dist/worklet.d.ts +29 -1
- package/dist/worklet.js +1067 -973
- package/dist/worklet.js.map +1 -1
- package/package.json +2 -1
- package/src/_chain_config.ts +46 -0
- package/src/audio.ts +24 -4
- package/src/effects_mastering.ts +25 -1
- package/src/effects_transform.ts +283 -43
- package/src/effects_voice_change.ts +46 -53
- package/src/feature_core.ts +316 -12
- package/src/feature_music.ts +357 -0
- package/src/feature_pitch.ts +61 -0
- package/src/feature_resample.ts +17 -2
- package/src/feature_spectral.ts +349 -2
- package/src/feature_spectrogram.ts +336 -0
- package/src/index.ts +130 -1
- package/src/mastering_chain.ts +305 -50
- package/src/mastering_core.ts +232 -16
- package/src/mastering_dynamics.ts +66 -10
- package/src/mastering_repair.ts +119 -7
- package/src/metering.ts +366 -81
- package/src/mixer.ts +9 -2
- package/src/mixing_oneshot.ts +25 -5
- package/src/module_state.ts +1 -1
- package/src/project_class.ts +17 -6
- package/src/project_internal.ts +10 -2
- package/src/project_types.ts +25 -2
- package/src/public_types_mastering.ts +114 -4
- package/src/public_types_spectral.ts +7 -0
- package/src/quick_analysis.ts +325 -117
- package/src/realtime_engine.ts +8 -0
- package/src/sonare.js.d.ts +31 -0
- package/src/stream_analyzer.ts +20 -1
- package/src/stream_types.ts +12 -1
- package/src/validation.ts +17 -2
- package/src/worklet/engine-clips.ts +67 -2
- package/src/worklet/engine-processor.ts +33 -5
- package/src/worklet/engine.ts +7 -3
- package/src/worklet/guards.ts +3 -0
- package/src/worklet/messages.ts +27 -0
package/README.md
CHANGED
|
@@ -62,6 +62,18 @@ console.log(`Key: ${audio.detectKey().name}`);
|
|
|
62
62
|
const audioKeyWithOptions = audio.detectKey({ useHpss: true, highPassHz: 80 });
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
### Request-object calls
|
|
66
|
+
|
|
67
|
+
For top-level one-shot analysis, effects, mastering, metering, and feature APIs, pass one request object. This is the documented form because each input has a name and optional settings can grow without changing argument order. Existing positional calls remain supported for compatibility and produce the same results; stateful `Audio` methods and small scalar conversions retain their natural positional forms.
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// Recommended
|
|
71
|
+
detectBpm({ samples, sampleRate: 48_000 });
|
|
72
|
+
|
|
73
|
+
// Still supported for existing applications
|
|
74
|
+
detectBpm(samples, 48_000);
|
|
75
|
+
```
|
|
76
|
+
|
|
65
77
|
### Pitch, timbre, and spectral APIs
|
|
66
78
|
|
|
67
79
|
Pitch tracking keeps unvoiced `f0` frames as `NaN` by default. Pass
|
|
@@ -311,9 +323,12 @@ await init();
|
|
|
311
323
|
|
|
312
324
|
masteringPresetNames(); // ['pop', 'edm', 'acoustic', 'hipHop', 'aiMusic', 'speech', 'streaming', 'youtube', 'broadcast', 'podcast', 'audiobook', 'cinema', 'jpop', 'ambient', 'lofi', 'classical', 'drumAndBass', 'techno', 'metal', 'trap', 'rnb', 'jazz', 'kpop', 'trance', 'gameOst']
|
|
313
325
|
|
|
314
|
-
const result = masterAudio(
|
|
315
|
-
|
|
316
|
-
|
|
326
|
+
const result = masterAudio({
|
|
327
|
+
samples,
|
|
328
|
+
sampleRate,
|
|
329
|
+
preset: 'aiMusic',
|
|
330
|
+
// optional overrides applied on top of the preset
|
|
331
|
+
overrides: { loudness: { targetLufs: -13 } },
|
|
317
332
|
});
|
|
318
333
|
console.log(result.outputLufs, result.appliedGainDb);
|
|
319
334
|
```
|