annotate Code/Descriptors/Matlab/MPEG7/FromWeb/VoiceSauce/vs_Settings_Praat.m @ 4:92ca03a8fa99 tip

Update to ICASSP 2013 benchmark
author Dawn Black
date Wed, 13 Feb 2013 11:02:39 +0000
parents
children
rev   line source
Dawn@4 1 function varargout = vs_Settings_Praat(varargin)
Dawn@4 2 % VS_SETTINGS_PRAAT M-file for vs_Settings_Praat.fig
Dawn@4 3 % VS_SETTINGS_PRAAT, by itself, creates a new VS_SETTINGS_PRAAT or raises the existing
Dawn@4 4 % singleton*.
Dawn@4 5 %
Dawn@4 6 % H = VS_SETTINGS_PRAAT returns the handle to a new VS_SETTINGS_PRAAT or the handle to
Dawn@4 7 % the existing singleton*.
Dawn@4 8 %
Dawn@4 9 % VS_SETTINGS_PRAAT('CALLBACK',hObject,eventData,handles,...) calls the local
Dawn@4 10 % function named CALLBACK in VS_SETTINGS_PRAAT.M with the given input arguments.
Dawn@4 11 %
Dawn@4 12 % VS_SETTINGS_PRAAT('Property','Value',...) creates a new VS_SETTINGS_PRAAT or raises the
Dawn@4 13 % existing singleton*. Starting from the left, property value pairs are
Dawn@4 14 % applied to the GUI before vs_Settings_Praat_OpeningFcn gets called. An
Dawn@4 15 % unrecognized property name or invalid value makes property application
Dawn@4 16 % stop. All inputs are passed to vs_Settings_Praat_OpeningFcn via varargin.
Dawn@4 17 %
Dawn@4 18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
Dawn@4 19 % instance to run (singleton)".
Dawn@4 20 %
Dawn@4 21 % See also: GUIDE, GUIDATA, GUIHANDLES
Dawn@4 22
Dawn@4 23 % Edit the above text to modify the response to help vs_Settings_Praat
Dawn@4 24
Dawn@4 25 % Last Modified by GUIDE v2.5 08-Mar-2011 23:30:28
Dawn@4 26
Dawn@4 27 % Begin initialization code - DO NOT EDIT
Dawn@4 28 gui_Singleton = 1;
Dawn@4 29 gui_State = struct('gui_Name', mfilename, ...
Dawn@4 30 'gui_Singleton', gui_Singleton, ...
Dawn@4 31 'gui_OpeningFcn', @vs_Settings_Praat_OpeningFcn, ...
Dawn@4 32 'gui_OutputFcn', @vs_Settings_Praat_OutputFcn, ...
Dawn@4 33 'gui_LayoutFcn', [] , ...
Dawn@4 34 'gui_Callback', []);
Dawn@4 35 if nargin && ischar(varargin{1})
Dawn@4 36 gui_State.gui_Callback = str2func(varargin{1});
Dawn@4 37 end
Dawn@4 38
Dawn@4 39 if nargout
Dawn@4 40 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
Dawn@4 41 else
Dawn@4 42 gui_mainfcn(gui_State, varargin{:});
Dawn@4 43 end
Dawn@4 44 % End initialization code - DO NOT EDIT
Dawn@4 45
Dawn@4 46
Dawn@4 47 % --- Executes just before vs_Settings_Praat is made visible.
Dawn@4 48 function vs_Settings_Praat_OpeningFcn(hObject, eventdata, handles, varargin)
Dawn@4 49 % This function has no output args, see OutputFcn.
Dawn@4 50 % hObject handle to figure
Dawn@4 51 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 52 % handles structure with handles and user data (see GUIDATA)
Dawn@4 53 % varargin command line arguments to vs_Settings_Praat (see VARARGIN)
Dawn@4 54
Dawn@4 55 % Choose default command line output for vs_Settings_Praat
Dawn@4 56 handles.output = hObject;
Dawn@4 57
Dawn@4 58 Setfig = vs_Settings;
Dawn@4 59 Sethandle = guidata(Setfig);
Dawn@4 60 handles.Setfig = Setfig;
Dawn@4 61 handles.Sethandle = Sethandle;
Dawn@4 62 handles.VSHandle = Sethandle.VSHandle;
Dawn@4 63
Dawn@4 64 setGUIVariables(handles);
Dawn@4 65
Dawn@4 66 % Update handles structure
Dawn@4 67 guidata(hObject, handles);
Dawn@4 68
Dawn@4 69 % UIWAIT makes vs_Settings_Praat wait for user response (see UIRESUME)
Dawn@4 70 % uiwait(handles.figure1);
Dawn@4 71
Dawn@4 72
Dawn@4 73 % align the variables with those in VS.vars
Dawn@4 74 function setGUIVariables(handles)
Dawn@4 75 VSData = guidata(handles.VSHandle);
Dawn@4 76 vars = VSData.vars;
Dawn@4 77
Dawn@4 78 set(handles.edit_max_F0, 'String', num2str(vars.F0Praatmax));
Dawn@4 79 set(handles.edit_min_F0, 'String', num2str(vars.F0Praatmin));
Dawn@4 80
Dawn@4 81 set(handles.edit_voice_threshold, 'String', num2str(vars.F0PraatVoiceThreshold));
Dawn@4 82 set(handles.edit_silence_threshold, 'String', num2str(vars.F0PraatSilenceThreshold));
Dawn@4 83 set(handles.edit_octave_cost, 'String', num2str(vars.F0PraatOctaveCost));
Dawn@4 84 set(handles.edit_oct_j_cost, 'String', num2str(vars.F0PraatOctiveJumpCost));
Dawn@4 85 set(handles.edit_voiced_unvoiced_cost, 'String', num2str(vars.F0PraatVoicedUnvoicedCost));
Dawn@4 86 set(handles.edit_smoothing_bandwidth, 'String', num2str(vars.F0PraatSmoothingBandwidth));
Dawn@4 87
Dawn@4 88 set(handles.checkbox_kill_octave_jumps, 'Value', vars.F0PraatKillOctaveJumps);
Dawn@4 89 set(handles.checkbox_smooth, 'Value', vars.F0PraatSmooth);
Dawn@4 90 set(handles.checkbox_interpolate, 'Value', vars.F0PraatInterpolate);
Dawn@4 91
Dawn@4 92
Dawn@4 93 % --- Outputs from this function are returned to the command line.
Dawn@4 94 function varargout = vs_Settings_Praat_OutputFcn(hObject, eventdata, handles)
Dawn@4 95 % varargout cell array for returning output args (see VARARGOUT);
Dawn@4 96 % hObject handle to figure
Dawn@4 97 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 98 % handles structure with handles and user data (see GUIDATA)
Dawn@4 99
Dawn@4 100 % Get default command line output from handles structure
Dawn@4 101 varargout{1} = handles.output;
Dawn@4 102
Dawn@4 103
Dawn@4 104
Dawn@4 105 function edit_min_F0_Callback(hObject, eventdata, handles)
Dawn@4 106 % hObject handle to edit_min_F0 (see GCBO)
Dawn@4 107 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 108 % handles structure with handles and user data (see GUIDATA)
Dawn@4 109
Dawn@4 110 % Hints: get(hObject,'String') returns contents of edit_min_F0 as text
Dawn@4 111 % str2double(get(hObject,'String')) returns contents of edit_min_F0 as a double
Dawn@4 112 VSData = guidata(handles.VSHandle);
Dawn@4 113 val = str2double(get(hObject, 'String'));
Dawn@4 114
Dawn@4 115 if (~isnan(val) && val >= 0)
Dawn@4 116 VSData.vars.F0Praatmin = val;
Dawn@4 117 guidata(handles.VSHandle, VSData);
Dawn@4 118 set(hObject, 'String', num2str(val));
Dawn@4 119 else
Dawn@4 120 set(hObject, 'String', num2str(VSData.vars.F0Praatmin));
Dawn@4 121 end
Dawn@4 122
Dawn@4 123
Dawn@4 124
Dawn@4 125 % --- Executes during object creation, after setting all properties.
Dawn@4 126 function edit_min_F0_CreateFcn(hObject, eventdata, handles)
Dawn@4 127 % hObject handle to edit_min_F0 (see GCBO)
Dawn@4 128 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 129 % handles empty - handles not created until after all CreateFcns called
Dawn@4 130
Dawn@4 131 % Hint: edit controls usually have a white background on Windows.
Dawn@4 132 % See ISPC and COMPUTER.
Dawn@4 133 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 134 set(hObject,'BackgroundColor','white');
Dawn@4 135 end
Dawn@4 136
Dawn@4 137
Dawn@4 138
Dawn@4 139 function edit_max_F0_Callback(hObject, eventdata, handles)
Dawn@4 140 % hObject handle to edit_max_F0 (see GCBO)
Dawn@4 141 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 142 % handles structure with handles and user data (see GUIDATA)
Dawn@4 143
Dawn@4 144 % Hints: get(hObject,'String') returns contents of edit_max_F0 as text
Dawn@4 145 % str2double(get(hObject,'String')) returns contents of edit_max_F0 as a double
Dawn@4 146 VSData = guidata(handles.VSHandle);
Dawn@4 147 val = str2double(get(hObject, 'String'));
Dawn@4 148
Dawn@4 149 if (~isnan(val) && val >= 0)
Dawn@4 150 VSData.vars.F0Praatmax = val;
Dawn@4 151 guidata(handles.VSHandle, VSData);
Dawn@4 152 set(hObject, 'String', num2str(val));
Dawn@4 153 else
Dawn@4 154 set(hObject, 'String', num2str(VSData.vars.F0Praatmax));
Dawn@4 155 end
Dawn@4 156
Dawn@4 157
Dawn@4 158
Dawn@4 159
Dawn@4 160 % --- Executes during object creation, after setting all properties.
Dawn@4 161 function edit_max_F0_CreateFcn(hObject, eventdata, handles)
Dawn@4 162 % hObject handle to edit_max_F0 (see GCBO)
Dawn@4 163 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 164 % handles empty - handles not created until after all CreateFcns called
Dawn@4 165
Dawn@4 166 % Hint: edit controls usually have a white background on Windows.
Dawn@4 167 % See ISPC and COMPUTER.
Dawn@4 168 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 169 set(hObject,'BackgroundColor','white');
Dawn@4 170 end
Dawn@4 171
Dawn@4 172
Dawn@4 173
Dawn@4 174 function edit_voice_threshold_Callback(hObject, eventdata, handles)
Dawn@4 175 % hObject handle to edit_voice_threshold (see GCBO)
Dawn@4 176 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 177 % handles structure with handles and user data (see GUIDATA)
Dawn@4 178
Dawn@4 179 % Hints: get(hObject,'String') returns contents of edit_voice_threshold as text
Dawn@4 180 % str2double(get(hObject,'String')) returns contents of edit_voice_threshold as a double
Dawn@4 181 VSData = guidata(handles.VSHandle);
Dawn@4 182 val = str2double(get(hObject, 'String'));
Dawn@4 183
Dawn@4 184 if (~isnan(val) && val >= 0)
Dawn@4 185 VSData.vars.F0PraatVoiceThreshold = val;
Dawn@4 186 guidata(handles.VSHandle, VSData);
Dawn@4 187 set(hObject, 'String', num2str(val));
Dawn@4 188 else
Dawn@4 189 set(hObject, 'String', num2str(VSData.vars.F0PraatVoiceThreshold));
Dawn@4 190 end
Dawn@4 191
Dawn@4 192
Dawn@4 193 % --- Executes during object creation, after setting all properties.
Dawn@4 194 function edit_voice_threshold_CreateFcn(hObject, eventdata, handles)
Dawn@4 195 % hObject handle to edit_voice_threshold (see GCBO)
Dawn@4 196 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 197 % handles empty - handles not created until after all CreateFcns called
Dawn@4 198
Dawn@4 199 % Hint: edit controls usually have a white background on Windows.
Dawn@4 200 % See ISPC and COMPUTER.
Dawn@4 201 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 202 set(hObject,'BackgroundColor','white');
Dawn@4 203 end
Dawn@4 204
Dawn@4 205
Dawn@4 206
Dawn@4 207 function edit_oct_j_cost_Callback(hObject, eventdata, handles)
Dawn@4 208 % hObject handle to edit_oct_j_cost (see GCBO)
Dawn@4 209 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 210 % handles structure with handles and user data (see GUIDATA)
Dawn@4 211
Dawn@4 212 % Hints: get(hObject,'String') returns contents of edit_oct_j_cost as text
Dawn@4 213 % str2double(get(hObject,'String')) returns contents of edit_oct_j_cost as a double
Dawn@4 214 VSData = guidata(handles.VSHandle);
Dawn@4 215 val = str2double(get(hObject, 'String'));
Dawn@4 216
Dawn@4 217 if (~isnan(val) && val >= 0)
Dawn@4 218 VSData.vars.F0PraatOctiveJumpCost = val;
Dawn@4 219 guidata(handles.VSHandle, VSData);
Dawn@4 220 set(hObject, 'String', num2str(val));
Dawn@4 221 else
Dawn@4 222 set(hObject, 'String', num2str(VSData.vars.F0PraatOctiveJumpCost));
Dawn@4 223 end
Dawn@4 224
Dawn@4 225
Dawn@4 226 % --- Executes during object creation, after setting all properties.
Dawn@4 227 function edit_oct_j_cost_CreateFcn(hObject, eventdata, handles)
Dawn@4 228 % hObject handle to edit_oct_j_cost (see GCBO)
Dawn@4 229 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 230 % handles empty - handles not created until after all CreateFcns called
Dawn@4 231
Dawn@4 232 % Hint: edit controls usually have a white background on Windows.
Dawn@4 233 % See ISPC and COMPUTER.
Dawn@4 234 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 235 set(hObject,'BackgroundColor','white');
Dawn@4 236 end
Dawn@4 237
Dawn@4 238
Dawn@4 239 % --- Executes on button press in pushbutton_OK.
Dawn@4 240 function pushbutton_OK_Callback(hObject, eventdata, handles)
Dawn@4 241 % hObject handle to pushbutton_OK (see GCBO)
Dawn@4 242 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 243 % handles structure with handles and user data (see GUIDATA)
Dawn@4 244
Dawn@4 245 delete(gcf);
Dawn@4 246
Dawn@4 247
Dawn@4 248 % --- Executes on button press in checkbox_kill_octave_jumps.
Dawn@4 249 function checkbox_kill_octave_jumps_Callback(hObject, eventdata, handles)
Dawn@4 250 % hObject handle to checkbox_kill_octave_jumps (see GCBO)
Dawn@4 251 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 252 % handles structure with handles and user data (see GUIDATA)
Dawn@4 253
Dawn@4 254 % Hint: get(hObject,'Value') returns toggle state of checkbox_kill_octave_jumps
Dawn@4 255 VSData = guidata(handles.VSHandle);
Dawn@4 256 VSData.vars.F0PraatKillOctaveJumps = get(hObject, 'Value');
Dawn@4 257 guidata(handles.VSHandle, VSData);
Dawn@4 258
Dawn@4 259
Dawn@4 260 % --- Executes on button press in checkbox_smooth.
Dawn@4 261 function checkbox_smooth_Callback(hObject, eventdata, handles)
Dawn@4 262 % hObject handle to checkbox_smooth (see GCBO)
Dawn@4 263 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 264 % handles structure with handles and user data (see GUIDATA)
Dawn@4 265
Dawn@4 266 % Hint: get(hObject,'Value') returns toggle state of checkbox_smooth
Dawn@4 267 VSData = guidata(handles.VSHandle);
Dawn@4 268 VSData.vars.F0PraatSmooth = get(hObject, 'Value');
Dawn@4 269 guidata(handles.VSHandle, VSData);
Dawn@4 270
Dawn@4 271
Dawn@4 272 % --- Executes on button press in checkbox_interpolate.
Dawn@4 273 function checkbox_interpolate_Callback(hObject, eventdata, handles)
Dawn@4 274 % hObject handle to checkbox_interpolate (see GCBO)
Dawn@4 275 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 276 % handles structure with handles and user data (see GUIDATA)
Dawn@4 277
Dawn@4 278 % Hint: get(hObject,'Value') returns toggle state of checkbox_interpolate
Dawn@4 279 VSData = guidata(handles.VSHandle);
Dawn@4 280 VSData.vars.F0PraatInterpolate = get(hObject, 'Value');
Dawn@4 281 guidata(handles.VSHandle, VSData);
Dawn@4 282
Dawn@4 283
Dawn@4 284
Dawn@4 285 function edit_silence_threshold_Callback(hObject, eventdata, handles)
Dawn@4 286 % hObject handle to edit_silence_threshold (see GCBO)
Dawn@4 287 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 288 % handles structure with handles and user data (see GUIDATA)
Dawn@4 289
Dawn@4 290 % Hints: get(hObject,'String') returns contents of edit_silence_threshold as text
Dawn@4 291 % str2double(get(hObject,'String')) returns contents of edit_silence_threshold as a double
Dawn@4 292 VSData = guidata(handles.VSHandle);
Dawn@4 293 val = str2double(get(hObject, 'String'));
Dawn@4 294
Dawn@4 295 if (~isnan(val) && val >= 0)
Dawn@4 296 VSData.vars.F0PraatSilenceThreshold = val;
Dawn@4 297 guidata(handles.VSHandle, VSData);
Dawn@4 298 set(hObject, 'String', num2str(val));
Dawn@4 299 else
Dawn@4 300 set(hObject, 'String', num2str(VSData.vars.F0PraatSilenceThreshold));
Dawn@4 301 end
Dawn@4 302
Dawn@4 303
Dawn@4 304 % --- Executes during object creation, after setting all properties.
Dawn@4 305 function edit_silence_threshold_CreateFcn(hObject, eventdata, handles)
Dawn@4 306 % hObject handle to edit_silence_threshold (see GCBO)
Dawn@4 307 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 308 % handles empty - handles not created until after all CreateFcns called
Dawn@4 309
Dawn@4 310 % Hint: edit controls usually have a white background on Windows.
Dawn@4 311 % See ISPC and COMPUTER.
Dawn@4 312 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 313 set(hObject,'BackgroundColor','white');
Dawn@4 314 end
Dawn@4 315
Dawn@4 316
Dawn@4 317
Dawn@4 318 function edit_octave_cost_Callback(hObject, eventdata, handles)
Dawn@4 319 % hObject handle to edit_octave_cost (see GCBO)
Dawn@4 320 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 321 % handles structure with handles and user data (see GUIDATA)
Dawn@4 322
Dawn@4 323 % Hints: get(hObject,'String') returns contents of edit_octave_cost as text
Dawn@4 324 % str2double(get(hObject,'String')) returns contents of edit_octave_cost as a double
Dawn@4 325 VSData = guidata(handles.VSHandle);
Dawn@4 326 val = str2double(get(hObject, 'String'));
Dawn@4 327
Dawn@4 328 if (~isnan(val) && val >= 0)
Dawn@4 329 VSData.vars.F0PraatOctaveCost = val;
Dawn@4 330 guidata(handles.VSHandle, VSData);
Dawn@4 331 set(hObject, 'String', num2str(val));
Dawn@4 332 else
Dawn@4 333 set(hObject, 'String', num2str(VSData.vars.F0PraatOctaveCost));
Dawn@4 334 end
Dawn@4 335
Dawn@4 336
Dawn@4 337 % --- Executes during object creation, after setting all properties.
Dawn@4 338 function edit_octave_cost_CreateFcn(hObject, eventdata, handles)
Dawn@4 339 % hObject handle to edit_octave_cost (see GCBO)
Dawn@4 340 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 341 % handles empty - handles not created until after all CreateFcns called
Dawn@4 342
Dawn@4 343 % Hint: edit controls usually have a white background on Windows.
Dawn@4 344 % See ISPC and COMPUTER.
Dawn@4 345 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 346 set(hObject,'BackgroundColor','white');
Dawn@4 347 end
Dawn@4 348
Dawn@4 349
Dawn@4 350
Dawn@4 351 function edit_voiced_unvoiced_cost_Callback(hObject, eventdata, handles)
Dawn@4 352 % hObject handle to edit_voiced_unvoiced_cost (see GCBO)
Dawn@4 353 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 354 % handles structure with handles and user data (see GUIDATA)
Dawn@4 355
Dawn@4 356 % Hints: get(hObject,'String') returns contents of edit_voiced_unvoiced_cost as text
Dawn@4 357 % str2double(get(hObject,'String')) returns contents of edit_voiced_unvoiced_cost as a double
Dawn@4 358 VSData = guidata(handles.VSHandle);
Dawn@4 359 val = str2double(get(hObject, 'String'));
Dawn@4 360
Dawn@4 361 if (~isnan(val) && val >= 0)
Dawn@4 362 VSData.vars.F0PraatVoicedUnvoicedCost = val;
Dawn@4 363 guidata(handles.VSHandle, VSData);
Dawn@4 364 set(hObject, 'String', num2str(val));
Dawn@4 365 else
Dawn@4 366 set(hObject, 'String', num2str(VSData.vars.F0PraatVoicedUnvoicedCost));
Dawn@4 367 end
Dawn@4 368
Dawn@4 369
Dawn@4 370 % --- Executes during object creation, after setting all properties.
Dawn@4 371 function edit_voiced_unvoiced_cost_CreateFcn(hObject, eventdata, handles)
Dawn@4 372 % hObject handle to edit_voiced_unvoiced_cost (see GCBO)
Dawn@4 373 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 374 % handles empty - handles not created until after all CreateFcns called
Dawn@4 375
Dawn@4 376 % Hint: edit controls usually have a white background on Windows.
Dawn@4 377 % See ISPC and COMPUTER.
Dawn@4 378 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 379 set(hObject,'BackgroundColor','white');
Dawn@4 380 end
Dawn@4 381
Dawn@4 382
Dawn@4 383
Dawn@4 384 function edit_smoothing_bandwidth_Callback(hObject, eventdata, handles)
Dawn@4 385 % hObject handle to edit_smoothing_bandwidth (see GCBO)
Dawn@4 386 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 387 % handles structure with handles and user data (see GUIDATA)
Dawn@4 388
Dawn@4 389 % Hints: get(hObject,'String') returns contents of edit_smoothing_bandwidth as text
Dawn@4 390 % str2double(get(hObject,'String')) returns contents of edit_smoothing_bandwidth as a double
Dawn@4 391 VSData = guidata(handles.VSHandle);
Dawn@4 392 val = str2double(get(hObject, 'String'));
Dawn@4 393
Dawn@4 394 if (~isnan(val) && val >= 0)
Dawn@4 395 VSData.vars.F0PraatSmoothingBandwidth = val;
Dawn@4 396 guidata(handles.VSHandle, VSData);
Dawn@4 397 set(hObject, 'String', num2str(val));
Dawn@4 398 else
Dawn@4 399 set(hObject, 'String', num2str(VSData.vars.F0PraatSmoothingBandwidth));
Dawn@4 400 end
Dawn@4 401
Dawn@4 402
Dawn@4 403 % --- Executes during object creation, after setting all properties.
Dawn@4 404 function edit_smoothing_bandwidth_CreateFcn(hObject, eventdata, handles)
Dawn@4 405 % hObject handle to edit_smoothing_bandwidth (see GCBO)
Dawn@4 406 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 407 % handles empty - handles not created until after all CreateFcns called
Dawn@4 408
Dawn@4 409 % Hint: edit controls usually have a white background on Windows.
Dawn@4 410 % See ISPC and COMPUTER.
Dawn@4 411 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 412 set(hObject,'BackgroundColor','white');
Dawn@4 413 end