function varargout = Analysecourtterme(varargin)
% ANALYSECOURTTERME M-file for Analysecourtterme.fig
% ANALYSECOURTTERME, by itself, creates a new ANALYSECOURTTERME or raises the existing
% singleton*.
%
% H = ANALYSECOURTTERME returns the handle to a new ANALYSECOURTTERME or the handle to
% the existing singleton*.
%
% ANALYSECOURTTERME('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in ANALYSECOURTTERME.M with the given input arguments.
%
% ANALYSECOURTTERME('Property','Value',...) creates a new ANALYSECOURTTERME or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Analysecourtterme_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Analysecourtterme_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 Analysecourtterme
% Last Modified by GUIDE v2.5 29-Jun-2006 15:22:02
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Analysecourtterme_OpeningFcn, ...
'gui_OutputFcn', @Analysecourtterme_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin & isstr(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if 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 Analysecourtterme is made visible.
function Analysecourtterme_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 Analysecourtterme (see VARARGIN)
% Choose default command line output for Analysecourtterme
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes Analysecourtterme wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Analysecourtterme_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 structure
varargout{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)
clc;
%[fname,pname] = uigetfile('*.wav','Slectionner un fichier wav');
[son,Fs,bits] = wavread('Ah.wav');
save son;
save Fs;
% --- 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)
clc;
load son;
load Fs;
sound(son,Fs)
sampling_rate = Fs;
windowsize_s = 0.020;
windowsize = sampling_rate*windowsize_s;
framesize_s = 0.010;
framesize = sampling_rate*framesize_s;
[result, nframes] = windowize(son, windowsize, framesize);
save result;
save nframes;
% --- 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)
load result;
load nframes;
[energie_moy] = energie_moyenne(result);
axes(handles.axes2)
plot(energie_moy);
title(['Energie Moyenne'],'FontSize',12,'Color','b')
[taux_zeros] = taux_passages_zeros(result, windowsize);
axes(handles.axes3)
plot(taux_zeros);
title(['Taux de passages par zro'],'FontSize',12,'Color','b')
[puissance_moy] = puissance_moyenne(result, windowsize);
axes(handles.axes4)
plot(puissance_moy);
title(['Puissance Moyenne'],'FontSize',12,'Color','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)
load son;
load Fs;
s=size(son);
t = (1:s(1))/Fs;
axes(handles.axes1)
plot(t,son);zoom xon;
title(['Analyse de la voyelle "A" pour un Homme '],'FontSize',12,'Color','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)
[sonf,Fsf,bitsf] = wavread('Af.wav');
save sonf;
save Fsf;
% --- 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)
clc;
load sonf;
load Fsf;
sound(sonf,Fsf)
sampling_ratef = Fsf;
windowsize_sf = 0.020;
windowsizef = sampling_ratef*windowsize_sf;
framesize_sf = 0.010;
framesizef = sampling_ratef*framesize_sf;
[resultf, nframesf] = windowize(sonf, windowsizef, framesizef);
save resultf;
save nframesf;
% --- 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)
load sonf;
axes(handles.axes9)
load Fsf;
s=size(sonf);
t = (1:s(1))/Fsf;
plot(t,sonf);zoom xon;
title(['Analyse de la voyelle "A" pour une Femme'],'FontSize',12,'Color','b')
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
load resultf;
load nframesf;
[energie_moyf] = energie_moyenne(resultf);
axes(handles.axes6)
plot(energie_moyf);
title(['Energie Moyenne'],'FontSize',12,'Color','b')
[taux_zerosf] = taux_passages_zeros(resultf, windowsizef);
axes(handles.axes7)
plot(taux_zerosf);
title(['Taux de passages par zro'],'FontSize',12,'Color','b')
[puissance_moyf] = puissance_moyenne(resultf, windowsizef);
axes(handles.axes8)
plot(puissance_moyf);
title(['Puissance Moyenne'],'FontSize',12,'Color','b')
% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)