There are six buttons in my screen which stand for six kind of music.
(1) Normal.ver [00:00]←Start timeI make a song which stand for a people’s whole lifetime like a story. The song consists of twelve different chants.
Here is the order:
Heartbeat(A person was born.)→Infant’babble→Little star(A song people usually sing for baby.) →Bell ring(He become a teenager,and go to school.) →People cheer(He graduate from school.) →Train sound(He leave his hometown to find work.) →Kiss sound(He meet a person he like.) →Wedding song(They get married.) →Baby cry(They have a chid.) →Happy song(He have a great late adulthood) →Electrocardiogram sound(He die.) →I will remember you(People come to cherish him.)
(2)Cartoon.ver [02:35] ←Start timeI changed the amplitude of every note ,include the sampling frequency,in order to make it sound like a cartoon.
(3)Fast.ver [05:05] ←Start timeI turn b=audioplayer(y,fs) into b=audioplayer(y, 3*fs) to change the speed of the audio signal ,and make the song sounds faster.
(4)Slow.ver [06:06] ←Start timeI turn b=audioplayer(y,fs) into b=audioplayer(y, 2/3*fs) to change the speed of the audio signal ,and make the song sounds slower.
(5)Loud.ver [09:46] ←Start timeI turn b=audioplayer(y,fs) into b=audioplayer(20*y,fs) to change the amplitude of the audio signal ,and make the song sounds louder.
(6)Whisper.ver [12:18] ←Start timeI turn b=audioplayer(y,fs) into b=audioplayer(1/20*y,fs) to change the amplitude of the audio signal ,and make the song sounds like whisper.
(7)CloseClick it can end the program.
The following is my code:function varargout = untitled(varargin)% UNTITLED MATLAB code for untitled.fig% UNTITLED, by itself, creates a new UNTITLED or raises the existing% singleton*.%% H = UNTITLED returns the handle to a new UNTITLED or the handle to% the existing singleton*.%% UNTITLED('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in UNTITLED.M with the given input arguments.%% UNTITLED('Property','Value',...) creates a new UNTITLED or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before untitled_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to untitled_OpeningFcn via varargin.%% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".%% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help untitled% Last Modified by GUIDE v2.5 04-May-2017 20:53:45% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @untitled_OpeningFcn, ... 'gui_OutputFcn', @untitled_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []);if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1});endif nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else gui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT% --- Executes just before untitled is made visible.function untitled_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line arguments to untitled (see VARARGIN)% Choose default command line output for untitledhandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes untitled wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = untitled_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Get default command line output from handles structurevarargout{1} = handles.output;% --- Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%% Generate a Sequency of Musical Notes.% Musical notes corresponding to the second octave starting with the note% Do or C at 524 Hz, and ending with the note Ti or at 988 Hz are generated% for one second, weighted with an exponentially decaying signal to model% the attack and decay of musical instruments and sent to the sound card.%% Chose sampling frequency fSampling = 4000;%% Create time VectortSampling = 1/fSampling;t = 0:tSampling:0.5;%% Set of note frequenciesfNote = [524 588 660 698 784 880 988 0 383];%% Generate notesDo = sin(2*pi*fNote(1)*t+2*pi*rand);%CRe = sin(2*pi*fNote(2)*t+2*pi*rand);%DMi = sin(2*pi*fNote(3)*t+2*pi*rand);%E Fa = sin(2*pi*fNote(4)*t+2*pi*rand);%FSo = sin(2*pi*fNote(5)*t+2*pi*rand);%GLa = sin(2*pi*fNote(6)*t+2*pi*rand);%ATi = sin(2*pi*fNote(7)*t+2*pi*rand);%Ano = sin(2*pi*fNote(8)*t+2*pi*rand);%Aso= sin(2*pi*fNote(9)*t+2*pi*rand);%G%% Weigh the notesexpWtCnst = 6;expWt = exp(-abs(expWtCnst*t));Do = Do.*expWt;Re = Re.*expWt;Mi = Mi.*expWt;Fa = Fa.*expWt;So = So.*expWt;La = La.*expWt;Ti = Ti.*expWt;%% Generate note sequencenoteSequence = [Do Do So So La La So no Fa Fa Mi Mi Re Re Do no So So Fa Fa Mi Mi Re no So So Fa Fa Mi Mi Re no Do Do So So La La So no Fa Fa Mi Mi Re Re Do ];noteSequence2 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do];noteSequence3 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do no no no no];noteSequence4 = [ Mi Mi Fa So So Fa Mi Re Do Do Re Mi Mi Re Re no Mi Mi Fa So So Fa Mi Re Do Do Re Mi Re Do Do ];[y, fs]=audioread('battements_de_coeur1.wav'); % 心跳b=audioplayer(y, fs);playblocking(b); playblocking(b); playblocking(b); [y, fs]=audioread('toussez3.wav'); % 嬰兒b=audioplayer(y, fs);playblocking(b); p=audioplayer(noteSequence,fSampling);playblocking(p); % 小星星a=audioplayer(noteSequence2,fSampling);playblocking(a); % 鐘聲[y, fs]=audioread('ccheer.wav'); % 歡呼b=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('Train.wav'); % 火車b=audioplayer(y, fs);playblocking(b);playblocking(b);playblocking(b);[y, fs]=audioread('kiss.wav'); % kissb=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('Wedding.wav'); % 婚禮b=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('NB.wav'); % 嬰兒b=audioplayer(y, fs);playblocking(b);p=audioplayer(noteSequence4,fSampling);playblocking(p); % 快樂頌[y, fs]=audioread('HEARTSTOP.wav'); % 心跳停止b=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('BYE.wav'); %BYEb=audioplayer(y, fs);playblocking(b);% --- Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%% Generate a Sequency of Musical Notes.% Musical notes corresponding to the second octave starting with the note% Do or C at 524 Hz, and ending with the note Ti or at 988 Hz are generated% for one second, weighted with an exponentially decaying signal to model% the attack and decay of musical instruments and sent to the sound card.%% Chose sampling frequency fSampling = 48000;%% Create time VectortSampling = 1/fSampling;t = 0:tSampling:0.5;%% Set of note frequenciesfNote = [524 588 660 698 784 880 988 0 383];%% Generate notesDo = 100*sin(2*pi*fNote(1)*t+2*pi*rand);%CRe = 100*sin(2*pi*fNote(2)*t+2*pi*rand);%DMi = 100*sin(2*pi*fNote(3)*t+2*pi*rand);%E Fa = 100*sin(2*pi*fNote(4)*t+2*pi*rand);%FSo = 100*sin(2*pi*fNote(5)*t+2*pi*rand);%GLa = 100*sin(2*pi*fNote(6)*t+2*pi*rand);%ATi = 100*sin(2*pi*fNote(7)*t+2*pi*rand);%Ano = 100*sin(2*pi*fNote(8)*t+2*pi*rand);%Aso= 100*sin(2*pi*fNote(9)*t+2*pi*rand);%G%% Weigh the notesexpWtCnst = 6;expWt = exp(-abs(expWtCnst*t));Do = Do.*expWt;Re = Re.*expWt;Mi = Mi.*expWt;Fa = Fa.*expWt;So = So.*expWt;La = La.*expWt;Ti = Ti.*expWt;%% Generate note sequencenoteSequence = [Do Do So So La La So no Fa Fa Mi Mi Re Re Do no So So Fa Fa Mi Mi Re no So So Fa Fa Mi Mi Re no Do Do So So La La So no Fa Fa Mi Mi Re Re Do ];noteSequence2 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do];noteSequence3 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do no no no no];noteSequence4 = [ Mi Mi Fa So So Fa Mi Re Do Do Re Mi Mi Re Re no Mi Mi Fa So So Fa Mi Re Do Do Re Mi Re Do Do ];%% Listen to Notes[y, fs]=audioread('battements_de_coeur1.wav'); % 心跳b=audioplayer(y, fs);playblocking(b); playblocking(b); playblocking(b); [y, fs]=audioread('toussez3.wav'); % 嬰兒b=audioplayer(y, fs);playblocking(b); p=audioplayer(noteSequence,fSampling);playblocking(p); % 小星星a=audioplayer(noteSequence2,fSampling);playblocking(a); % 鐘聲[y, fs]=audioread('ccheer.wav'); % 歡呼b=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('Train.wav'); % 火車b=audioplayer(y, fs);playblocking(b);playblocking(b);playblocking(b);[y, fs]=audioread('kiss.wav'); % kissb=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('Wedding.wav'); % 婚禮b=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('NB.wav'); % 嬰兒b=audioplayer(y, fs);playblocking(b);p=audioplayer(noteSequence4,fSampling);playblocking(p); % 小星星[y, fs]=audioread('HEARTSTOP.wav'); % 心跳停止b=audioplayer(y, fs);playblocking(b);[y, fs]=audioread('BYE.wav'); %BYEb=audioplayer(y, fs);playblocking(b);% --- Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%% Generate a Sequency of Musical Notes.% Musical notes corresponding to the second octave starting with the note% Do or C at 524 Hz, and ending with the note Ti or at 988 Hz are generated% for one second, weighted with an exponentially decaying signal to model% the attack and decay of musical instruments and sent to the sound card.%% Chose sampling frequency fSampling = 4000;%% Create time VectortSampling = 1/fSampling;t = 0:tSampling:0.5;%% Set of note frequenciesfNote = [524 588 660 698 784 880 988 0 383];%% Generate notesDo = sin(2*pi*fNote(1)*t+2*pi*rand);%CRe = sin(2*pi*fNote(2)*t+2*pi*rand);%DMi = sin(2*pi*fNote(3)*t+2*pi*rand);%E Fa = sin(2*pi*fNote(4)*t+2*pi*rand);%FSo = sin(2*pi*fNote(5)*t+2*pi*rand);%GLa = sin(2*pi*fNote(6)*t+2*pi*rand);%ATi = sin(2*pi*fNote(7)*t+2*pi*rand);%Ano = sin(2*pi*fNote(8)*t+2*pi*rand);%Aso= sin(2*pi*fNote(9)*t+2*pi*rand);%G%% Weigh the notesexpWtCnst = 6;expWt = exp(-abs(expWtCnst*t));Do = Do.*expWt;Re = Re.*expWt;Mi = Mi.*expWt;Fa = Fa.*expWt;So = So.*expWt;La = La.*expWt;Ti = Ti.*expWt;%% Generate note sequencenoteSequence = [Do Do So So La La So no Fa Fa Mi Mi Re Re Do no So So Fa Fa Mi Mi Re no So So Fa Fa Mi Mi Re no Do Do So So La La So no Fa Fa Mi Mi Re Re Do ];noteSequence2 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do];noteSequence3 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do no no no no];noteSequence4 = [ Mi Mi Fa So So Fa Mi Re Do Do Re Mi Mi Re Re no Mi Mi Fa So So Fa Mi Re Do Do Re Mi Re Do Do ];[y, fs]=audioread('battements_de_coeur1.wav'); % 心跳b=audioplayer(y, 3*fs);playblocking(b); playblocking(b); playblocking(b); [y, fs]=audioread('toussez3.wav'); % 嬰兒b=audioplayer(y, 3*fs);playblocking(b); p=audioplayer(noteSequence,3*fSampling);playblocking(p); % 小星星a=audioplayer(noteSequence2,3*fSampling);playblocking(a); % 鐘聲[y, fs]=audioread('ccheer.wav'); % 歡呼b=audioplayer(y, 3*fs);playblocking(b);[y, fs]=audioread('Train.wav'); % 火車b=audioplayer(y, 3*fs);playblocking(b);playblocking(b);playblocking(b);[y, fs]=audioread('kiss.wav'); % kissb=audioplayer(y, 3*fs);playblocking(b);[y, fs]=audioread('Wedding.wav'); % 婚禮b=audioplayer(y, 3*fs);playblocking(b);[y, fs]=audioread('NB.wav'); % 嬰兒b=audioplayer(y, 3*fs);playblocking(b);p=audioplayer(noteSequence4,3*fSampling);playblocking(p); % 快樂頌[y, fs]=audioread('HEARTSTOP.wav'); % 心跳停止b=audioplayer(y, 3*fs);playblocking(b);[y, fs]=audioread('BYE.wav'); %BYEb=audioplayer(y, 3*fs);playblocking(b);% --- Executes on button press in pushbutton4.function pushbutton4_Callback(hObject, eventdata, handles)% hObject handle to pushbutton4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%% Generate a Sequency of Musical Notes.% Musical notes corresponding to the second octave starting with the note% Do or C at 524 Hz, and ending with the note Ti or at 988 Hz are generated% for one second, weighted with an exponentially decaying signal to model% the attack and decay of musical instruments and sent to the sound card.%% Chose sampling frequency fSampling = 4000;%% Create time VectortSampling = 1/fSampling;t = 0:tSampling:0.5;%% Set of note frequenciesfNote = [524 588 660 698 784 880 988 0 383];%% Generate notesDo = sin(2*pi*fNote(1)*t+2*pi*rand);%CRe = sin(2*pi*fNote(2)*t+2*pi*rand);%DMi = sin(2*pi*fNote(3)*t+2*pi*rand);%E Fa = sin(2*pi*fNote(4)*t+2*pi*rand);%FSo = sin(2*pi*fNote(5)*t+2*pi*rand);%GLa = sin(2*pi*fNote(6)*t+2*pi*rand);%ATi = sin(2*pi*fNote(7)*t+2*pi*rand);%Ano = sin(2*pi*fNote(8)*t+2*pi*rand);%Aso= sin(2*pi*fNote(9)*t+2*pi*rand);%G%% Weigh the notesexpWtCnst = 6;expWt = exp(-abs(expWtCnst*t));Do = Do.*expWt;Re = Re.*expWt;Mi = Mi.*expWt;Fa = Fa.*expWt;So = So.*expWt;La = La.*expWt;Ti = Ti.*expWt;%% Generate note sequencenoteSequence = [Do Do So So La La So no Fa Fa Mi Mi Re Re Do no So So Fa Fa Mi Mi Re no So So Fa Fa Mi Mi Re no Do Do So So La La So no Fa Fa Mi Mi Re Re Do ];noteSequence2 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do];noteSequence3 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do no no no no];noteSequence4 = [ Mi Mi Fa So So Fa Mi Re Do Do Re Mi Mi Re Re no Mi Mi Fa So So Fa Mi Re Do Do Re Mi Re Do Do ];[y, fs]=audioread('battements_de_coeur1.wav'); % 心跳b=audioplayer(y, 2/3*fs);playblocking(b); playblocking(b); playblocking(b); [y, fs]=audioread('toussez3.wav'); % 嬰兒b=audioplayer(y, 2/3*fs);playblocking(b); p=audioplayer(noteSequence,2/3*fSampling);playblocking(p); % 小星星a=audioplayer(noteSequence2,2/3*fSampling);playblocking(a); % 鐘聲[y, fs]=audioread('ccheer.wav'); % 歡呼b=audioplayer(y, 2/3*fs);playblocking(b);[y, fs]=audioread('Train.wav'); % 火車b=audioplayer(y, 2/3*fs);playblocking(b);playblocking(b);playblocking(b);[y, fs]=audioread('kiss.wav'); % kissb=audioplayer(y, 2/3*fs);playblocking(b);[y, fs]=audioread('Wedding.wav'); % 婚禮b=audioplayer(y, 2/3*fs);playblocking(b);[y, fs]=audioread('NB.wav'); % 嬰兒b=audioplayer(y, 2/3*fs);playblocking(b);p=audioplayer(noteSequence4,2/3*fSampling);playblocking(p); % 快樂頌[y, fs]=audioread('HEARTSTOP.wav'); % 心跳停止b=audioplayer(y, 2/3*fs);playblocking(b);[y, fs]=audioread('BYE.wav'); %BYEb=audioplayer(y, 2/3*fs);playblocking(b);% --- Executes on button press in pushbutton5.function pushbutton5_Callback(hObject, eventdata, handles)% hObject handle to pushbutton5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%% Generate a Sequency of Musical Notes.% Musical notes corresponding to the second octave starting with the note% Do or C at 524 Hz, and ending with the note Ti or at 988 Hz are generated% for one second, weighted with an exponentially decaying signal to model% the attack and decay of musical instruments and sent to the sound card.%% Chose sampling frequency fSampling = 4000;%% Create time VectortSampling = 1/fSampling;t = 0:tSampling:0.5;%% Set of note frequenciesfNote = [524 588 660 698 784 880 988 0 383];%% Generate notesDo = sin(2*pi*fNote(1)*t+2*pi*rand);%CRe = sin(2*pi*fNote(2)*t+2*pi*rand);%DMi = sin(2*pi*fNote(3)*t+2*pi*rand);%E Fa = sin(2*pi*fNote(4)*t+2*pi*rand);%FSo = sin(2*pi*fNote(5)*t+2*pi*rand);%GLa = sin(2*pi*fNote(6)*t+2*pi*rand);%ATi = sin(2*pi*fNote(7)*t+2*pi*rand);%Ano = sin(2*pi*fNote(8)*t+2*pi*rand);%Aso= sin(2*pi*fNote(9)*t+2*pi*rand);%G%% Weigh the notesexpWtCnst = 6;expWt = exp(-abs(expWtCnst*t));Do = Do.*expWt;Re = Re.*expWt;Mi = Mi.*expWt;Fa = Fa.*expWt;So = So.*expWt;La = La.*expWt;Ti = Ti.*expWt;%% Generate note sequencenoteSequence = [Do Do So So La La So no Fa Fa Mi Mi Re Re Do no So So Fa Fa Mi Mi Re no So So Fa Fa Mi Mi Re no Do Do So So La La So no Fa Fa Mi Mi Re Re Do ];noteSequence2 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do];noteSequence3 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do no no no no];noteSequence4 = [ Mi Mi Fa So So Fa Mi Re Do Do Re Mi Mi Re Re no Mi Mi Fa So So Fa Mi Re Do Do Re Mi Re Do Do ];[y, fs]=audioread('battements_de_coeur1.wav'); % 心跳b=audioplayer(20*y, fs);playblocking(b); playblocking(b); playblocking(b); [y, fs]=audioread('toussez3.wav'); % 嬰兒b=audioplayer(20*y, fs);playblocking(b); p=audioplayer(20*noteSequence,fSampling);playblocking(p); % 小星星a=audioplayer(20*noteSequence2,fSampling);playblocking(a); % 鐘聲[y, fs]=audioread('ccheer.wav'); % 歡呼b=audioplayer(20*y, fs);playblocking(b);[y, fs]=audioread('Train.wav'); % 火車b=audioplayer(20*y, fs);playblocking(b);playblocking(b);playblocking(b);[y, fs]=audioread('kiss.wav'); % kissb=audioplayer(20*y, fs);playblocking(b);[y, fs]=audioread('Wedding.wav'); % 婚禮b=audioplayer(20*y, fs);playblocking(b);[y, fs]=audioread('NB.wav'); % 嬰兒b=audioplayer(20*y, fs);playblocking(b);p=audioplayer(20*noteSequence4,fSampling);playblocking(p); % 小星星[y, fs]=audioread('HEARTSTOP.wav'); % 心跳停止b=audioplayer(20*y, fs);playblocking(b);[y, fs]=audioread('BYE.wav'); %BYEb=audioplayer(20*y, fs);playblocking(b);% --- Executes on button press in pushbutton6.function pushbutton6_Callback(hObject, eventdata, handles)% hObject handle to pushbutton6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%% Generate a Sequency of Musical Notes.% Musical notes corresponding to the second octave starting with the note% Do or C at 524 Hz, and ending with the note Ti or at 988 Hz are generated% for one second, weighted with an exponentially decaying signal to model% the attack and decay of musical instruments and sent to the sound card.%% Chose sampling frequency fSampling = 4000;%% Create time VectortSampling = 1/fSampling;t = 0:tSampling:0.5;%% Set of note frequenciesfNote = [524 588 660 698 784 880 988 0 383];%% Generate notesDo = sin(2*pi*fNote(1)*t+2*pi*rand);%CRe = sin(2*pi*fNote(2)*t+2*pi*rand);%DMi = sin(2*pi*fNote(3)*t+2*pi*rand);%E Fa = sin(2*pi*fNote(4)*t+2*pi*rand);%FSo = sin(2*pi*fNote(5)*t+2*pi*rand);%GLa = sin(2*pi*fNote(6)*t+2*pi*rand);%ATi = sin(2*pi*fNote(7)*t+2*pi*rand);%Ano = sin(2*pi*fNote(8)*t+2*pi*rand);%Aso= sin(2*pi*fNote(9)*t+2*pi*rand);%G%% Weigh the notesexpWtCnst = 6;expWt = exp(-abs(expWtCnst*t));Do = Do.*expWt;Re = Re.*expWt;Mi = Mi.*expWt;Fa = Fa.*expWt;So = So.*expWt;La = La.*expWt;Ti = Ti.*expWt;%% Generate note sequencenoteSequence = [Do Do So So La La So no Fa Fa Mi Mi Re Re Do no So So Fa Fa Mi Mi Re no So So Fa Fa Mi Mi Re no Do Do So So La La So no Fa Fa Mi Mi Re Re Do ];noteSequence2 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do];noteSequence3 = [ no no Mi Do Re so no Do Re Mi Do no Mi Do Re so no so Re Mi Do no no no no];noteSequence4 = [ Mi Mi Fa So So Fa Mi Re Do Do Re Mi Mi Re Re no Mi Mi Fa So So Fa Mi Re Do Do Re Mi Re Do Do ];[y, fs]=audioread('battements_de_coeur1.wav'); % 心跳b=audioplayer(1/20*y, fs);playblocking(b); playblocking(b); playblocking(b); [y, fs]=audioread('toussez3.wav'); % 嬰兒b=audioplayer(1/20*y, fs);playblocking(b); p=audioplayer(1/20*noteSequence,fSampling);playblocking(p); % 小星星a=audioplayer(1/20*noteSequence2,fSampling);playblocking(a); % 鐘聲[y, fs]=audioread('ccheer.wav'); % 歡呼b=audioplayer(1/20*y, fs);playblocking(b);[y, fs]=audioread('Train.wav'); % 火車b=audioplayer(1/20*y, fs);playblocking(b);playblocking(b);playblocking(b);[y, fs]=audioread('kiss.wav'); % kissb=audioplayer(1/20*y, fs);playblocking(b);[y, fs]=audioread('Wedding.wav'); % 婚禮b=audioplayer(1/20*y, fs);playblocking(b);[y, fs]=audioread('NB.wav'); % 嬰兒b=audioplayer(1/20*y, fs);playblocking(b);p=audioplayer(1/20*noteSequence4,fSampling);playblocking(p); % 小星星[y, fs]=audioread('HEARTSTOP.wav'); % 心跳停止b=audioplayer(1/20*y, fs);playblocking(b);[y, fs]=audioread('BYE.wav'); %BYEb=audioplayer(1/20*y, fs);playblocking(b);% --- Executes on button press in pushbutton7.function pushbutton7_Callback(hObject, eventdata, handles)% hObject handle to pushbutton7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)clear allclose all