0.2.2 • Published 7 months ago

frost-fft v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

frost-fft

The world didn't need yet another Fast Fourier Transform (FFT) implementation, but here we are...

import {fft, ifft, ifftReal} from 'frost-fft';

const signal = new Float64Array(256).map(Math.random);

// The imaginary argument is optional, zeros assumed by default (faster).
const [realCoefs, imagCoefs] = fft(
  signal,
  signal.map(() => 0)
);

// There's no normalization. These are 256 times too large.
const [realSignalScaled, imagSignalScaled] = ifft(realCoefs, imagCoefs);

// The original signal reconstructed (with some floating point noise).
const realSignal = ifftReal(realCoefs, imagCoefs).map(s => s / 256);

Documentation

Documentation is hosted at the project Github pages.

To generate documentation locally run:

npm run doc
0.2.2

7 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

2 years ago

0.0.4

2 years ago