Skip to content

audiojs/window

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@audio/window

Audio-facing window kit — typed fills (periodic/symmetric), in-place apply, COLA check.

Thin layer over window-function (scijs — canonical per-sample math, re-exported whole): fills typed arrays with the DFT-even periodic variant STFT needs (or symmetric for filter design), and verifies constant-overlap-add for hop choices.

import window, { apply, cola, hann } from '@audio/window'

let w = window('hann', 1024)                     // periodic (DFT-even) — for STFT
let sym = window('hann', 1024, { periodic: false }) // symmetric — for filter design

apply(frame, w)                                  // multiply in place

cola(w, 512)                                     // { ok, ripple, mean } — is this hop COLA?
cola(w, 512, { squared: true })                  // analysis+synthesis (win²) variant

hann(3, 7)                                       // any window-function export, re-exported

Any window-function name works: hann, hamming, blackman, blackmanHarris, nuttall, gaussian, tukey, kaiser, …

See also

  • @audio/stft — the canonical STFT this pairs with (its internal hannWindow is consistency-tested against this package)
  • window-function — the per-sample math underneath (scijs layer)

License

MIT

About

Audio-facing window kit — typed periodic/symmetric fills, apply, COLA check over window-function

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors