Professional Documents
Culture Documents
Fa09 147, Fa08 141
Fa09 147, Fa08 141
Fa09 147, Fa08 141
Comsats Institute of Information Technology Wah Cantt Sadaf Gulshad Naila Iqbal Reg# FA09-BS(CE)-147 Reg# FA08-BS(CE)-141 BS(CE)-5A Submitted to Hassan Farooq
ASSIGNMENT # 1 REPORT
Objective: To Implement Audio Effects Using Matlab Wave Read: Wavread supports multichannel data, with up to 32 bits per sample, and supports reading 24- and 32-bit .wav files. y = wavread('filename') loads a WAVE file specified by the string filename, returning the sampled data in y.
Code (Echo in Signal): [x,fs,n]=wavread('C:\Windows\Media\chord') x=x(:,1) n=length(x); t=n/fs; ts=1/fs; t1=1:n; plot(t1,x) % plotting signal % loading file chord
title('Plot of the input audio signal') xlabel('time axis') ylabel('input signal x') d=0.5/ts c=d-2 a=zeros(1 ,d ) a(1)=1 a(d)=0.25 w=conv(a,x) plot(w) %plotting signal with echo
Load Signal
Reverberation Effect (code) [x,fs,n]=wavread('C:\Windows\Media\chord') x=x(:,1) n=length(x) t=n/fs ts=1/fs d=0.2*fs c=d-2 n0=0 n1=0 n2=d [q,n]=impseq(n0,n1,n2) b=[1] l=[1 zeros(1,c) 0.8] z=filter(b,l,x) plot(z) % plotting signal having reverberation effect
title('Plot of reverberation effect in audio signal') xlabel(time axis) ylabel('filter signal z')