FFT of arbitrary waveforms