# what part of the FFT array must be zeroed to create a piece of silence

I'm constructing a karaoke-type application that eliminates the sound of one voice, based on it's position in the stereo space. I calculate the left and right FFT's, and find the frequencies that are almost equal in volume (normalized for the angle in the stereo spectrum). This is my code (Vb.Net). IMx and REx are the Imaginary and Real part of the FFT output. l or r stand for Left and Right channel:

``````                For k = 1 To nSamples / 2
Dim cV As Double = VolumL(k) / VolumR(k)
If cV >= LowMargin AndAlso cV <= HighMargin Then
IMXl(k) = 0
REXl(k) = 0
IMXr(k) = 0
REXr(k) = 0
End If
Next
``````

Testing with a 2 sec 400Hz sample (left: volume from 0 to 1, right: from 1 to 0) I hear the IFFT about halves the volume in the part where I expect to have silence. It must be because I have to adjust the data in the other half of the FFT-output, but I have no idea which index in the second half corresponds with that in the first.

Adding (assuming the frequencies in the second half range from 1 to 22050)

`````` each array(k + nSamples/2) = 0
``````

Adding (assuming the frequencies in the second half are inverse)

`````` each array(nSamples + 1 - k) = 0
``````

gives much much better results, but there remains a low volume sound.

What is the way to get silence? Or which article explains me what I do when changing volume of certain frequencies (like you do in an equalizer)?

• I think you will always get some sound, unless you already know exactly what frequencies are at what amplitude and phase in the sound environment. – Rory Alsop May 9 '14 at 16:59
• I'm testing with a pure 400 Hz wave, and somem of the 400Hz remains. What I would like to know is WHICH of the fft-data refers to the 400Hz frequency, using a 22050 length sample, which should result in exactly 1 bin for each frequency. – Martin May 11 '14 at 7:38