Applies a windowing function to an array of data, making it ready to be FFT'd.
If you have npm installed, just run:
npm install fft-windowing
The Hann (Hanning) window is a good general-purpose window. You would use it like so:
var windowing = require'fft-windowing';var raw = 2 2 0 -2 -2 0 2 2;var windowed = windowinghannraw;
The following windows are available:
The following windows can also accept an extra parameter,
You would use it like this:
var windowing = require'fft-windowing';var raw = 2 2 0 -2 -2 0 2 2;var windowed = windowingkaiserraw 0.5;
node tests/fft-windowing-tests.js. This should generate a file called
fft-windowing.pdf in the root directory which shows what happens if you apply each windowing function to a uniform array.