⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stochogui.m

📁 非常好的数字处理教程
💻 M
📖 第 1 页 / 共 5 页
字号:
function varargout = stochogui(varargin)% STOCHOGUI M-file for stochogui.fig%      STOCHOGUI, by itself, creates a new STOCHOGUI or raises the existing%      singleton*.%%      H = STOCHOGUI returns the handle to a new STOCHOGUI or the handle to%      the existing singleton*.%%      STOCHOGUI('CALLBACK',hObject,eventData,handles,...) calls the local%      function named CALLBACK in STOCHOGUI.M with the given input arguments.%%      STOCHOGUI('Property','Value',...) creates a new STOCHOGUI or raises the%      existing singleton*.  Starting from the left, property value pairs are%      applied to the GUI before stochogui_OpeningFunction gets called.  An%      unrecognized property name or invalid value makes property application%      stop.  All inputs are passed to stochogui_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 stochogui% Last Modified by GUIDE v2.5 24-Mar-2004 15:22:09% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @stochogui_OpeningFcn, ...                   'gui_OutputFcn',  @stochogui_OutputFcn, ...                   'gui_LayoutFcn',  @stochogui_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 stochogui is made visible.function stochogui_OpeningFcn(hObject, eventdata, handles, varargin)	handles.output = hObject;	guidata(hObject, handles);	set(gcf,'UserData',handles);	stochofn;% --- Outputs from this function are returned to the command line.function varargout = stochogui_OutputFcn(hObject, eventdata, handles)	varargout{1} = handles.output;% --------------------------------------------------------------------function s1_compose_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 1;	set(gcf,'UserData',handles);	stochofn 'compose'function s2_compose_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 2;	set(gcf,'UserData',handles);	stochofn 'compose'function s3_compose_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 3;	set(gcf,'UserData',handles);	stochofn 'compose'% --------------------------------------------------------------------function s0_plot_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 0;	set(gcf,'UserData',handles);	stochofn 'plot'function s1_plot_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 1;	set(gcf,'UserData',handles);	stochofn 'plot'function s2_plot_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 2;	set(gcf,'UserData',handles);	stochofn 'plot'function s3_plot_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 3;	set(gcf,'UserData',handles);	stochofn 'plot'% --------------------------------------------------------------------function s0_play_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 0;	set(gcf,'UserData',handles);	stochofn 'play'function s1_play_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 1;	set(gcf,'UserData',handles);	stochofn 'play'function s2_play_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 2;	set(gcf,'UserData',handles);	stochofn 'play'function s3_play_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 3;	set(gcf,'UserData',handles);	stochofn 'play'% --------------------------------------------------------------------function s1_vol_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 1;	set(gcf,'UserData',handles);	stochofn 'vol_edit'function s2_vol_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 2;	set(gcf,'UserData',handles);	stochofn 'vol_edit'function s3_vol_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 3;	set(gcf,'UserData',handles);	stochofn 'vol_edit'% --------------------------------------------------------------------function s1_volslider_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 1;	set(gcf,'UserData',handles);	stochofn 'vol_slider'function s2_volslider_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 2;	set(gcf,'UserData',handles);	stochofn 'vol_slider'function s3_volslider_Callback(hObject, eventdata, handles)	handles = get(gcf,'UserData');	handles.section = 3;	set(gcf,'UserData',handles);	stochofn 'vol_slider'% --------------------------------------------------------------------function load_settings_Callback(hObject, eventdata, handles)	stochofn 'load_settings'function save_settings_Callback(hObject, eventdata, handles)	stochofn 'save_settings'function write_soundfile_Callback(hObject, eventdata, handles)	stochofn 'write_soundfile'% --------------------------------------------------------------------% --------------------------------------------------------------------% --------------------------------------------------------------------% --- Executes during object creation, after setting all properties.function s1_numnotes_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_numnotes (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 s1_numnotes_Callback(hObject, eventdata, handles)% hObject    handle to s1_numnotes (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 s1_numnotes as text%        str2double(get(hObject,'String')) returns contents of s1_numnotes as a double% --- Executes during object creation, after setting all properties.function s1_partials_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_partials (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 s1_partials_Callback(hObject, eventdata, handles)% hObject    handle to s1_partials (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 s1_partials as text%        str2double(get(hObject,'String')) returns contents of s1_partials as a double% --- Executes during object creation, after setting all properties.function s1_durs_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_durs (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 s1_durs_Callback(hObject, eventdata, handles)% hObject    handle to s1_durs (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 s1_durs as text%        str2double(get(hObject,'String')) returns contents of s1_durs as a double% --- Executes during object creation, after setting all properties.function s1_amps_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_amps (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 s1_amps_Callback(hObject, eventdata, handles)% hObject    handle to s1_amps (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 s1_amps as text%        str2double(get(hObject,'String')) returns contents of s1_amps as a double% --- Executes during object creation, after setting all properties.function s1_freqs_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_freqs (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 s1_freqs_Callback(hObject, eventdata, handles)% hObject    handle to s1_freqs (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 s1_freqs as text%        str2double(get(hObject,'String')) returns contents of s1_freqs as a double% --- Executes during object creation, after setting all properties.function s1_fskews_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_fskews (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 s1_fskews_Callback(hObject, eventdata, handles)% hObject    handle to s1_fskews (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 s1_fskews as text%        str2double(get(hObject,'String')) returns contents of s1_fskews as a double% --- Executes during object creation, after setting all properties.function s1_ampenv_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_ampenv (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 s1_ampenv.function s1_ampenv_Callback(hObject, eventdata, handles)% hObject    handle to s1_ampenv (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 s1_ampenv contents as cell array%        contents{get(hObject,'Value')} returns selected item from s1_ampenv% --- Executes during object creation, after setting all properties.function s1_freqenv_CreateFcn(hObject, eventdata, handles)% hObject    handle to s1_freqenv (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 s1_freqenv.function s1_freqenv_Callback(hObject, eventdata, handles)% hObject    handle to s1_freqenv (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 s1_freqenv contents as cell array%        contents{get(hObject,'Value')} returns selected item from s1_freqenv% --- Executes on button press in s1_plotamp.function s1_plotamp_Callback(hObject, eventdata, handles)% hObject    handle to s1_plotamp (see GCBO)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -