Separating Morse code from a music signal
显示 更早的评论
I have a .wav file with some Morse code mixed up with a music signal (Ride of the Valkyries). I have employed a bandpass filter to filter out the Morse code terms from 600-1000 Hz, however it still has some of the music component attached to it. I would like some advice on how to completely isolate the Morse code signal and on how to decode the message within the Morse code (manually by looking at the time-domain waveform or by code).
Here is the code: [
y,fs] = audioread('morse.wav');
% sound(y,fs);
bfil = fft(y);
n = 1000;
wn = [600 1000]/(fs/2);
[b,a] = fir1(n,wn,'bandpass')
fvtool(b,a);
f = filter(b,a,y);
afil = fft(f);
subplot(4,1,1); plot(real(bfil)); title('Frequency Response of Input Signal');
subplot(4,1,2); plot(real(afil)); title('Frequency Response of Filtered Signal');
subplot(4,1,3); plot(y); title('Original Sound Signal');
subplot(4,1,4); plot(f); title('Filtered Sound Signal');
figure
stem(f);
% sound(f,fs);
Thank you!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!