Hi,
that's what fft is for, but fiddle~ might just do what you are looking for if I understand the question correctly.
that's just ok for real-time applications.
If you want to analyze sample arrays you could use vasp/pd-ex/frqmax.pd, in the cvs tomorrow morning. (you need the vasp cvs version for that)
best greetings, Thomas