0% found this document useful (0 votes)
6 views2 pages

Echo Effect Implementation in Audio Processing

The document describes implementing an echo effect in an audio signal processing project. It reads in an audio file, calculates the sample length, and creates an echo function that adds a delayed and attenuated version of the input signal to the output. The function iterates through the samples, adding a portion of the previous sample to the current output sample to create the echo effect.

Uploaded by

anbuammu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Echo Effect Implementation in Audio Processing

The document describes implementing an echo effect in an audio signal processing project. It reads in an audio file, calculates the sample length, and creates an echo function that adds a delayed and attenuated version of the input signal to the output. The function iterates through the samples, adding a portion of the previous sample to the current output sample to create the echo effect.

Uploaded by

anbuammu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

%PROJECT: AUDIO SIGNAL PROCESSING

%IMPLEMENTATION OF ECHO EFFECT IN THE AUDIO SIGNAL


%echo FUNCTION
%PROJECT BY:
function y = echo1_m();
[x,fs,nbits]=wavread('wav_2.wav');%read in wav file
xlen=length(x);%Calc. the number of samples in the file
a=0.5;
R=ceil(fs*100e-3);
y=zeros(size(x));
d=zeros(size(x));
% filter the signal
for i=1:1:R+1
y(i) = x(i);
end
for i=R+1:1:xlen
y(i)= x(i)+ a*x(i-R);
d(i)= a*x(i-R);
end

[X,map]=imread('C:\Documents and Settings\湘儿\桌


面\12316051462008412153816252141\wavelet-matlab\wide area\Aral Sea-
[Link]');
X1=X;
map1=map;
subplot(221);
image(X1);
colormap(map1);
title('lina');
axis square
[X,map]=imread('C:\Documents and Settings\湘儿\桌
面\12316051462008412153816252141\wavelet-matlab\wide area\[Link]');
X2=X;
map2=map;
subplot(222);
image(X2);
colormap(map2);
title('couple');
axis square
[c1,s1]=wavedec2(X1,2,'sym4');
sizec1=size(c1);
for i=1:sizec1(2)
c1(i)=1.2*c1(i);
end
[c2,s2]=wavedec2(X2,2,'sym4');
c=c1+c2;
c=0.5*c;
xx=waverec2(c,s1,'sym4');
subplot(223);
image(xx);
title('融合图象');
axis square

You might also like