if i was you i'd have a look into fourier transformation, especially fft:
http://en.wikipedia.org/wiki/Fast_Fourier_transformlike that you can transform your data from time space to frequency space. there you can process the data and after that you transform it back into time space. that's how most digital filters work.
edit: also have a look at
http://en.wikipedia.org/wiki/FFTWedit2: and here
http://www.captain.at/howto-fftw-spectrograph.php