gusucode.com > 声音的处理有:LPC,FFT,共振峰,频谱源码程序 > siganlandsystemusingMatlab/SSUM/reverb/reverbexpogui.m
function varargout = reverbexpogui(varargin) % REVERBEXPOGUI M-file for reverbexpogui.fig % REVERBEXPOGUI, by itself, creates a new REVERBEXPOGUI or raises the existing % singleton*. % % H = REVERBEXPOGUI returns the handle to a new REVERBEXPOGUI or the handle to % the existing singleton*. % % REVERBEXPOGUI('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in REVERBEXPOGUI.M with the given input arguments. % % REVERBEXPOGUI('Property','Value',...) creates a new REVERBEXPOGUI or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before reverbexpogui_OpeningFunction gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to reverbexpogui_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 reverbexpogui % Last Modified by GUIDE v2.5 18-Nov-2004 10:44:22 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @reverbexpogui_OpeningFcn, ... 'gui_OutputFcn', @reverbexpogui_OutputFcn, ... 'gui_LayoutFcn', @reverbexpogui_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 reverbexpogui is made visible. function reverbexpogui_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 reverbexpogui (see VARARGIN) % Choose default command line output for reverbexpogui handles.output = hObject; guidata(hObject, handles); set(gcf,'UserData',handles); reverbexpofn; if (nargin > 3) datastruct = varargin{1}; reverbexpofn('readinput',datastruct); end % --- Outputs from this function are returned to the command line. function varargout = reverbexpogui_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 play. function play_Callback(hObject, eventdata, handles) % hObject handle to play (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'playsound'; % --- Executes on button press in filter1. function filter1_Callback(hObject, eventdata, handles) % hObject handle to filter1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of filter1 reverbexpofn 'update'; % --- Executes during object creation, after setting all properties. function filter1_a_CreateFcn(hObject, eventdata, handles) % hObject handle to filter1_a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end function filter1_a_Callback(hObject, eventdata, handles) % hObject handle to filter1_a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of filter1_a as text % str2double(get(hObject,'String')) returns contents of filter1_a as a double reverbexpofn 'update'; % --- Executes during object creation, after setting all properties. function filter1_D_CreateFcn(hObject, eventdata, handles) % hObject handle to filter1_D (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end function filter1_D_Callback(hObject, eventdata, handles) % hObject handle to filter1_D (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of filter1_D as text % str2double(get(hObject,'String')) returns contents of filter1_D as a double reverbexpofn 'update'; % --- Executes on button press in filter2. function filter2_Callback(hObject, eventdata, handles) % hObject handle to filter2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of filter2 reverbexpofn 'update'; % --- Executes during object creation, after setting all properties. function filter2_a_CreateFcn(hObject, eventdata, handles) % hObject handle to filter2_a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end function filter2_a_Callback(hObject, eventdata, handles) % hObject handle to filter2_a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of filter2_a as text % str2double(get(hObject,'String')) returns contents of filter2_a as a double reverbexpofn 'update'; % --- Executes during object creation, after setting all properties. function filter2_D_CreateFcn(hObject, eventdata, handles) % hObject handle to filter2_D (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end function filter2_D_Callback(hObject, eventdata, handles) % hObject handle to filter2_D (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of filter2_D as text % str2double(get(hObject,'String')) returns contents of filter2_D as a double reverbexpofn 'update'; % --- Executes on button press in filter3. function filter3_Callback(hObject, eventdata, handles) % hObject handle to filter3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of filter3 reverbexpofn 'update'; % --- Executes during object creation, after setting all properties. function filter3_a_CreateFcn(hObject, eventdata, handles) % hObject handle to filter3_a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end function filter3_a_Callback(hObject, eventdata, handles) % hObject handle to filter3_a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of filter3_a as text % str2double(get(hObject,'String')) returns contents of filter3_a as a double reverbexpofn 'update'; % --- Executes during object creation, after setting all properties. function filter3_D_CreateFcn(hObject, eventdata, handles) % hObject handle to filter3_D (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end function filter3_D_Callback(hObject, eventdata, handles) % hObject handle to filter3_D (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of filter3_D as text % str2double(get(hObject,'String')) returns contents of filter3_D as a double reverbexpofn 'update'; % --- Executes on button press in reverberate. function reverberate_Callback(hObject, eventdata, handles) % hObject handle to reverberate (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'reverberate'; % --- Executes on button press in play_reverb. function play_reverb_Callback(hObject, eventdata, handles) % hObject handle to play_reverb (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'playreverb'; % --- Executes during object creation, after setting all properties. function time_extend_CreateFcn(hObject, eventdata, handles) % hObject handle to time_extend (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end function time_extend_Callback(hObject, eventdata, handles) % hObject handle to time_extend (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of time_extend as text % str2double(get(hObject,'String')) returns contents of time_extend as a double % --- 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) % --- Executes during object creation, after setting all properties. function filter1_type_CreateFcn(hObject, eventdata, handles) % hObject handle to filter1_type (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end % --- Executes on selection change in filter1_type. function filter1_type_Callback(hObject, eventdata, handles) % hObject handle to filter1_type (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: contents = get(hObject,'String') returns filter1_type contents as cell array % contents{get(hObject,'Value')} returns selected item from filter1_type if get(hObject,'Value') reverbexpofn 'update'; end % --- Executes during object creation, after setting all properties. function filter2_type_CreateFcn(hObject, eventdata, handles) % hObject handle to filter2_type (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end % --- Executes on selection change in filter2_type. function filter2_type_Callback(hObject, eventdata, handles) % hObject handle to filter2_type (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: contents = get(hObject,'String') returns filter2_type contents as cell array % contents{get(hObject,'Value')} returns selected item from filter2_type if get(hObject,'Value') reverbexpofn 'update'; end % --- Executes during object creation, after setting all properties. function filter3_type_CreateFcn(hObject, eventdata, handles) % hObject handle to filter3_type (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end % --- Executes on selection change in filter3_type. function filter3_type_Callback(hObject, eventdata, handles) % hObject handle to filter3_type (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: contents = get(hObject,'String') returns filter3_type contents as cell array % contents{get(hObject,'Value')} returns selected item from filter3_type if get(hObject,'Value') reverbexpofn 'update'; end % -------------------------------------------------------------------- function FileMenu_Callback(hObject, eventdata, handles) % hObject handle to FileMenu (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function OpenMenuItem_Callback(hObject, eventdata, handles) % hObject handle to OpenMenuItem (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'loadsound'; % -------------------------------------------------------------------- function CloseMenuItem_Callback(hObject, eventdata, handles) % hObject handle to CloseMenuItem (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'close'; % -------------------------------------------------------------------- function Untitled_2_Callback(hObject, eventdata, handles) % hObject handle to Untitled_2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function fourierexpo_Callback(hObject, eventdata, handles) % hObject handle to fourierexpo (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'fourier'; % -------------------------------------------------------------------- function sonoexpo_Callback(hObject, eventdata, handles) % hObject handle to sonoexpo (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'sonoexpo'; % -------------------------------------------------------------------- function help_Callback(hObject, eventdata, handles) % hObject handle to help (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn 'help'; % --- Executes during object creation, after setting all properties. function timeslider_CreateFcn(hObject, eventdata, handles) % hObject handle to timeslider (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: slider controls usually have a light gray background, change % 'usewhitebg' to 0 to use default. See ISPC and COMPUTER. usewhitebg = 1; if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end % --- Executes on slider movement. function timeslider_Callback(hObject, eventdata, handles) % hObject handle to timeslider (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'Value') returns position of slider % get(hObject,'Min') and get(hObject,'Max') to determine range of slider reverbexpofn 'timeslider'; % -------------------------------------------------------------------- function Untitled_3_Callback(hObject, eventdata, handles) % hObject handle to Untitled_3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function plainecho_Callback(hObject, eventdata, handles) % hObject handle to plainecho (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn('preset','plainecho'); % -------------------------------------------------------------------- function multiecho_Callback(hObject, eventdata, handles) % hObject handle to multiecho (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn('preset','multiecho'); % -------------------------------------------------------------------- function reverb_Callback(hObject, eventdata, handles) % hObject handle to reverb1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn('preset','reverb'); % -------------------------------------------------------------------- function cavern_Callback(hObject, eventdata, handles) % hObject handle to cavern (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) reverbexpofn('preset','cavern'); % --- Creates and returns a handle to the GUI figure. function h1 = reverbexpogui_LayoutFcn(policy) % policy - create a new figure or use a singleton. 'new' or 'reuse'. persistent hsingleton; if strcmpi(policy, 'reuse') & ishandle(hsingleton) h1 = hsingleton; return; end h1 = figure(... 'Units','characters',... 'Color',[0.701960784313725 0.701960784313725 0.701960784313725],... 'Colormap',[0 0 0.5625;0 0 0.625;0 0 0.6875;0 0 0.75;0 0 0.8125;0 0 0.875;0 0 0.9375;0 0 1;0 0.0625 1;0 0.125 1;0 0.1875 1;0 0.25 1;0 0.3125 1;0 0.375 1;0 0.4375 1;0 0.5 1;0 0.5625 1;0 0.625 1;0 0.6875 1;0 0.75 1;0 0.8125 1;0 0.875 1;0 0.9375 1;0 1 1;0.0625 1 1;0.125 1 0.9375;0.1875 1 0.875;0.25 1 0.8125;0.3125 1 0.75;0.375 1 0.6875;0.4375 1 0.625;0.5 1 0.5625;0.5625 1 0.5;0.625 1 0.4375;0.6875 1 0.375;0.75 1 0.3125;0.8125 1 0.25;0.875 1 0.1875;0.9375 1 0.125;1 1 0.0625;1 1 0;1 0.9375 0;1 0.875 0;1 0.8125 0;1 0.75 0;1 0.6875 0;1 0.625 0;1 0.5625 0;1 0.5 0;1 0.4375 0;1 0.375 0;1 0.3125 0;1 0.25 0;1 0.1875 0;1 0.125 0;1 0.0625 0;1 0 0;0.9375 0 0;0.875 0 0;0.8125 0 0;0.75 0 0;0.6875 0 0;0.625 0 0;0.5625 0 0],... 'IntegerHandle','off',... 'InvertHardcopy',get(0,'defaultfigureInvertHardcopy'),... 'MenuBar','none',... 'Name','Reverb Explorer',... 'NumberTitle','off',... 'PaperPosition',get(0,'defaultfigurePaperPosition'),... 'Position',[103.8 2.71153846153845 110.5 58.75],... 'Renderer',get(0,'defaultfigureRenderer'),... 'RendererMode','manual',... 'Resize','off',... 'HandleVisibility','callback',... 'Tag','reverbexpo_fig',... 'UserData',[],... 'Visible',get(0,'defaultfigureVisible')); setappdata(h1, 'GUIDEOptions',struct(... 'active_h', [], ... 'taginfo', struct(... 'figure', 2, ... 'axes', 3, ... 'pushbutton', 5, ... 'frame', 4, ... 'text', 11, ... 'checkbox', 4, ... 'edit', 8, ... 'popupmenu', 4, ... 'slider', 2), ... 'override', 0, ... 'release', 13, ... 'resize', 'none', ... 'accessibility', 'callback', ... 'mfile', 1, ... 'callbacks', 1, ... 'singleton', 1, ... 'syscolorfig', 1, ... 'blocking', 0, ... 'lastSavedFile', '/Users/bobsturm/SSUM/reverb/reverbexpo.m')); h2 = axes(... 'Parent',h1,... 'Units','characters',... 'CameraPosition',[0.5 0.5 9.16025403784439],... 'CameraPositionMode',get(0,'defaultaxesCameraPositionMode'),... 'Color',get(0,'defaultaxesColor'),... 'ColorOrder',get(0,'defaultaxesColorOrder'),... 'Position',[10.8333333333333 40.5 97.5 16],... 'XColor',get(0,'defaultaxesXColor'),... 'YColor',get(0,'defaultaxesYColor'),... 'ZColor',get(0,'defaultaxesZColor'),... 'Tag','freq'); h3 = get(h2,'title'); set(h3,... 'Parent',h2,... 'Color',[0 0 0],... 'HorizontalAlignment','center',... 'Position',[0.498290598290598 1.02864583333333 1.00005459937205],... 'VerticalAlignment','bottom',... 'HandleVisibility','off'); h4 = get(h2,'xlabel'); set(h4,... 'Parent',h2,... 'Color',[0 0 0],... 'HorizontalAlignment','center',... 'Position',[0.498290598290598 -0.106770833333333 1.00005459937205],... 'VerticalAlignment','cap',... 'HandleVisibility','off'); h5 = get(h2,'ylabel'); set(h5,... 'Parent',h2,... 'Color',[0 0 0],... 'HorizontalAlignment','center',... 'Position',[-0.0401709401709402 0.4921875 1.00005459937205],... 'Rotation',90,... 'VerticalAlignment','bottom',... 'HandleVisibility','off'); h6 = get(h2,'zlabel'); set(h6,... 'Parent',h2,... 'Color',[0 0 0],... 'HorizontalAlignment','right',... 'Position',[-0.111965811965812 1.1328125 1.00005459937205],... 'HandleVisibility','off',... 'Visible','off'); h7 = axes(... 'Parent',h1,... 'Units','characters',... 'CameraPosition',[0.5 0.5 9.16025403784439],... 'CameraPositionMode',get(0,'defaultaxesCameraPositionMode'),... 'Color',get(0,'defaultaxesColor'),... 'ColorOrder',get(0,'defaultaxesColorOrder'),... 'Position',[10.8333333333333 20 97.5 16],... 'XColor',get(0,'defaultaxesXColor'),... 'YColor',get(0,'defaultaxesYColor'),... 'ZColor',get(0,'defaultaxesZColor'),... 'Tag','impulse'); h8 = get(h7,'title'); set(h8,... 'Parent',h7,... 'Color',[0 0 0],... 'HorizontalAlignment','center',... 'Position',[0.498290598290598 1.0234375 1.00005459937205],... 'VerticalAlignment','bottom',... 'HandleVisibility','off'); h9 = get(h7,'xlabel'); set(h9,... 'Parent',h7,... 'Color',[0 0 0],... 'HorizontalAlignment','center',... 'Position',[0.498290598290598 -0.106770833333333 1.00005459937205],... 'VerticalAlignment','cap',... 'HandleVisibility','off'); h10 = get(h7,'ylabel'); set(h10,... 'Parent',h7,... 'Color',[0 0 0],... 'HorizontalAlignment','center',... 'Position',[-0.0401709401709402 0.4921875 1.00005459937205],... 'Rotation',90,... 'VerticalAlignment','bottom',... 'HandleVisibility','off'); h11 = get(h7,'zlabel'); set(h11,... 'Parent',h7,... 'Color',[0 0 0],... 'HorizontalAlignment','right',... 'Position',[-0.111965811965812 2.4140625 1.00005459937205],... 'HandleVisibility','off',... 'Visible','off'); h12 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''play_Callback'',gcbo,[],guidata(gcbo))',... 'CData',[],... 'ListboxTop',0,... 'Position',[67.5 0.75 12 1.5],... 'String','Play Original',... 'Tag','play',... 'UserData',[]); h13 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Position',[9.66666666666667 3.66666666666667 21 10],... 'String',{ '' },... 'Style','frame',... 'Tag','frame1'); h14 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[10.8333333333333 11 17 1.66666666666667],... 'String','Filter 1',... 'Style','text',... 'Tag','text1'); h15 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter1_Callback'',gcbo,[],guidata(gcbo))',... 'Position',[26.8333333333333 11.3333333333333 3 1.5],... 'String','',... 'Style','checkbox',... 'Value',1,... 'Tag','filter1'); h16 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter1_a_Callback'',gcbo,[],guidata(gcbo))',... 'HorizontalAlignment','left',... 'Position',[17 9 9 1.5],... 'String','0.6',... 'Style','edit',... 'CreateFcn','reverbexpogui(''filter1_a_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter1_a'); h17 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter1_D_Callback'',gcbo,[],guidata(gcbo))',... 'HorizontalAlignment','left',... 'Position',[17 7.08333333333333 9 1.5],... 'String','20',... 'Style','edit',... 'CreateFcn','reverbexpogui(''filter1_D_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter1_D'); h18 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[13.8333333333333 9.41666666666667 3 1],... 'String','a',... 'Style','text',... 'Tag','text2'); h19 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[13.8333333333333 7.33333333333333 3 1],... 'String','D',... 'Style','text',... 'Tag','text3'); h20 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Position',[37.1666666666667 3.66666666666667 21 10],... 'String',{ '' },... 'Style','frame',... 'Tag','frame2'); h21 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[38.1666666666667 11 17 1.66666666666667],... 'String','Filter 2',... 'Style','text',... 'Tag','text4'); h22 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter2_Callback'',gcbo,[],guidata(gcbo))',... 'Position',[53.8333333333333 11.3333333333333 3 1.5],... 'String','',... 'Style','checkbox',... 'Tag','filter2'); h23 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter2_a_Callback'',gcbo,[],guidata(gcbo))',... 'HorizontalAlignment','left',... 'Position',[45.3333333333333 9 9 1.5],... 'String','0.6',... 'Style','edit',... 'CreateFcn','reverbexpogui(''filter2_a_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter2_a'); h24 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter2_D_Callback'',gcbo,[],guidata(gcbo))',... 'HorizontalAlignment','left',... 'Position',[45.3333333333333 7.08333333333333 9 1.5],... 'String','20',... 'Style','edit',... 'CreateFcn','reverbexpogui(''filter2_D_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter2_D'); h25 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[41.6666666666667 9.41666666666667 3 1],... 'String','a',... 'Style','text',... 'Tag','text5'); h26 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[41.6666666666667 7.33333333333333 3 1],... 'String','D',... 'Style','text',... 'Tag','text6'); h27 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Position',[65.5 3.66666666666667 21 10],... 'String',{ '' },... 'Style','frame',... 'Tag','frame3'); h28 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[66.5 10.8333333333333 17 1.66666666666667],... 'String','Filter 3',... 'Style','text',... 'Tag','text7'); h29 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter3_Callback'',gcbo,[],guidata(gcbo))',... 'Position',[81 11.3333333333333 3 1.5],... 'String','',... 'Style','checkbox',... 'Tag','filter3'); h30 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter3_a_Callback'',gcbo,[],guidata(gcbo))',... 'HorizontalAlignment','left',... 'Position',[73 9 9 1.5],... 'String','0.6',... 'Style','edit',... 'CreateFcn','reverbexpogui(''filter3_a_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter3_a'); h31 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter3_D_Callback'',gcbo,[],guidata(gcbo))',... 'HorizontalAlignment','left',... 'Position',[73 7.08333333333333 9 1.5],... 'String','20',... 'Style','edit',... 'CreateFcn','reverbexpogui(''filter3_D_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter3_D'); h32 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[70 9.41666666666667 3 1],... 'String','a',... 'Style','text',... 'Tag','text8'); h33 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[70 7.33333333333333 3 1],... 'String','D',... 'Style','text',... 'Tag','text9'); h34 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''reverberate_Callback'',gcbo,[],guidata(gcbo))',... 'CData',[],... 'ListboxTop',0,... 'Position',[54 0.75 12 1.5],... 'String','Reverberate',... 'Tag','reverberate',... 'UserData',[]); h35 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''play_reverb_Callback'',gcbo,[],guidata(gcbo))',... 'CData',[],... 'ListboxTop',0,... 'Position',[81.5 0.75 12 1.5],... 'String','Play Reverb',... 'Tag','play_reverb',... 'UserData',[]); h36 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''time_extend_Callback'',gcbo,[],guidata(gcbo))',... 'HorizontalAlignment','left',... 'Position',[43.5 0.666666666666667 9 1.5],... 'String','0',... 'Style','edit',... 'CreateFcn','reverbexpogui(''time_extend_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','time_extend'); h37 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'FontSize',12,... 'HorizontalAlignment','left',... 'Position',[25.6666666666667 0.333333333333333 17 1.66666666666667],... 'String','Extend Time (s)',... 'Style','text',... 'Tag','text10'); h38 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter1_type_Callback'',gcbo,[],guidata(gcbo))',... 'Position',[12.5 4.91666666666667 14.8333333333333 1.5],... 'String',{ 'Comb'; 'Allpass' },... 'Style','popupmenu',... 'Value',1,... 'CreateFcn','reverbexpogui(''filter1_type_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter1_type'); h39 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter2_type_Callback'',gcbo,[],guidata(gcbo))',... 'Position',[40.6666666666667 4.91666666666667 14.6666666666667 1.5],... 'String',{ 'Comb'; 'Allpass' },... 'Style','popupmenu',... 'Value',1,... 'CreateFcn','reverbexpogui(''filter2_type_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter2_type'); h40 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''filter3_type_Callback'',gcbo,[],guidata(gcbo))',... 'Position',[69 4.91666666666667 14.6666666666667 1.5],... 'String',{ 'Comb'; 'Allpass' },... 'Style','popupmenu',... 'Value',1,... 'CreateFcn','reverbexpogui(''filter3_type_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','filter3_type'); h41 = uimenu(... 'Parent',h1,... 'Callback','reverbexpogui(''FileMenu_Callback'',gcbo,[],guidata(gcbo))',... 'Label','File',... 'Tag','FileMenu'); h42 = uimenu(... 'Parent',h41,... 'Callback','reverbexpogui(''OpenMenuItem_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Open ...',... 'Tag','OpenMenuItem'); h43 = uimenu(... 'Parent',h41,... 'Callback','reverbexpogui(''CloseMenuItem_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Close',... 'Tag','CloseMenuItem'); h44 = uimenu(... 'Parent',h1,... 'Callback','reverbexpogui(''Untitled_3_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Presets',... 'Tag','Untitled_3'); h45 = uimenu(... 'Parent',h44,... 'Callback','reverbexpogui(''plainecho_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Plain Echo',... 'Tag','plainecho'); h46 = uimenu(... 'Parent',h44,... 'Callback','reverbexpogui(''multiecho_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Multiecho',... 'Tag','multiecho'); h47 = uimenu(... 'Parent',h44,... 'Callback','reverbexpogui(''reverb_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Reverb',... 'Tag','reverb'); h48 = uimenu(... 'Parent',h44,... 'Callback','reverbexpogui(''cavern_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Cavern',... 'Tag','cavern'); h49 = uimenu(... 'Parent',h1,... 'Callback','reverbexpogui(''Untitled_2_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Send to...',... 'Tag','Untitled_2'); h50 = uimenu(... 'Parent',h49,... 'Callback','reverbexpogui(''fourierexpo_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Fourier Explorer',... 'Tag','fourierexpo'); h51 = uimenu(... 'Parent',h49,... 'Callback','reverbexpogui(''sonoexpo_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Sonogram Explorer',... 'Tag','sonoexpo'); h52 = uicontrol(... 'Parent',h1,... 'Units','characters',... 'Callback','reverbexpogui(''timeslider_Callback'',gcbo,[],guidata(gcbo))',... 'Position',[11.3333333333333 15.75 97.5 1],... 'String',{ '' },... 'Style','slider',... 'Value',1,... 'CreateFcn','reverbexpogui(''timeslider_CreateFcn'',gcbo,[],guidata(gcbo))',... 'Tag','timeslider'); h53 = uimenu(... 'Parent',h1,... 'Callback','reverbexpogui(''help_Callback'',gcbo,[],guidata(gcbo))',... 'Label','Help',... 'Tag','help'); hsingleton = h1; % --- Handles default GUIDE GUI creation and callback dispatch function varargout = gui_mainfcn(gui_State, varargin) gui_StateFields = {'gui_Name' 'gui_Singleton' 'gui_OpeningFcn' 'gui_OutputFcn' 'gui_LayoutFcn' 'gui_Callback'}; gui_Mfile = ''; for i=1:length(gui_StateFields) if ~isfield(gui_State, gui_StateFields{i}) error('Could not find field %s in the gui_State struct in GUI M-file %s', gui_StateFields{i}, gui_Mfile); elseif isequal(gui_StateFields{i}, 'gui_Name') gui_Mfile = [getfield(gui_State, gui_StateFields{i}), '.m']; end end numargin = length(varargin); if numargin == 0 % REVERBEXPOGUI % create the GUI gui_Create = 1; elseif numargin > 3 & ischar(varargin{1}) & ishandle(varargin{2}) % REVERBEXPOGUI('CALLBACK',hObject,eventData,handles,...) gui_Create = 0; else % REVERBEXPOGUI(...) % create the GUI and hand varargin to the openingfcn gui_Create = 1; end if gui_Create == 0 varargin{1} = gui_State.gui_Callback; if nargout [varargout{1:nargout}] = feval(varargin{:}); else feval(varargin{:}); end else if gui_State.gui_Singleton gui_SingletonOpt = 'reuse'; else gui_SingletonOpt = 'new'; end % Open fig file with stored settings. Note: This executes all component % specific CreateFunctions with an empty HANDLES structure. % Do feval on layout code in m-file if it exists if ~isempty(gui_State.gui_LayoutFcn) gui_hFigure = feval(gui_State.gui_LayoutFcn, gui_SingletonOpt); else gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt); % If the figure has InGUIInitialization it was not completely created % on the last pass. Delete this handle and try again. if isappdata(gui_hFigure, 'InGUIInitialization') delete(gui_hFigure); gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt); end end % Set flag to indicate starting GUI initialization setappdata(gui_hFigure,'InGUIInitialization',1); % Fetch GUIDE Application options gui_Options = getappdata(gui_hFigure,'GUIDEOptions'); if ~isappdata(gui_hFigure,'GUIOnScreen') % Adjust background color if gui_Options.syscolorfig set(gui_hFigure,'Color', get(0,'DefaultUicontrolBackgroundColor')); end % Generate HANDLES structure and store with GUIDATA guidata(gui_hFigure, guihandles(gui_hFigure)); end % If user specified 'Visible','off' in p/v pairs, don't make the figure % visible. gui_MakeVisible = 1; for ind=1:2:length(varargin) if length(varargin) == ind break; end len1 = min(length('visible'),length(varargin{ind})); len2 = min(length('off'),length(varargin{ind+1})); if ischar(varargin{ind}) & ischar(varargin{ind+1}) & ... strncmpi(varargin{ind},'visible',len1) & len2 > 1 if strncmpi(varargin{ind+1},'off',len2) gui_MakeVisible = 0; elseif strncmpi(varargin{ind+1},'on',len2) gui_MakeVisible = 1; end end end % Check for figure param value pairs for index=1:2:length(varargin) if length(varargin) == index break; end try, set(gui_hFigure, varargin{index}, varargin{index+1}), catch, break, end end % If handle visibility is set to 'callback', turn it on until finished % with OpeningFcn gui_HandleVisibility = get(gui_hFigure,'HandleVisibility'); if strcmp(gui_HandleVisibility, 'callback') set(gui_hFigure,'HandleVisibility', 'on'); end feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:}); if ishandle(gui_hFigure) % Update handle visibility set(gui_hFigure,'HandleVisibility', gui_HandleVisibility); % Make figure visible if gui_MakeVisible set(gui_hFigure, 'Visible', 'on') if gui_Options.singleton setappdata(gui_hFigure,'GUIOnScreen', 1); end end % Done with GUI initialization rmappdata(gui_hFigure,'InGUIInitialization'); end % If handle visibility is set to 'callback', turn it on until finished with % OutputFcn if ishandle(gui_hFigure) gui_HandleVisibility = get(gui_hFigure,'HandleVisibility'); if strcmp(gui_HandleVisibility, 'callback') set(gui_hFigure,'HandleVisibility', 'on'); end gui_Handles = guidata(gui_hFigure); else gui_Handles = []; end if nargout [varargout{1:nargout}] = feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles); else feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles); end if ishandle(gui_hFigure) set(gui_hFigure,'HandleVisibility', gui_HandleVisibility); end end function gui_hFigure = local_openfig(name, singleton) try gui_hFigure = openfig(name, singleton, 'auto'); catch % OPENFIG did not accept 3rd input argument until R13, % toggle default figure visible to prevent the figure % from showing up too soon. gui_OldDefaultVisible = get(0,'defaultFigureVisible'); set(0,'defaultFigureVisible','off'); gui_hFigure = openfig(name, singleton); set(0,'defaultFigureVisible',gui_OldDefaultVisible); end