gusucode.com > 声音的处理有:LPC,FFT,共振峰,频谱源码程序 > siganlandsystemusingMatlab/SSUM/stocho/stocho.m

    function varargout = stocho(varargin)
% STOCHO M-file for stocho.fig
%      STOCHO, by itself, creates a new STOCHO or raises the existing
%      singleton*.
%
%      H = STOCHO returns the handle to a new STOCHO or the handle to
%      the existing singleton*.
%
%      STOCHO('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in STOCHO.M with the given input arguments.
%
%      STOCHO('Property','Value',...) creates a new STOCHO or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before stocho_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to stocho_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 stocho

% Last Modified by GUIDE v2.5 24-Mar-2004 15:20:07

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @stocho_OpeningFcn, ...
                   'gui_OutputFcn',  @stocho_OutputFcn, ...
                   'gui_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 stocho is made visible.
function stocho_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 = stocho_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'));
end


function 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'));
end


function 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'));
end



function 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'));
end



function 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'));
end



function 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'));
end



function 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)
% 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 s1_plotfreq.
function s1_plotfreq_Callback(hObject, eventdata, handles)
% hObject    handle to s1_plotfreq (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 s1_overlap_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s1_overlap (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 s1_overlap_Callback(hObject, eventdata, handles)
% hObject    handle to s1_overlap (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_overlap as text
%        str2double(get(hObject,'String')) returns contents of s1_overlap as a double



% --- Executes on button press in write.
function write_Callback(hObject, eventdata, handles)
% hObject    handle to write (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 s1_random.
function s1_random_Callback(hObject, eventdata, handles)
% hObject    handle to s1_random (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 channels.
function channels_Callback(hObject, eventdata, handles)
% hObject    handle to channels (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 channels


% --- Executes during object creation, after setting all properties.
function s1_dist_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s1_dist (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_dist.
function s1_dist_Callback(hObject, eventdata, handles)
% hObject    handle to s1_dist (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_dist contents as cell array
%        contents{get(hObject,'Value')} returns selected item from s1_dist


% --- Executes during object creation, after setting all properties.
function s1_npartials_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s1_npartials (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 s1_npartials_Callback(hObject, eventdata, handles)
% hObject    handle to s1_npartials (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_npartials as text
%        str2double(get(hObject,'String')) returns contents of s1_npartials as a double



% --- Executes during object creation, after setting all properties.
function s1_start_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s1_start (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 s1_start_Callback(hObject, eventdata, handles)
% hObject    handle to s1_start (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_start as text
%        str2double(get(hObject,'String')) returns contents of s1_start as a double


% --- Executes on button press in savesettings.
function savesettings_Callback(hObject, eventdata, handles)
% hObject    handle to savesettings (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 s2_numnotes_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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'));
end



function s2_numnotes_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_numnotes as text
%        str2double(get(hObject,'String')) returns contents of s2_numnotes as a double


% --- Executes during object creation, after setting all properties.
function s2_npartials_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_npartials (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 s2_npartials_Callback(hObject, eventdata, handles)
% hObject    handle to s2_npartials (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 s2_npartials as text
%        str2double(get(hObject,'String')) returns contents of s2_npartials as a double


% --- Executes during object creation, after setting all properties.
function s2_durs_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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'));
end



function s2_durs_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_durs as text
%        str2double(get(hObject,'String')) returns contents of s2_durs as a double


% --- Executes during object creation, after setting all properties.
function s2_amps_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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'));
end



function s2_amps_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_amps as text
%        str2double(get(hObject,'String')) returns contents of s2_amps as a double


% --- Executes during object creation, after setting all properties.
function s2_freqs_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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'));
end



function s2_freqs_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_freqs as text
%        str2double(get(hObject,'String')) returns contents of s2_freqs as a double


% --- Executes during object creation, after setting all properties.
function s2_fskews_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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'));
end



function s2_fskews_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_fskews as text
%        str2double(get(hObject,'String')) returns contents of s2_fskews as a double


% --- Executes during object creation, after setting all properties.
function s2_ampenv_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_ampenv.
function s2_ampenv_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_ampenv contents as cell array
%        contents{get(hObject,'Value')} returns selected item from s2_ampenv


% --- Executes during object creation, after setting all properties.
function s2_freqenv_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_freqenv.
function s2_freqenv_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_freqenv contents as cell array
%        contents{get(hObject,'Value')} returns selected item from s2_freqenv



% --- Executes during object creation, after setting all properties.
function s2_overlap_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_overlap (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 s2_overlap_Callback(hObject, eventdata, handles)
% hObject    handle to s2_overlap (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 s2_overlap as text
%        str2double(get(hObject,'String')) returns contents of s2_overlap as a double

% --- Executes during object creation, after setting all properties.
function s2_partials_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_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'));
end



function s2_partials_Callback(hObject, eventdata, handles)
% hObject    handle to s2_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 s2_partials as text
%        str2double(get(hObject,'String')) returns contents of s2_partials as a double


% --- Executes during object creation, after setting all properties.
function s2_start_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_start (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 s2_start_Callback(hObject, eventdata, handles)
% hObject    handle to s2_start (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 s2_start as text
%        str2double(get(hObject,'String')) returns contents of s2_start as a double



% --- Executes during object creation, after setting all properties.
function s3_numnotes_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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'));
end



function s3_numnotes_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_numnotes as text
%        str2double(get(hObject,'String')) returns contents of s3_numnotes as a double


% --- Executes during object creation, after setting all properties.
function s3_npartials_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_npartials (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 s3_npartials_Callback(hObject, eventdata, handles)
% hObject    handle to s3_npartials (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 s3_npartials as text
%        str2double(get(hObject,'String')) returns contents of s3_npartials as a double


% --- Executes during object creation, after setting all properties.
function s3_durs_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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'));
end



function s3_durs_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_durs as text
%        str2double(get(hObject,'String')) returns contents of s3_durs as a double


% --- Executes during object creation, after setting all properties.
function s3_amps_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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'));
end



function s3_amps_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_amps as text
%        str2double(get(hObject,'String')) returns contents of s3_amps as a double


% --- Executes during object creation, after setting all properties.
function s3_freqs_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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'));
end



function s3_freqs_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_freqs as text
%        str2double(get(hObject,'String')) returns contents of s3_freqs as a double


% --- Executes during object creation, after setting all properties.
function s3_fskews_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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'));
end



function s3_fskews_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_fskews as text
%        str2double(get(hObject,'String')) returns contents of s3_fskews as a double


% --- Executes during object creation, after setting all properties.
function s3_ampenv_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_ampenv.
function s3_ampenv_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_ampenv contents as cell array
%        contents{get(hObject,'Value')} returns selected item from s3_ampenv


% --- Executes during object creation, after setting all properties.
function s3_freqenv_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_freqenv.
function s3_freqenv_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_freqenv contents as cell array
%        contents{get(hObject,'Value')} returns selected item from s3_freqenv




% --- Executes during object creation, after setting all properties.
function s3_overlap_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_overlap (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 s3_overlap_Callback(hObject, eventdata, handles)
% hObject    handle to s3_overlap (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 s3_overlap as text
%        str2double(get(hObject,'String')) returns contents of s3_overlap as a double






% --- Executes during object creation, after setting all properties.
function s3_partials_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_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'));
end



function s3_partials_Callback(hObject, eventdata, handles)
% hObject    handle to s3_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 s3_partials as text
%        str2double(get(hObject,'String')) returns contents of s3_partials as a double


% --- Executes during object creation, after setting all properties.
function s3_start_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_start (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 s3_start_Callback(hObject, eventdata, handles)
% hObject    handle to s3_start (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 s3_start as text
%        str2double(get(hObject,'String')) returns contents of s3_start as a double




% --- Executes on button press in load.
function load_Callback(hObject, eventdata, handles)
% hObject    handle to load (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function File_Callback(hObject, eventdata, handles)
% hObject    handle to File (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 s1_mix.
function s1_mix_Callback(hObject, eventdata, handles)
% hObject    handle to s1_mix (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 s1_mix


% --- Executes on button press in s2_mix.
function s2_mix_Callback(hObject, eventdata, handles)
% hObject    handle to s2_mix (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 s2_mix


% --- Executes on button press in s3_mix.
function s3_mix_Callback(hObject, eventdata, handles)
% hObject    handle to s3_mix (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 s3_mix


% --- Executes during object creation, after setting all properties.
function s1_vol_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s1_vol (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 during object creation, after setting all properties.
function s2_volslider_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_volslider (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 during object creation, after setting all properties.
function s3_volslider_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_volslider (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 during object creation, after setting all properties.
function s2_vol_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_vol (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



% --- Executes during object creation, after setting all properties.
function s3_vol_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_vol (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





% --- Executes during object creation, after setting all properties.
function s1_volslider_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s1_volslider (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 during object creation, after setting all properties.
%function s1_vol2_CreateFcn(hObject, eventdata, handles)
%% hObject    handle to s1_vol (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 s1_vol2_Callback(hObject, eventdata, handles)
%% hObject    handle to s1_vol (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_vol as text
%%        str2double(get(hObject,'String')) returns contents of s1_vol as a double


% --- Executes during object creation, after setting all properties.
function s2_dist_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s2_dist (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 s2_dist.
function s2_dist_Callback(hObject, eventdata, handles)
% hObject    handle to s2_dist (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 s2_dist contents as cell array
%        contents{get(hObject,'Value')} returns selected item from s2_dist


% --- Executes during object creation, after setting all properties.
function s3_dist_CreateFcn(hObject, eventdata, handles)
% hObject    handle to s3_dist (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 s3_dist.
function s3_dist_Callback(hObject, eventdata, handles)
% hObject    handle to s3_dist (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 s3_dist contents as cell array
%        contents{get(hObject,'Value')} returns selected item from s3_dist


% --- Executes on button press in s3_random.
function s3_random_Callback(hObject, eventdata, handles)
% hObject    handle to s3_random (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 s2_random.
function s2_random_Callback(hObject, eventdata, handles)
% hObject    handle to s2_random (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
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)
    stochofn 'close';

% --------------------------------------------------------------------
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)
    stochofn 'help'