# change the frequency component of a spectrum in an audio file

I am working on an audio dynamic range compressor using Matlab. After calculating the FFT of the audio file, I use several bandpass filters to amplify specific bands separately. What I want to do then is remove components of a band and put them in another band. for example, remove the components of the band 8khz-10khz and put them in the band 6khz-8khz. would you please give me the general picture.

• Do you need to shift all of the spectral components, or just specific bands? And if it's the latter, then why are you doing it? It seems bizarre (it could be genius, too!). – Phonon Aug 3 '12 at 16:12

## 2 Answers

Judging by your question, it sounds like you are developing hearing aid solutions. Given that you are calculating an FFT and are now in the frequency domain, the easiest route forward is to use phase vocoder techniques to shift spectral peaks. Here is the original paper on this technique > http://505606.pbworks.com/f/LaroD99-pvoc.pdf

Here is another solution:

1. Assuming these are flat bands, calculate the center frequency of the band you would like to move to.
2. multiply the band you would like to move down by cos(2*pi*centerFreq + phaseOfComponentsOfMovedBand) If you are moving the band down, apply a High pass filter to the signal. If you are moving the band up, apply a low pass filter to the signal.

this is the modulation property of FTs:

that is: Cos(f)*x(t)=> (Frequency Domain) X(w-f) + X(w+f)

for details.