

% First run Read_m4a.m
    
    Read_m4a
	x = d; % signal
    % sample rate

% Calculate the number of samples in the file
	xlen = length(x);  %Initialize all constants       
	a = 0.5; 
	delay = .6;  
	D = delay*fs;   
% create a vector for new signal  
	y = zeros(size(x)); 
	% add a diminsished delayed copy  
	for j = 1:1;
    for i   = D + 1 : 1 : xlen;  
	       y(i) = x(i) + a*x(i-D);  
	end;  
    x = y;
    end;
    
%play the echo signal  
	sound(y, fs);  
    plot(y,'*r'); hold on; plot(d+d,'ob');
