Manipulating with frequencies through fftw
You applied the FFT to the full signal? Then modification of the amplitudes will likely destroy any time locality.

Use the so-called STFT, short term Fourier transform, or overlap-add method to get a time-localized frequency analysis.