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 で Audio I/O and Waveform Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!