Commit e23d60c
committed
feat(bindings): Expand Node.js and Python bindings with full feature and effects API
Node.js native addon (sonare_wrap.cpp / sonare_wrap.h):
- Add effects: hpss, harmonic, percussive, timeStretch, pitchShift, normalize, trim
- Add spectrogram features: stft, stftDb, melSpectrogram, mfcc, chroma
- Add spectral features: spectralCentroid, spectralBandwidth, spectralRolloff,
spectralFlatness, zeroCrossingRate, rmsEnergy
- Add pitch features: pitchYin, pitchPyin
- Add core utilities: hz/mel/midi/note conversions, framesToTime, timeToFrames, resample
- Add VecToFloat32 helper for efficient vector-to-typed-array transfer
- Promote all analysis methods onto the Audio class in index.ts
- Add structured result types (StftResult, MelSpectrogramResult, MfccResult,
ChromaResult, HpssResult, PitchResult, StftDbResult) in types.ts
- Consolidate biome.json into root config; upgrade to Biome 2.4.8, TypeScript 6,
Vitest 4; add yarn.lock and .gitignore
Python cffi bindings (libsonare/):
- Mirror new features in _ffi.py, analyzer.py, audio.py, and types.py
- Expand test_analyzer.py to cover new APIs
C API (sonare_c.h / sonare_c.cpp):
- Expose new feature and effects entry points used by both Node and Python bindings
WASM (wasm/bindings.cpp, js/index.ts):
- Expose matching feature functions via embind
- Add tests/wasm/features.test.ts with WASM feature coverage
- Expand tests/wasm/streaming.test.ts1 parent 3e8d604 commit e23d60c
24 files changed
Lines changed: 8052 additions & 779 deletions
File tree
- bindings
- node
- src
- addon
- tests
- python
- src/libsonare
- tests
- js
- src
- wasm
- tests/wasm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
26 | | - | |
| 35 | + | |
27 | 36 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 37 | + | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
0 commit comments