Dawn@4: function varargout = vs_Settings(varargin) Dawn@4: % VS_SETTINGS M-file for vs_Settings.fig Dawn@4: % VS_SETTINGS, by itself, creates a new VS_SETTINGS or raises the existing Dawn@4: % singleton*. Dawn@4: % Dawn@4: % H = VS_SETTINGS returns the handle to a new VS_SETTINGS or the handle to Dawn@4: % the existing singleton*. Dawn@4: % Dawn@4: % VS_SETTINGS('CALLBACK',hObject,eventData,handles,...) calls the local Dawn@4: % function named CALLBACK in VS_SETTINGS.M with the given input arguments. Dawn@4: % Dawn@4: % VS_SETTINGS('Property','Value',...) creates a new VS_SETTINGS or raises the Dawn@4: % existing singleton*. Starting from the left, property value pairs are Dawn@4: % applied to the GUI before vs_Settings_OpeningFcn gets called. An Dawn@4: % unrecognized property name or invalid value makes property application Dawn@4: % stop. All inputs are passed to vs_Settings_OpeningFcn via varargin. Dawn@4: % Dawn@4: % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one Dawn@4: % instance to run (singleton)". Dawn@4: % Dawn@4: % See also: GUIDE, GUIDATA, GUIHANDLES Dawn@4: Dawn@4: % Edit the above text to modify the response to help vs_Settings Dawn@4: Dawn@4: % Last Modified by GUIDE v2.5 09-Mar-2011 22:29:50 Dawn@4: Dawn@4: % Begin initialization code - DO NOT EDIT Dawn@4: gui_Singleton = 1; Dawn@4: gui_State = struct('gui_Name', mfilename, ... Dawn@4: 'gui_Singleton', gui_Singleton, ... Dawn@4: 'gui_OpeningFcn', @vs_Settings_OpeningFcn, ... Dawn@4: 'gui_OutputFcn', @vs_Settings_OutputFcn, ... Dawn@4: 'gui_LayoutFcn', [] , ... Dawn@4: 'gui_Callback', []); Dawn@4: if nargin && ischar(varargin{1}) Dawn@4: gui_State.gui_Callback = str2func(varargin{1}); Dawn@4: end Dawn@4: Dawn@4: if nargout Dawn@4: [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); Dawn@4: else Dawn@4: gui_mainfcn(gui_State, varargin{:}); Dawn@4: end Dawn@4: % End initialization code - DO NOT EDIT Dawn@4: Dawn@4: Dawn@4: % --- Executes just before vs_Settings is made visible. Dawn@4: function vs_Settings_OpeningFcn(hObject, eventdata, handles, varargin) Dawn@4: % This function has no output args, see OutputFcn. Dawn@4: % hObject handle to figure Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: % varargin command line arguments to vs_Settings (see VARARGIN) Dawn@4: Dawn@4: % Choose default command line output for vs_Settings Dawn@4: handles.output = hObject; Dawn@4: Dawn@4: % YS: get the settings from the main figure Dawn@4: if (~isfield(handles, 'VSHandle')) Dawn@4: VSHandle = VoiceSauce; Dawn@4: handles.VSHandle = VSHandle; Dawn@4: end Dawn@4: Dawn@4: % restore the variables from initialization Dawn@4: setGUIVariables(handles); Dawn@4: Dawn@4: Dawn@4: % Dawn@4: set(handles.uipanel_Formants,'SelectionChangeFcn',@formants_buttongroup_SelectionChangeFcn); Dawn@4: set(handles.uipanel_F0,'SelectionChangeFcn',@F0_buttongroup_SelectionChangeFcn); Dawn@4: Dawn@4: % Update handles structure Dawn@4: guidata(hObject, handles); Dawn@4: Dawn@4: % UIWAIT makes vs_Settings wait for user response (see UIRESUME) Dawn@4: % uiwait(handles.figure1); Dawn@4: Dawn@4: Dawn@4: % --- Outputs from this function are returned to the command line. Dawn@4: function varargout = vs_Settings_OutputFcn(hObject, eventdata, handles) Dawn@4: % varargout cell array for returning output args (see VARARGOUT); Dawn@4: % hObject handle to figure Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Get default command line output from handles structure Dawn@4: varargout{1} = handles.output; Dawn@4: Dawn@4: Dawn@4: Dawn@4: % aligns the variables with those in VS.vars Dawn@4: function setGUIVariables(handles) Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: Dawn@4: %F0 Dawn@4: switch(vars.F0algorithm) Dawn@4: case {'F0 (Straight)'} Dawn@4: set(handles.radiobutton_F0_Straight, 'Value', 1); Dawn@4: case {'F0 (Snack)'} Dawn@4: set(handles.radiobutton_F0_Snack, 'Value', 1); Dawn@4: case {'F0 (Praat)'} Dawn@4: set(handles.radiobutton_F0_Praat, 'Value', 1); Dawn@4: case {'F0 (Other)'} Dawn@4: set(handles.radiobutton_F0_Other, 'Value', 1); Dawn@4: end Dawn@4: Dawn@4: set(handles.edit_F0_Straight_maxF0, 'String', num2str(vars.maxstrF0)); Dawn@4: set(handles.edit_F0_Straight_minF0, 'String', num2str(vars.minstrF0)); Dawn@4: set(handles.edit_F0_Straight_maxduration, 'String', num2str(vars.maxstrdur)); Dawn@4: Dawn@4: set(handles.edit_F0_Snack_maxF0, 'String', num2str(vars.maxF0)); Dawn@4: set(handles.edit_F0_Snack_minF0, 'String', num2str(vars.minF0)); Dawn@4: Dawn@4: set(handles.checkbox_F0_Other_Enable, 'Value', vars.F0OtherEnable); Dawn@4: set(handles.edit_F0_Other_Command, 'String', vars.F0OtherCommand); Dawn@4: set(handles.edit_F0_Other_Offset, 'String', num2str(vars.F0OtherOffset)); Dawn@4: if (vars.F0OtherEnable == 1) Dawn@4: set(handles.edit_F0_Other_Command, 'Enable', 'On'); Dawn@4: set(handles.edit_F0_Other_Offset, 'Enable', 'On'); Dawn@4: set(handles.radiobutton_F0_Other, 'Enable', 'On'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % Formants Dawn@4: switch(vars.FMTalgorithm) Dawn@4: case {'F1, F2, F3, F4 (Snack)'} Dawn@4: set(handles.radiobutton_Formants_Snack, 'Value', 1); Dawn@4: case {'F1, F2, F3, F4 (Praat)'} Dawn@4: set(handles.radiobutton_Formants_Praat, 'Value', 1); Dawn@4: case {'F1, F2, F3, F4 (Other)'} Dawn@4: set(handles.radiobutton_Formants_Other, 'Value', 1); Dawn@4: end Dawn@4: Dawn@4: set(handles.edit_Formants_Snack_preemphasis, 'String', num2str(vars.preemphasis)); Dawn@4: set(handles.checkbox_Formants_Other_Enable, 'Value', vars.FormantsOtherEnable); Dawn@4: set(handles.edit_Formants_Other_Command, 'String', vars.FormantsOtherCommand); Dawn@4: set(handles.edit_Formants_Other_Offset, 'String', num2str(vars.FormantsOtherOffset)); Dawn@4: Dawn@4: if (vars.FormantsOtherEnable) Dawn@4: set(handles.edit_Formants_Other_Command, 'Enable', 'On'); Dawn@4: set(handles.edit_Formants_Other_Offset, 'Enable', 'On'); Dawn@4: set(handles.radiobutton_Formants_Other, 'Enable', 'On'); Dawn@4: end Dawn@4: Dawn@4: % SHR Dawn@4: set(handles.edit_SHR_max_F0, 'String', num2str(vars.SHRmax)); Dawn@4: set(handles.edit_SHR_min_F0, 'String', num2str(vars.SHRmin)); Dawn@4: set(handles.edit_SHR_threshold, 'String', num2str(vars.SHRThreshold)); Dawn@4: Dawn@4: % Common Dawn@4: set(handles.edit_Common_windowsize, 'String', num2str(vars.windowsize)); Dawn@4: set(handles.edit_Common_frameshift, 'String', num2str(vars.frameshift)); Dawn@4: set(handles.edit_Common_NaN, 'String', vars.NotANumber); Dawn@4: set(handles.checkbox_Common_linkmatdir, 'Value', vars.linkmatdir); Dawn@4: set(handles.checkbox_Common_linkwavdir, 'Value', vars.linkwavdir); Dawn@4: set(handles.checkbox_Common_recursedir, 'Value', vars.recursedir); Dawn@4: set(handles.edit_Common_Nperiods, 'String', num2str(vars.Nperiods)); Dawn@4: set(handles.edit_Common_Nperiods_EC, 'String', num2str(vars.Nperiods_EC)); Dawn@4: Dawn@4: % Textgrid Dawn@4: set(handles.edit_Textgrid_ignorelist, 'String', vars.TextgridIgnoreList); Dawn@4: set(handles.edit_Textgrid_tiernumber, 'String', num2str(vars.TextgridTierNumber)); Dawn@4: Dawn@4: % EGG Dawn@4: set(handles.edit_EGGData_headers, 'String', vars.EGGheaders); Dawn@4: set(handles.edit_EGGData_timelabel, 'String' ,vars.EGGtimelabel); Dawn@4: Dawn@4: % Outputs Dawn@4: set(handles.edit_Outputs_smoothwinsize, 'String', num2str(vars.O_smoothwinsize)); Dawn@4: Dawn@4: % Input (wav) files Dawn@4: set(handles.edit_Input_searchstring, 'String', vars.I_searchstring); Dawn@4: Dawn@4: Dawn@4: function edit_Common_windowsize_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_windowsize (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Common_windowsize as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Common_windowsize as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: if (isnan(num)) Dawn@4: set(hObject, 'String', num2str(vars.windowsize)); Dawn@4: else Dawn@4: num = round(num); Dawn@4: if (num > 0) Dawn@4: VSData.vars.windowsize = num; Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: else Dawn@4: set(hObject, 'String', num2str(num)); Dawn@4: end Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Common_windowsize_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_windowsize (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Common_frameshift_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_frameshift (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Common_frameshift as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Common_frameshift as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: if (isnan(num)) Dawn@4: set(hObject, 'String', num2str(vars.frameshift)); Dawn@4: else Dawn@4: num = round(num); Dawn@4: if (num > 0) Dawn@4: VSData.vars.frameshift = num(1); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: else Dawn@4: set(hObject, 'String', num2str(vars.frameshift)); Dawn@4: end Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Common_frameshift_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_frameshift (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Formants_Snack_preemphasis_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Formants_Snack_preemphasis (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Formants_Snack_preemphasis as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Formants_Snack_preemphasis as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.preemphasis)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.preemphasis = num; Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Formants_Snack_preemphasis_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Formants_Snack_preemphasis (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_F0_Straight_maxF0_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Straight_maxF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_F0_Straight_maxF0 as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_maxF0 as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.maxstrF0)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.maxstrF0 = num; Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_F0_Straight_maxF0_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Straight_maxF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_F0_Straight_minF0_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Straight_minF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_F0_Straight_minF0 as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_minF0 as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.minstrF0)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.minstrF0 = num; Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_F0_Straight_minF0_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Straight_minF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in radiobutton_F0_Straight. Dawn@4: function radiobutton_F0_Straight_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to radiobutton_F0_Straight (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Straight Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in radiobutton_F0_Snack. Dawn@4: function radiobutton_F0_Snack_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to radiobutton_F0_Snack (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Snack Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in radiobutton_F0_Other. Dawn@4: function radiobutton_F0_Other_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to radiobutton_F0_Other (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Other Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_F0_Straight_maxduration_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Straight_maxduration (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_F0_Straight_maxduration as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_maxduration as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.maxstrdur)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.maxstrdur = num; Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_F0_Straight_maxduration_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Straight_maxduration (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_F0_Snack_maxF0_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Snack_maxF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_F0_Snack_maxF0 as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_F0_Snack_maxF0 as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.maxF0)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.maxF0 = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_F0_Snack_maxF0_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Snack_maxF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_F0_Snack_minF0_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Snack_minF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_F0_Snack_minF0 as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_F0_Snack_minF0 as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.minF0)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.minF0 = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_F0_Snack_minF0_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Snack_minF0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in checkbox_F0_Other_Enable. Dawn@4: function checkbox_F0_Other_Enable_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to checkbox_F0_Other_Enable (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: Dawn@4: if (get(hObject, 'Value') == 1) Dawn@4: set(handles.edit_F0_Other_Command, 'Enable', 'on'); Dawn@4: set(handles.edit_F0_Other_Offset, 'Enable', 'on'); Dawn@4: set(handles.radiobutton_F0_Other, 'Enable', 'on'); Dawn@4: VSData.vars.F0OtherEnable = 1; Dawn@4: else Dawn@4: set(handles.edit_F0_Other_Command, 'Enable', 'off'); Dawn@4: set(handles.edit_F0_Other_Offset, 'Enable', 'off'); Dawn@4: set(handles.radiobutton_F0_Other, 'Enable', 'off'); Dawn@4: VSData.vars.F0OtherEnable = 0; Dawn@4: Dawn@4: if (get(handles.radiobutton_F0_Other, 'Value') == 1) % switch back to Straight Dawn@4: set(handles.radiobutton_F0_Straight, 'Value', 1); Dawn@4: VSData.vars.F0algorithm = 'F0 (Straight)'; Dawn@4: end Dawn@4: end Dawn@4: Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: function edit_F0_Other_Command_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Other_Command (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_F0_Other_Command as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_F0_Other_Command as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: VSData.vars.F0OtherCommand = get(hObject, 'String'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_F0_Other_Command_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Other_Command (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_F0_Other_Offset_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Other_Offset (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_F0_Other_Offset as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_F0_Other_Offset as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.F0OtherOffset)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.F0OtherOffset = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_F0_Other_Offset_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_F0_Other_Offset (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in radiobutton_Formants_Snack. Dawn@4: function radiobutton_Formants_Snack_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to radiobutton_Formants_Snack (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of radiobutton_Formants_Snack Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in radiobutton_Formants_Other. Dawn@4: function radiobutton_Formants_Other_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to radiobutton_Formants_Other (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of radiobutton_Formants_Other Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Formants_Other_Offset_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Formants_Other_Offset (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Formants_Other_Offset as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Formants_Other_Offset as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.FormantsOtherOffset)); Dawn@4: else Dawn@4: num = num(1); Dawn@4: VSData.vars.FormantsOtherOffset = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Formants_Other_Offset_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Formants_Other_Offset (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Formants_Other_Command_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Formants_Other_Command (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Formants_Other_Command as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Formants_Other_Command as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: VSData.vars.FormantsOtherCommand = get(hObject, 'String'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Formants_Other_Command_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Formants_Other_Command (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in checkbox_Formants_Other_Enable. Dawn@4: function checkbox_Formants_Other_Enable_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to checkbox_Formants_Other_Enable (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: Dawn@4: if (get(hObject, 'Value') == 1) Dawn@4: set(handles.edit_Formants_Other_Command, 'Enable', 'on'); Dawn@4: set(handles.edit_Formants_Other_Offset, 'Enable', 'on'); Dawn@4: set(handles.radiobutton_Formants_Other, 'Enable', 'on'); Dawn@4: VSData.vars.FormantsOtherEnable = 1; Dawn@4: else Dawn@4: set(handles.edit_Formants_Other_Command, 'Enable', 'off'); Dawn@4: set(handles.edit_Formants_Other_Offset, 'Enable', 'off'); Dawn@4: set(handles.radiobutton_Formants_Other, 'Enable', 'off'); Dawn@4: VSData.vars.FormantsOtherEnable = 0; Dawn@4: Dawn@4: if (get(handles.radiobutton_Formants_Other, 'Value') == 1) % set back to Snack Dawn@4: set(handles.radiobutton_Formants_Snack, 'Value', 1); Dawn@4: VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Snack)'; Dawn@4: end Dawn@4: end Dawn@4: Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: function edit_Textgrid_ignorelist_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Textgrid_ignorelist (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Textgrid_ignorelist as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Textgrid_ignorelist as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: Dawn@4: if (isempty(get(hObject, 'String'))) Dawn@4: set(hObject, 'String', '"", " ", "SIL"'); % this is the default, edit box cannot be empty Dawn@4: end Dawn@4: Dawn@4: VSData.vars.TextgridIgnoreList = get(hObject, 'String'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Textgrid_ignorelist_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Textgrid_ignorelist (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Textgrid_tiernumber_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Textgrid_tiernumber (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Textgrid_tiernumber as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Textgrid_tiernumber as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2num(get(hObject, 'String')); Dawn@4: if (isempty(num)) Dawn@4: set(hObject, 'String', num2str(vars.TextgridTierNumber)); Dawn@4: else Dawn@4: VSData.vars.TextgridTierNumber = unique(num); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(VSData.vars.TextgridTierNumber)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Textgrid_tiernumber_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Textgrid_tiernumber (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % YS: executes on the press of a radio button in formants panel Dawn@4: function formants_buttongroup_SelectionChangeFcn(hObject, eventdata) Dawn@4: handles = guidata(hObject); Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: Dawn@4: switch get(eventdata.NewValue, 'Tag') Dawn@4: case 'radiobutton_Formants_Snack' Dawn@4: VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Snack)'; Dawn@4: case 'radiobutton_Formants_Praat' Dawn@4: VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Praat)'; Dawn@4: case 'radiobutton_Formants_Other' Dawn@4: VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Other)'; Dawn@4: otherwise Dawn@4: end Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: Dawn@4: % YS: executes on the press of a radio button in F0 panel Dawn@4: function F0_buttongroup_SelectionChangeFcn(hObject, eventdata) Dawn@4: handles = guidata(hObject); Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: Dawn@4: switch get(eventdata.NewValue, 'Tag') Dawn@4: case 'radiobutton_F0_Straight' Dawn@4: VSData.vars.F0algorithm = 'F0 (Straight)'; Dawn@4: case 'radiobutton_F0_Snack' Dawn@4: VSData.vars.F0algorithm = 'F0 (Snack)'; Dawn@4: case 'radiobutton_F0_Praat' Dawn@4: VSData.vars.F0algorithm = 'F0 (Praat)'; Dawn@4: case 'radiobutton_F0_Other' Dawn@4: VSData.vars.F0algorithm = 'F0 (Other)'; Dawn@4: otherwise Dawn@4: end Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in pushbutton_Exit. Dawn@4: function pushbutton_Exit_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to pushbutton_Exit (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: delete(gcf); Dawn@4: Dawn@4: Dawn@4: % -------------------------------------------------------------------- Dawn@4: function menu_Settings_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to menu_Settings (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: Dawn@4: % -------------------------------------------------------------------- Dawn@4: function menu_Settings_Load_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to menu_Settings_Load (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: filename = uigetfile('*.mat', 'Select File to Load'); Dawn@4: Dawn@4: if (~ischar(filename)) Dawn@4: return; Dawn@4: end Dawn@4: Dawn@4: matdata = load(filename); Dawn@4: VSData.vars = matdata.settings; Dawn@4: Dawn@4: % set the machine specific variables Dawn@4: if (ispc) Dawn@4: VSData.vars.dirdelimiter = '\'; Dawn@4: else Dawn@4: VSData.vars.dirdelimiter = '/'; Dawn@4: end Dawn@4: Dawn@4: if (exist(VSData.vars.wavdir, 'dir') ~= 7) Dawn@4: VSData.vars.wavdir = ['.' vars.dirdelimiter]; Dawn@4: end Dawn@4: Dawn@4: if (exist(VSData.vars.matdir, 'dir') ~= 7) Dawn@4: VSData.vars.matdir = ['.' vars.dirdelimiter]; Dawn@4: end Dawn@4: Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: setGUIVariables(handles); Dawn@4: Dawn@4: Dawn@4: % -------------------------------------------------------------------- Dawn@4: function menu_Settings_Save_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to menu_Settings_Save (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: VSData.vars.PE_showwaveformst = 0; % this is a special case Dawn@4: settings = VSData.vars; Dawn@4: [filename, pathname] = uiputfile('*.mat', 'Select File to Save'); Dawn@4: Dawn@4: if (~ischar(filename)) Dawn@4: return; Dawn@4: end Dawn@4: Dawn@4: save([pathname filename], 'settings'); Dawn@4: Dawn@4: helpdlg('Save complete.', 'Save'); Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_EGGData_headers_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_EGGData_headers (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_EGGData_headers as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_EGGData_headers as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: Dawn@4: if (isempty(get(hObject, 'String'))) Dawn@4: set(hObject, 'String', VSData.vars.EGGheaders); % this is the default, edit box cannot be empty Dawn@4: end Dawn@4: Dawn@4: VSData.vars.EGGheaders = get(hObject, 'String'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_EGGData_headers_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_EGGData_headers (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_EGGData_timelabel_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_EGGData_timelabel (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_EGGData_timelabel as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_EGGData_timelabel as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: Dawn@4: if (isempty(get(hObject, 'String'))) Dawn@4: set(hObject, 'String', VSData.vars.EGGtimelabel); % this is the default, edit box cannot be empty Dawn@4: end Dawn@4: Dawn@4: VSData.vars.EGGtimelabel = get(hObject, 'String'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_EGGData_timelabel_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_EGGData_timelabel (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Common_NaN_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_NaN (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Common_NaN as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Common_NaN as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: VSData.vars.NotANumber = get(hObject, 'String'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Common_NaN_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_NaN (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in checkbox_Common_linkmatdir. Dawn@4: function checkbox_Common_linkmatdir_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to checkbox_Common_linkmatdir (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_linkmatdir Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: VSData.vars.linkmatdir = get(hObject, 'Value'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in checkbox_Common_linkwavdir. Dawn@4: function checkbox_Common_linkwavdir_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to checkbox_Common_linkwavdir (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_linkwavdir Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: VSData.vars.linkwavdir = get(hObject, 'Value'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in checkbox_Common_recursedir. Dawn@4: function checkbox_Common_recursedir_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to checkbox_Common_recursedir (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_recursedir Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: VSData.vars.recursedir = get(hObject, 'Value'); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Outputs_smoothwinsize_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Outputs_smoothwinsize (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: Dawn@4: if (~isnan(num)) Dawn@4: num = round(num); Dawn@4: if (num >= 0) % 0 denotes no output smoothing Dawn@4: set(hObject, 'String', num2str(num)); Dawn@4: VSData.vars.O_smoothwinsize = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: else Dawn@4: set(hObject, 'String', num2str(vars.O_smoothwinsize)); Dawn@4: end Dawn@4: else Dawn@4: set(hObject, 'String', num2str(vars.O_smoothwinsize)); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Outputs_smoothwinsize_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Outputs_smoothwinsize (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Input_searchstring_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Input_searchstring (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: str = get(hObject, 'String'); Dawn@4: if (isempty(str)) Dawn@4: set(hObject, 'String', VSData.vars.I_searchstring); Dawn@4: else Dawn@4: VSData.vars.I_searchstring = str; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Input_searchstring_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Input_searchstring (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: % --- Executes on button press in pushbutton_Settings_Praat. Dawn@4: function pushbutton_Settings_Praat_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to pushbutton_Settings_Praat (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: vs_Settings_Praat(); Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_SHR_min_F0_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_SHR_min_F0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_SHR_min_F0 as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_SHR_min_F0 as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: if (isempty(num) || num < 0) Dawn@4: set(hObject, 'String', num2str(vars.SHRmin)); Dawn@4: else Dawn@4: VSData.vars.SHRmin = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_SHR_min_F0_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_SHR_min_F0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_SHR_max_F0_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_SHR_max_F0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_SHR_max_F0 as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_SHR_max_F0 as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: if (isempty(num) || num < 0) Dawn@4: set(hObject, 'String', num2str(vars.SHRmax)); Dawn@4: else Dawn@4: VSData.vars.SHRmax = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_SHR_max_F0_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_SHR_max_F0 (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_SHR_threshold_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_SHR_threshold (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_SHR_threshold as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_SHR_threshold as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: if (isempty(num) || num < 0) Dawn@4: set(hObject, 'String', num2str(vars.SHRThreshold)); Dawn@4: else Dawn@4: VSData.vars.SHRThreshold = num; Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(num)) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_SHR_threshold_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_SHR_threshold (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Common_Nperiods_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_Nperiods (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Common_Nperiods as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Common_Nperiods as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: if (isempty(num) || round(num) < 0) Dawn@4: set(hObject, 'String', num2str(vars.Nperiods)); Dawn@4: else Dawn@4: VSData.vars.Nperiods = round(num); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(round(num))) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Common_Nperiods_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_Nperiods (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: Dawn@4: function edit_Common_Nperiods_EC_Callback(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_Nperiods_EC (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles structure with handles and user data (see GUIDATA) Dawn@4: Dawn@4: % Hints: get(hObject,'String') returns contents of edit_Common_Nperiods_EC as text Dawn@4: % str2double(get(hObject,'String')) returns contents of edit_Common_Nperiods_EC as a double Dawn@4: VSData = guidata(handles.VSHandle); Dawn@4: vars = VSData.vars; Dawn@4: num = str2double(get(hObject, 'String')); Dawn@4: if (isempty(num) || round(num) < 0) Dawn@4: set(hObject, 'String', num2str(vars.Nperiods_EC)); Dawn@4: else Dawn@4: VSData.vars.Nperiods_EC = round(num); Dawn@4: guidata(handles.VSHandle, VSData); Dawn@4: set(hObject, 'String', num2str(round(num))) Dawn@4: end Dawn@4: Dawn@4: Dawn@4: % --- Executes during object creation, after setting all properties. Dawn@4: function edit_Common_Nperiods_EC_CreateFcn(hObject, eventdata, handles) Dawn@4: % hObject handle to edit_Common_Nperiods_EC (see GCBO) Dawn@4: % eventdata reserved - to be defined in a future version of MATLAB Dawn@4: % handles empty - handles not created until after all CreateFcns called Dawn@4: Dawn@4: % Hint: edit controls usually have a white background on Windows. Dawn@4: % See ISPC and COMPUTER. Dawn@4: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) Dawn@4: set(hObject,'BackgroundColor','white'); Dawn@4: end