DSPRelated.com
Forums

Filter to remove noise from a corrupted song

Started by Farah Rasheed November 18, 2007
Hi everyone,

I have a question about filtering a noise signal in MATLAB. I have a
corrupted sound file and I loaded it in MATLAB and plotted the FFT of
the signal. From the FFT, I found that there are two peaks present at
+ & - 44.04kHz at a magnitude of 2.029*10^5.

Now, I need to design a filter to filter out the noise in the signal.
I know that in MATLAB, I need to first define the transfer function of
the filter and then filter it as follows:

[b,a] = zp2tf(z, p, k);
filtered_audio = filter(b, a, corrupted_audio);

The problem I am finding difficult to analyze is that how do I figure
out the poles and zeros of the transfer function of the filter? Since
the peak of the signal from its FFT plot is at 44.04 kHz, is that the
pole of the transfer function of the filter? And what about the zeros
for the filter? I'm confused regarding this. I also found out that the
sampling frequency of the corrupted audio signal is 44.1 kHz.

Could someone give me a few hints as to how I go about figuring the
filter's transfer function?

Thanks a lot,
>... From the FFT, I found that there are two peaks present at
>+ & - 44.04kHz at a magnitude of 2.029*10^5.
>... I also found out that the sampling frequency of the corrupted audio
> signal is 44.1 kHz.
>
If the sampling frequency is 44.1kHz, the range of your signal is within a range of (0..22.05kHz), practically it should be limited to a smaller range.
It is quite normal that you see lines at 22.05kHz and 44.1kHz depending on your FFT, and should not cause problems or "noise" when playing the sound.
Therefore, it depends on what you want to do, if filtering makes sense here.
At least I cannot see the reason.
Bernhard
Filtering can also be done by using a low pass filter with cutoff as fs/2
The MATLAB command butter or FIR1 can be used to get the filter coefficients and using the filter command the filtering can be achieved.

Pls lemme know how it comes out

Farah Rasheed wrote: Hi everyone,

I have a question about filtering a noise signal in MATLAB. I have a
corrupted sound file and I loaded it in MATLAB and plotted the FFT of
the signal. From the FFT, I found that there are two peaks present at
+ & - 44.04kHz at a magnitude of 2.029*10^5.

Now, I need to design a filter to filter out the noise in the signal.
I know that in MATLAB, I need to first define the transfer function of
the filter and then filter it as follows:

[b,a] = zp2tf(z, p, k);
filtered_audio = filter(b, a, corrupted_audio);

The problem I am finding difficult to analyze is that how do I figure
out the poles and zeros of the transfer function of the filter? Since
the peak of the signal from its FFT plot is at 44.04 kHz, is that the
pole of the transfer function of the filter? And what about the zeros
for the filter? I'm confused regarding this. I also found out that the
sampling frequency of the corrupted audio signal is 44.1 kHz.

Could someone give me a few hints as to how I go about figuring the
filter's transfer function?

Thanks a lot,