FFT in JavaScript

Alexey Gusev picture Alexey Gusev · Oct 19, 2011 · Viewed 17k times · Source

Can anyone point me to an implementation of a Fast Fourier Transform in JavaScript? Should work with just a simple array of real values.

Thanks.

Answer

Fernando Rosado picture Fernando Rosado · Oct 19, 2011

You can search any Java FFT algorithm and port it to javascript easy.

A example, here :

This implementation require two classes + FFT java code (princeton) + Complex dependency

This could be easier and direct to apply: + FFT Java Code (columbia)

This code it's easy to port to Javascript, only remember that JavaScript functions Math.sin and Math.cos work on radians and not on degrees.