Problem removing the noise of a song
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!