% echoes   // Create echoes for sound
echo_interval = 1000;
num_echoes = length(y)/echo_interval;
atten = 0.6;
for index = 1 : num_echoes
  y = y + [zeros(echo_interval*index,1);...
           y(1:end-echo_interval*index)]*atten^index;
end
y = y * (1 - atten)/(1 - atten^num_echoes);

