Hi, I'm wondering how I can place a sound file through a filter that I made through Matlab. The code works, I'm just wondering how to inject the audio file through the filter itself. I believe it should be some application of the fir1 command, though I'm not sure how to impliment it fully. The code is as follows:
Fl = 300 Fh = 3400 Samples = 44100 Wc = [Fl Fh]./Samples bbp = fir1(256, Wc, 'band'); figure(1) plot (1:length(bbp), bbp) figure(2) freqz(bbp,1) outbp = filter(bbp,1,y); audioread('song.wav'); info = audioinfo('song.wav') filename = 'song.wav'; [y,Fs] = audioread('song.wav'); audiowrite(filename,y,Fs); sound(y,Fs)
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
[y,Fs] = audioread('song.wav'); Fl = 300; Fh = 3400; Wc = [Fl Fh].*(2/Fs); bbp = fir1(256, Wc, 'band'); figure(1) plot (1:length(bbp), bbp) figure(2) freqz(bbp,1) outbp = filter(bbp,1,y); audiowrite('song_filtered.wav',outbp,Fs); sound(outbp,Fs)
SEE COMPLETE ANSWER CLICK THE LINK