Skip to content

Commit 34e50db

Browse files
committed
Final polishing
1 parent bc52975 commit 34e50db

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ npm install window-function
77
```
88

99
```js
10-
// Import everything, or just what you need
1110
import { hann, kaiser, generate, apply } from 'window-function'
12-
import hann from 'window-function/hann'
1311

1412
// Every window: fn(i, N, ...params) → number
1513
hann(50, 101) // single sample → 1.0
@@ -25,6 +23,13 @@ apply(signal, hann) // signal *= hann
2523
generate(kaiser, 1024, 8.6) // Kaiser with β = 8.6
2624
```
2725

26+
Or import individual windows directly:
27+
28+
```js
29+
import hann from 'window-function/hann'
30+
import kaiser from 'window-function/kaiser'
31+
```
32+
2833

2934
## Reference
3035

@@ -306,7 +311,7 @@ $w(n) = \sin^\alpha\!\left(\frac{\pi n}{N-1}\right)$
306311

307312
<img src="https://raw.githubusercontent.com/audiojs/window-function/master/docs/plots/powerOfSine.svg">
308313

309-
sin^α family. Codec design, parameterized spectral analysis.
314+
$\sin^\alpha$ family. Codec design, parameterized spectral analysis.
310315

311316
### `exponential(i, N, tau)`
312317

@@ -476,9 +481,6 @@ cola(hann, 1024, 512) // 0 — perfect STFT reconstruction
476481
- **`cola(fn, N, hop, ...params)`** — COLA deviation. 0 = perfect STFT reconstruction at given hop size.
477482

478483

479-
The per-sample API `fn(i, N, ...params) → number` is unchanged.
480-
481-
482484
[^dolph1946]: C.L. Dolph, "A Current Distribution for Broadside Arrays," *Proc. IRE* 34, 1946.
483485
[^gabor1946]: D. Gabor, "Theory of Communication," *J. IEE* 93, 1946.
484486
[^bartlett1950]: M.S. Bartlett, "Periodogram Analysis and Continuous Spectra," *Biometrika* 37, 1950.

0 commit comments

Comments
 (0)