function SoundProb()

[y,rate,bits] = wavread('NoCry.wav');

% Part (a)...
% Soundbite that plays noCry twice with a one,second separation...
silence = zeros(rate,1); % encodes a 1-second "silence"
yNew = [y;silence;y];
wavwrite(y,rate,bits,'noCry1.wav');
sound(yNew,rate)
pause

% Part (b)
timeForOnePlay = length(y)/rate;
% We must splice together this many copies...
m = ceil(30/timeForOnePlay);
yNew = [];
for k=1:m
yNew = [yNew;y];
end
% But this will be a bit longer than 30 seconds worth so grab 30 seconds
% worth...
yNew = yNew(1:round(30*rate));
% and play...
sound(yNew,rate)
pause

% Part (c)
m = length(y)/4;
for k=1:4
sound(y(1+(k-1)*m:k*m),rate*(1.2)^(k-1))
end