📄 xsynthexpogui.m
字号:
function varargout = xsynthexpogui(varargin)% XSYNTHEXPOGUI M-file for xsynthexpogui.fig% XSYNTHEXPOGUI, by itself, creates a new XSYNTHEXPOGUI or raises the existing% singleton*.%% H = XSYNTHEXPOGUI returns the handle to a new XSYNTHEXPOGUI or the handle to% the existing singleton*.%% XSYNTHEXPOGUI('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in XSYNTHEXPOGUI.M with the given input arguments.%% XSYNTHEXPOGUI('Property','Value',...) creates a new XSYNTHEXPOGUI or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before xsynthexpogui_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to xsynthexpogui_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 xsynthexpogui% Last Modified by GUIDE v2.5 25-Mar-2004 20:52:55% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @xsynthexpogui_OpeningFcn, ... 'gui_OutputFcn', @xsynthexpogui_OutputFcn, ... 'gui_LayoutFcn', @xsynthexpogui_LayoutFcn, ... 'gui_Callback', []);if nargin & isstr(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 xsynthexpogui is made visible.function xsynthexpogui_OpeningFcn(hObject, eventdata, handles, varargin)% Choose default command line output for xsynthexpoguihandles.output = hObject;% Update handles structureguidata(hObject, handles);set(gcf,'UserData',handles);xsynthexpofn;% --- Outputs from this function are returned to the command line.function varargout = xsynthexpogui_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;% --------------------------------------------------------------------function load_signal_1_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.signum = 1; set(gcf,'UserData',handles); xsynthexpofn 'loadsound'% --------------------------------------------------------------------function load_signal_2_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.signum = 2; set(gcf,'UserData',handles); xsynthexpofn 'loadsound'% --------------------------------------------------------------------function write_soundfile_Callback(hObject, eventdata, handles) xsynthexpofn 'write_soundfile'% --- Executes on button press in dB.function dB_Callback(hObject, eventdata, handles) xsynthexpofn 'db'% --- Executes during object creation, after setting all properties.function fftsize_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on selection change in fftsize.function fftsize_Callback(hObject, eventdata, handles) xsynthexpofn 'fftsize'% --- Executes on button press in zoomout.function zoomout_Callback(hObject, eventdata, handles)% --- Executes on button press in zoomout.function crosssynthesis_Callback(hObject, eventdata, handles)% --- Executes on button press in zoomout.function File_Callback(hObject, eventdata, handles)% --- Executes during object creation, after setting all properties.function window_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on selection change in window.function window_Callback(hObject, eventdata, handles) xsynthexpofn 'window'% --- Executes during object creation, after setting all properties.function colormap_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on selection change in colormap.function colormap_Callback(hObject, eventdata, handles) xsynthexpofn 'colormap'% --- Executes on button press in inverse.function inverse_Callback(hObject, eventdata, handles) xsynthexpofn 'inverse'% --- Executes on button press in interpolate.function interpolate_Callback(hObject, eventdata, handles) xsynthexpofn 'interpolate'% --- Executes on button press in s1_play.function s1_play_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.signum = 1; set(gcf,'UserData',handles); xsynthexpofn 'play'% --- Executes on button press in s2_play.function s2_play_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.signum = 2; set(gcf,'UserData',handles); xsynthexpofn 'play'% --- Executes on button press in s3_play.function s3_play_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.signum = 3; set(gcf,'UserData',handles); xsynthexpofn 'play'% --------------------------------------------------------------------function openworkspace_Callback(hObject, eventdata, handles) xsynthexpofn 'loadworkspace'% --------------------------------------------------------------------function saveworkspace_Callback(hObject, eventdata, handles) xsynthexpofn 'saveworkspace'function convolution_Callback(hObject, eventdata, handles) xsynthexpofn 'convolution'function amplitudenvelope_Callback(hObject, eventdata, handles) xsynthexpofn 'ampenv'function lpc_Callback(hObject, eventdata, handles) xsynthexpofn 'lpc'% --- Executes during object creation, after setting all properties.function text1_CreateFcn(hObject, eventdata, handles)% hObject handle to text1 (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'));endfunction text1_Callback(hObject, eventdata, handles)% hObject handle to text1 (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 text1 as text% str2double(get(hObject,'String')) returns contents of text1 as a double% --- Executes during object creation, after setting all properties.function text2_CreateFcn(hObject, eventdata, handles)% hObject handle to text2 (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'));endfunction text2_Callback(hObject, eventdata, handles)% hObject handle to text2 (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 text2 as text% str2double(get(hObject,'String')) returns contents of text2 as a double% --- Executes during object creation, after setting all properties.function text3_CreateFcn(hObject, eventdata, handles)% hObject handle to text3 (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'));endfunction text3_Callback(hObject, eventdata, handles)% hObject handle to text3 (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 text3 as text% str2double(get(hObject,'String')) returns contents of text3 as a double% --- Executes during object creation, after setting all properties.function freqzoom_CreateFcn(hObject, eventdata, handles)% hObject handle to freqzoom (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 freqzoom_Callback(hObject, eventdata, handles)% hObject handle to freqzoom (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 xsynthexpofn 'freqzoom';% --------------------------------------------------------------------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) xsynthexpofn 'help';% --------------------------------------------------------------------function print_Callback(hObject, eventdata, handles)% hObject handle to print (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) xsynthexpofn 'print';% --------------------------------------------------------------------function close_Callback(hObject, eventdata, handles)% hObject handle to close (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) xsynthexpofn 'close';% --- Executes on button press in load_signal_1.function load1_Callback(hObject, eventdata, handles)% hObject handle to load_signal_1 (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 load_signal_2.function load2_Callback(hObject, eventdata, handles)% hObject handle to load_signal_2 (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 zoomreset.function zoomreset_Callback(hObject, eventdata, handles)% hObject handle to zoomreset (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) xsynthexpofn 'zoomreset';% --- Creates and returns a handle to the GUI figure. function h1 = xsynthexpogui_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;endh1 = 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','Cross Synthesis Explorer',...'NumberTitle','off',...'PaperPosition',[0.25 2.5 15 6],...'Position',[103.8 15.2115384615385 212.6 55],...'Renderer',get(0,'defaultfigureRenderer'),...'RendererMode','manual',...'HandleVisibility','callback',...'Tag','xsynthexpo_fig',...'UserData',[]);setappdata(h1, 'GUIDEOptions',struct(...'active_h', [], ...'taginfo', struct(...'figure', 2, ...'axes', 7, ...'text', 13, ...'checkbox', 4, ...'pushbutton', 10, ...'popupmenu', 5, ...'frame', 2, ...'edit', 5, ...'slider', 2), ...'override', 1, ...'release', 13, ...'resize', 'simple', ...'accessibility', 'callback', ...'mfile', 1, ...'callbacks', 1, ...'singleton', 1, ...'syscolorfig', 1, ...'lastSavedFile', '/Users/bobsturm/gibson/SSUM.PC/xsynthesis/xsynthexpo.m', ...'blocking', 0));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.6 30.7692307692308 65 20.6923076923077],...'XColor',get(0,'defaultaxesXColor'),...'YColor',get(0,'defaultaxesYColor'),...'ZColor',get(0,'defaultaxesZColor'),...'Tag','sig_1_spec');h3 = get(h2,'title');set(h3,...'Parent',h2,...'Color',[0 0 0],...'HorizontalAlignment','center',...'Position',[0.498397435897436 1.026 1.00005459937205],...'VerticalAlignment','bottom',...'HandleVisibility','off');h4 = get(h2,'xlabel');set(h4,...'Parent',h2,...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -