@audio/pitch 2.0.3 → 2.0.4

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.
Files changed (2) hide show
  1. package/README.md +4 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -101,6 +101,10 @@ let result = yin(samples, { fs: 44100 })
101
101
  |---|---|---|
102
102
  | `fs` | `44100` | Sample rate (Hz) |
103
103
  | `threshold` | `0.15` | CMND threshold — lower = stricter, fewer detections |
104
+ | `minFreq` | — | Minimum frequency (Hz); also uses more of the frame for low pitches |
105
+ | `maxFreq` | — | Maximum frequency (Hz) |
106
+
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.
104
108
 
105
109
  **Use when:** General-purpose monophonic pitch tracking — speech, singing, solo instruments. The most reliable choice when in doubt.<br>
106
110
  **Not for:** Polyphonic audio (returns dominant or null), real-time with hard latency budgets (needs full window).<br>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/pitch",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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": {