@audio/pitch 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -106,6 +106,8 @@ let result = yin(samples, { fs: 44100 })
|
|
|
106
106
|
|
|
107
107
|
Pass the expected range when known: `yin(samples, { fs, minFreq: 60, maxFreq: 520 })`. Besides rejecting out-of-range results, `minFreq` lets YIN use a longer comparison window and improves low-pitch detection near onsets.
|
|
108
108
|
|
|
109
|
+
`yinInto(data, k, d, cmndf)` is the same estimate allocating nothing, for a caller that runs it frame after frame: `k`, a `Float64Array` of 6, holds `fs`, `threshold`, `minFreq` and `maxFreq` (`NaN` where there is none) and takes the pitch and the clarity at 4 and 5 where it returns 1; `d` and `cmndf` are scratch `Float64Array`s of half the frame. The `./audio` processor runs it on 2048-sample frames.
|
|
110
|
+
|
|
109
111
|
**Use when:** General-purpose monophonic pitch tracking — speech, singing, solo instruments. The most reliable choice when in doubt.<br>
|
|
110
112
|
**Not for:** Polyphonic audio (returns dominant or null), real-time with hard latency budgets (needs full window).<br>
|
|
111
113
|
**Ref:** de Cheveigné & Kawahara, ["YIN, a fundamental frequency estimator for speech and music"](https://doi.org/10.1121/1.1458024), JASA 2002.<br>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/pitch",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pitch detection — umbrella for @audio/pitch-* atoms (YIN, pYIN, McLeod, HPS, cepstrum, SWIPE, autocorrelation, AMDF)",
|
|
6
6
|
"exports": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test": "node test.js",
|
|
24
24
|
"test:all": "npm test --workspaces --if-present && npm test",
|
|
25
|
-
"publish:all": "npm publish --workspaces && npm publish",
|
|
25
|
+
"publish:all": "node ../compile/tools/tested.js && npm publish --workspaces && npm publish",
|
|
26
26
|
"members": "node scripts/members.js",
|
|
27
|
-
"prepublishOnly": "node scripts/members.js --check"
|
|
27
|
+
"prepublishOnly": "node ../compile/tools/tested.js && node scripts/members.js --check"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"node": ">=18"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@audio/pitch-yin": "^1.0
|
|
69
|
+
"@audio/pitch-yin": "^1.1.0",
|
|
70
70
|
"@audio/pitch-mcleod": "^1.0.2",
|
|
71
71
|
"@audio/pitch-pyin": "^2.1.0",
|
|
72
72
|
"@audio/pitch-hps": "^1.0.2",
|