Convolucion de sonidos

Solo disponible en BuenasTareas
  • Páginas : 2 (415 palabras )
  • Descarga(s) : 0
  • Publicado : 23 de octubre de 2010
Leer documento completo
Vista previa del texto
% --- Executes just before guiconvolucionar is made visible.
function guiconvolucionar_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 toguiconvolucionar (see VARARGIN)

% Choose default command line output for guiconvolucionar
handles.output = hObject;

handles.metricdata.band=0;

% Update handles structure
guidata(hObject,handles);

% UIWAIT makes guiconvolucionar wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
functionvarargout = guiconvolucionar_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to bedefined 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 Grabar.
function Grabar_Callback(hObject, eventdata, handles)
% hObject handle to Grabar (see GCBO)
% eventdata reserved - to be defined in a future version ofMATLAB
% handles structure with handles and user data (see GUIDATA)
if handles.metricdata.band==0
Fs = 11025;
% x = wavrecord(5*Fs, Fs, 'int16');
%wavplay(x, Fs);x=wavrecord(10*Fs,Fs);
sound(x,Fs);
axes(handles.axes1);
plot(x);
handles.metricdata.band=1;
handles.metricdata.x=x;
guidata(hObject,handles)
else if handles.metricdata.band==1Fs = 11025;
% y = wavrecord(5*Fs, Fs, 'int16');
% wavplay(y, Fs);
y=wavrecord(10*Fs,Fs);
sound(y,Fs);
axes(handles.axes2);
plot(y);...
tracking img