doesnt a js FFT library already exist somewhere? hmm