filter out musical instrument from audio file and sound it

2 views (last 30 days)
Hi, I got an audio file with 2 instruments in it. (I attached the file - just change the type to mp3) One of them is a Tuba (Its frequencies is between 44 to 349 Hz) and I want to build a filter (I'm guessing i'll be needed Band Pass Filter) so i could hear it only. (the other instrument sound in frequencies 523 to 3951 Hz) I tried to build it with the next code: [y,Fs] = audioread('ex01signal.mp3'); t = linspace (0,160,7053168); %presents original file on time axe t2 = t(1102056:1322468); y1 = y(:,1); y1 = y1 (1102056:1322468); y2 = y(:,2); y2 = y2(1102056:1322468);
subplot(2,1,1) plot(t,y) title('Original Audio File'); xlabel('Time (sec)') ylabel('Magnitude (dB)') subplot(2,1,2) d = bandpass(y,[44 349],Fs); plot (t,d); sound(d,Fs);
Thank you!

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!