% PlayChimes
% Separate chimes and gong from BigBen's 1 o'clock sound file

close all
% Read in the 1 O'clock sound file...
[OneOclock,rate] = wavread('BigBen.wav');
n = length(OneOclock);
% Display the wave form and play the sound...
plot(OneOclock)
title('Listen for the two parts: chimes and gong')
sound(OneOclock,rate)
pause(n/rate)
% Get just the chimes...
title('Click at the end of the chimes.')
[m1,y] = ginput(1);
m1 = round(m1);
Chimes = OneOclock(1:m1);
% Get just the gong...
title('Click at the begining of gong.')
[m2,y] = ginput(1);
m2 = round(m2);
Gong  = OneOclock(m2+1:n);
% Play the chimes and gong played one after the other
title('Listen to the result')
sound(Chimes,rate)
sound(Gong,rate)
