Fs = 16000;
% the recording time is set to 5s
data=music(1:2:length(music));
figure(3);
t=[0:1/8000:length(data)/8000];
t=t(1:length(data));
data2=data.*32768;
plot(t(8001:8100),data2(8001:8100),'r');
%hold on
%plot(t(8000:8020),data2(8000:8020),'b');
%hold off
axis( [ min(t(8001:8100)) max(t(8001:8100)) -32767 32767 ]);
title('Time Domain Signal (a small portion of data 8k 16bit)');
fprintf(1,'Listen the 8k music\n');
pause;
wavplay(data,8000);
%[n,fo,mo,w] = firpmord( [3900 4000], [1 0], [0.0001 0.0001], Fs);
%b = firpm(n,fo,mo,w);
%music_low_pass=filter(b,1,music);
%data1=music_low_pass(1:2:length(music_low_pass));
%fprintf(1,'Listen the 8k music with low pass filtering \n');
%pause;
%wavplay(data1,8000);