📄 sndanalsynth.m
字号:
function varargout = sndanalsynth(varargin)% SNDANALSYNTH M-file for sndanalsynth.fig% SNDANALSYNTH, by itself, creates a new SNDANALSYNTH or raises the existing% singleton*.%% H = SNDANALSYNTH returns the handle to a new SNDANALSYNTH or the handle to% the existing singleton*.%% SNDANALSYNTH('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in SNDANALSYNTH.M with the given input arguments.%% SNDANALSYNTH('Property','Value',...) creates a new SNDANALSYNTH or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before sndanalsynth_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to sndanalsynth_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 sndanalsynth% Last Modified by GUIDE v2.5 08-Apr-2004 13:56:45% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @sndanalsynth_OpeningFcn, ... 'gui_OutputFcn', @sndanalsynth_OutputFcn, ... 'gui_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 sndanalsynth is made visible.function sndanalsynth_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 sndanalsynth (see VARARGIN)% Choose default command line output for sndanalsynth handles.output = hObject; guidata(hObject, handles); set(gcf,'UserData',handles); sndanalsynthfn;% This sets up the initial plot - only do when we are invisible% so window can get raised using sndanalsynth.if (nargin > 3) datastruct = varargin{1}; sndanalsynthfn('readinput',datastruct);end% --- Outputs from this function are returned to the command line.function varargout = sndanalsynth_OutputFcn(hObject, eventdata, handles) varargout{1} = handles.output;% --------------------------------------------------------------------function FileMenu_Callback(hObject, eventdata, handles)% --------------------------------------------------------------------function OpenMenuItem_Callback(hObject, eventdata, handles) sndanalsynthfn 'loadsound';% --------------------------------------------------------------------function PrintMenuItem_Callback(hObject, eventdata, handles) sndanalsynthfn 'print';% --------------------------------------------------------------------function CloseMenuItem_Callback(hObject, eventdata, handles) sndanalsynthfn 'close';% --- Executes on button press in play2.function play2_Callback(hObject, eventdata, handles) sndanalsynthfn 'playsound2';% --- Executes on button press in print.function print_Callback(hObject, eventdata, handles) sndanalsynthfn 'print';% --- Executes during object creation, after setting all properties.function synwindowsize_CreateFcn(hObject, eventdata, handles)% hObject handle to synwindowsize (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 synwindowsize.function synwindowsize_Callback(hObject, eventdata, handles)% hObject handle to synwindowsize (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 synwindowsize contents as cell array% contents{get(hObject,'Value')} returns selected item from synwindowsize% --- Executes during object creation, after setting all properties.function synwindowshape_CreateFcn(hObject, eventdata, handles)% hObject handle to synwindowshape (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 synwindowshape.function synwindowshape_Callback(hObject, eventdata, handles)% hObject handle to synwindowshape (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 synwindowshape contents as cell array% contents{get(hObject,'Value')} returns selected item from synwindowshape% --- Executes on button press in play1.function play1_Callback(hObject, eventdata, handles) sndanalsynthfn 'playsound1';% --- Executes on button press in synthesize.function synthesize_Callback(hObject, eventdata, handles) sndanalsynthfn 'synthesize';% --------------------------------------------------------------------function Untitled_1_Callback(hObject, eventdata, handles)% hObject handle to Untitled_1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% --------------------------------------------------------------------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 sendorigfourier_Callback(hObject, eventdata, handles)% hObject handle to sendorigfourier (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) sndanalsynthfn 'orig_fourier'; % --------------------------------------------------------------------function sendorigsonogram_Callback(hObject, eventdata, handles)% hObject handle to sendorigsonogram (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) sndanalsynthfn 'orig_sonogram';% --------------------------------------------------------------------function Untitled_5_Callback(hObject, eventdata, handles)% hObject handle to Untitled_5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% --------------------------------------------------------------------function Untitled_6_Callback(hObject, eventdata, handles)% hObject handle to Untitled_6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% --------------------------------------------------------------------function sendsynthfourier_Callback(hObject, eventdata, handles)% hObject handle to sendsynthfourier (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) sndanalsynthfn 'synth_fourier';% --------------------------------------------------------------------function sendsynthsonogram_Callback(hObject, eventdata, handles)% hObject handle to sendsynthsonogram (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) sndanalsynthfn 'synth_sonogram';% --- Executes during object creation, after setting all properties.function phasemenu_CreateFcn(hObject, eventdata, handles)% hObject handle to phasemenu (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'));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -