Problem removing the noise of a song

조회 수: 1 (최근 30일)
Luis Miguel López Santamaría
Luis Miguel López Santamaría 2019년 12월 9일
Hello everybody I've trying to remove the noise of a song. Fisrt I use FFT to know in which frequency I have to desing my filter. I designed a notch filter to remove the noise but I can't remove it. I read that most of the time this type of noise is at 60 Hz but also didn't work. Here is the song I've trying filtering and also here is the code:
[x,fs] = audioread('/Users/luismiguells/Desktop/Sample.m4a');
T1 = 0;
T2 = 8;
Ts = 1/fs;
N = (T2-T1)/Ts;
L = x(1:N);
n = 0:N-1;
t = n*Ts;
f = n/length(n)*fs;
Lomega = fft(L);
cc = round((N+log2(N))/2.0);
figure(1), plot(abs(fft(x)));
figure(2), plot(f, abs(Lomega));
Y4_out = conv(L, SBF(n-cc), 'same');
figure(3), plot(f, abs(fft(SBF(n-cc))));
figure(4), plot(t, Y4_out);
sound(Y4_out, fs);
figure(5), plot(f, abs(fft(Y4_out))/N);
function Y4 = SBF(n)
fc1 = 4.10e+4;
fc2 = 4.20e+4;
Y4 = 2*fc1*sinc(2*pi*fc1*n)-2*fc2*sinc(2*pi*fc2*n);
index = n == 0;
Y4(index) = 20;
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by