comparison Code/Descriptors/Matlab/MPEG7/FromWeb/VoiceSauce/vs_Settings.m @ 4:92ca03a8fa99 tip

Update to ICASSP 2013 benchmark
author Dawn Black
date Wed, 13 Feb 2013 11:02:39 +0000
parents
children
comparison
equal deleted inserted replaced
3:e1cfa7765647 4:92ca03a8fa99
1 function varargout = vs_Settings(varargin)
2 % VS_SETTINGS M-file for vs_Settings.fig
3 % VS_SETTINGS, by itself, creates a new VS_SETTINGS or raises the existing
4 % singleton*.
5 %
6 % H = VS_SETTINGS returns the handle to a new VS_SETTINGS or the handle to
7 % the existing singleton*.
8 %
9 % VS_SETTINGS('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in VS_SETTINGS.M with the given input arguments.
11 %
12 % VS_SETTINGS('Property','Value',...) creates a new VS_SETTINGS or raises the
13 % existing singleton*. Starting from the left, property value pairs are
14 % applied to the GUI before vs_Settings_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to vs_Settings_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
19 % instance to run (singleton)".
20 %
21 % See also: GUIDE, GUIDATA, GUIHANDLES
22
23 % Edit the above text to modify the response to help vs_Settings
24
25 % Last Modified by GUIDE v2.5 09-Mar-2011 22:29:50
26
27 % Begin initialization code - DO NOT EDIT
28 gui_Singleton = 1;
29 gui_State = struct('gui_Name', mfilename, ...
30 'gui_Singleton', gui_Singleton, ...
31 'gui_OpeningFcn', @vs_Settings_OpeningFcn, ...
32 'gui_OutputFcn', @vs_Settings_OutputFcn, ...
33 'gui_LayoutFcn', [] , ...
34 'gui_Callback', []);
35 if nargin && ischar(varargin{1})
36 gui_State.gui_Callback = str2func(varargin{1});
37 end
38
39 if nargout
40 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
41 else
42 gui_mainfcn(gui_State, varargin{:});
43 end
44 % End initialization code - DO NOT EDIT
45
46
47 % --- Executes just before vs_Settings is made visible.
48 function vs_Settings_OpeningFcn(hObject, eventdata, handles, varargin)
49 % This function has no output args, see OutputFcn.
50 % hObject handle to figure
51 % eventdata reserved - to be defined in a future version of MATLAB
52 % handles structure with handles and user data (see GUIDATA)
53 % varargin command line arguments to vs_Settings (see VARARGIN)
54
55 % Choose default command line output for vs_Settings
56 handles.output = hObject;
57
58 % YS: get the settings from the main figure
59 if (~isfield(handles, 'VSHandle'))
60 VSHandle = VoiceSauce;
61 handles.VSHandle = VSHandle;
62 end
63
64 % restore the variables from initialization
65 setGUIVariables(handles);
66
67
68 %
69 set(handles.uipanel_Formants,'SelectionChangeFcn',@formants_buttongroup_SelectionChangeFcn);
70 set(handles.uipanel_F0,'SelectionChangeFcn',@F0_buttongroup_SelectionChangeFcn);
71
72 % Update handles structure
73 guidata(hObject, handles);
74
75 % UIWAIT makes vs_Settings wait for user response (see UIRESUME)
76 % uiwait(handles.figure1);
77
78
79 % --- Outputs from this function are returned to the command line.
80 function varargout = vs_Settings_OutputFcn(hObject, eventdata, handles)
81 % varargout cell array for returning output args (see VARARGOUT);
82 % hObject handle to figure
83 % eventdata reserved - to be defined in a future version of MATLAB
84 % handles structure with handles and user data (see GUIDATA)
85
86 % Get default command line output from handles structure
87 varargout{1} = handles.output;
88
89
90
91 % aligns the variables with those in VS.vars
92 function setGUIVariables(handles)
93 VSData = guidata(handles.VSHandle);
94 vars = VSData.vars;
95
96 %F0
97 switch(vars.F0algorithm)
98 case {'F0 (Straight)'}
99 set(handles.radiobutton_F0_Straight, 'Value', 1);
100 case {'F0 (Snack)'}
101 set(handles.radiobutton_F0_Snack, 'Value', 1);
102 case {'F0 (Praat)'}
103 set(handles.radiobutton_F0_Praat, 'Value', 1);
104 case {'F0 (Other)'}
105 set(handles.radiobutton_F0_Other, 'Value', 1);
106 end
107
108 set(handles.edit_F0_Straight_maxF0, 'String', num2str(vars.maxstrF0));
109 set(handles.edit_F0_Straight_minF0, 'String', num2str(vars.minstrF0));
110 set(handles.edit_F0_Straight_maxduration, 'String', num2str(vars.maxstrdur));
111
112 set(handles.edit_F0_Snack_maxF0, 'String', num2str(vars.maxF0));
113 set(handles.edit_F0_Snack_minF0, 'String', num2str(vars.minF0));
114
115 set(handles.checkbox_F0_Other_Enable, 'Value', vars.F0OtherEnable);
116 set(handles.edit_F0_Other_Command, 'String', vars.F0OtherCommand);
117 set(handles.edit_F0_Other_Offset, 'String', num2str(vars.F0OtherOffset));
118 if (vars.F0OtherEnable == 1)
119 set(handles.edit_F0_Other_Command, 'Enable', 'On');
120 set(handles.edit_F0_Other_Offset, 'Enable', 'On');
121 set(handles.radiobutton_F0_Other, 'Enable', 'On');
122 end
123
124
125 % Formants
126 switch(vars.FMTalgorithm)
127 case {'F1, F2, F3, F4 (Snack)'}
128 set(handles.radiobutton_Formants_Snack, 'Value', 1);
129 case {'F1, F2, F3, F4 (Praat)'}
130 set(handles.radiobutton_Formants_Praat, 'Value', 1);
131 case {'F1, F2, F3, F4 (Other)'}
132 set(handles.radiobutton_Formants_Other, 'Value', 1);
133 end
134
135 set(handles.edit_Formants_Snack_preemphasis, 'String', num2str(vars.preemphasis));
136 set(handles.checkbox_Formants_Other_Enable, 'Value', vars.FormantsOtherEnable);
137 set(handles.edit_Formants_Other_Command, 'String', vars.FormantsOtherCommand);
138 set(handles.edit_Formants_Other_Offset, 'String', num2str(vars.FormantsOtherOffset));
139
140 if (vars.FormantsOtherEnable)
141 set(handles.edit_Formants_Other_Command, 'Enable', 'On');
142 set(handles.edit_Formants_Other_Offset, 'Enable', 'On');
143 set(handles.radiobutton_Formants_Other, 'Enable', 'On');
144 end
145
146 % SHR
147 set(handles.edit_SHR_max_F0, 'String', num2str(vars.SHRmax));
148 set(handles.edit_SHR_min_F0, 'String', num2str(vars.SHRmin));
149 set(handles.edit_SHR_threshold, 'String', num2str(vars.SHRThreshold));
150
151 % Common
152 set(handles.edit_Common_windowsize, 'String', num2str(vars.windowsize));
153 set(handles.edit_Common_frameshift, 'String', num2str(vars.frameshift));
154 set(handles.edit_Common_NaN, 'String', vars.NotANumber);
155 set(handles.checkbox_Common_linkmatdir, 'Value', vars.linkmatdir);
156 set(handles.checkbox_Common_linkwavdir, 'Value', vars.linkwavdir);
157 set(handles.checkbox_Common_recursedir, 'Value', vars.recursedir);
158 set(handles.edit_Common_Nperiods, 'String', num2str(vars.Nperiods));
159 set(handles.edit_Common_Nperiods_EC, 'String', num2str(vars.Nperiods_EC));
160
161 % Textgrid
162 set(handles.edit_Textgrid_ignorelist, 'String', vars.TextgridIgnoreList);
163 set(handles.edit_Textgrid_tiernumber, 'String', num2str(vars.TextgridTierNumber));
164
165 % EGG
166 set(handles.edit_EGGData_headers, 'String', vars.EGGheaders);
167 set(handles.edit_EGGData_timelabel, 'String' ,vars.EGGtimelabel);
168
169 % Outputs
170 set(handles.edit_Outputs_smoothwinsize, 'String', num2str(vars.O_smoothwinsize));
171
172 % Input (wav) files
173 set(handles.edit_Input_searchstring, 'String', vars.I_searchstring);
174
175
176 function edit_Common_windowsize_Callback(hObject, eventdata, handles)
177 % hObject handle to edit_Common_windowsize (see GCBO)
178 % eventdata reserved - to be defined in a future version of MATLAB
179 % handles structure with handles and user data (see GUIDATA)
180
181 % Hints: get(hObject,'String') returns contents of edit_Common_windowsize as text
182 % str2double(get(hObject,'String')) returns contents of edit_Common_windowsize as a double
183 VSData = guidata(handles.VSHandle);
184 vars = VSData.vars;
185 num = str2double(get(hObject, 'String'));
186 if (isnan(num))
187 set(hObject, 'String', num2str(vars.windowsize));
188 else
189 num = round(num);
190 if (num > 0)
191 VSData.vars.windowsize = num;
192 set(hObject, 'String', num2str(num))
193 guidata(handles.VSHandle, VSData);
194 else
195 set(hObject, 'String', num2str(num));
196 end
197 end
198
199
200
201 % --- Executes during object creation, after setting all properties.
202 function edit_Common_windowsize_CreateFcn(hObject, eventdata, handles)
203 % hObject handle to edit_Common_windowsize (see GCBO)
204 % eventdata reserved - to be defined in a future version of MATLAB
205 % handles empty - handles not created until after all CreateFcns called
206
207 % Hint: edit controls usually have a white background on Windows.
208 % See ISPC and COMPUTER.
209 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
210 set(hObject,'BackgroundColor','white');
211 end
212
213
214
215 function edit_Common_frameshift_Callback(hObject, eventdata, handles)
216 % hObject handle to edit_Common_frameshift (see GCBO)
217 % eventdata reserved - to be defined in a future version of MATLAB
218 % handles structure with handles and user data (see GUIDATA)
219
220 % Hints: get(hObject,'String') returns contents of edit_Common_frameshift as text
221 % str2double(get(hObject,'String')) returns contents of edit_Common_frameshift as a double
222 VSData = guidata(handles.VSHandle);
223 vars = VSData.vars;
224 num = str2double(get(hObject, 'String'));
225 if (isnan(num))
226 set(hObject, 'String', num2str(vars.frameshift));
227 else
228 num = round(num);
229 if (num > 0)
230 VSData.vars.frameshift = num(1);
231 set(hObject, 'String', num2str(num))
232 guidata(handles.VSHandle, VSData);
233 else
234 set(hObject, 'String', num2str(vars.frameshift));
235 end
236 end
237
238
239 % --- Executes during object creation, after setting all properties.
240 function edit_Common_frameshift_CreateFcn(hObject, eventdata, handles)
241 % hObject handle to edit_Common_frameshift (see GCBO)
242 % eventdata reserved - to be defined in a future version of MATLAB
243 % handles empty - handles not created until after all CreateFcns called
244
245 % Hint: edit controls usually have a white background on Windows.
246 % See ISPC and COMPUTER.
247 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
248 set(hObject,'BackgroundColor','white');
249 end
250
251
252
253 function edit_Formants_Snack_preemphasis_Callback(hObject, eventdata, handles)
254 % hObject handle to edit_Formants_Snack_preemphasis (see GCBO)
255 % eventdata reserved - to be defined in a future version of MATLAB
256 % handles structure with handles and user data (see GUIDATA)
257
258 % Hints: get(hObject,'String') returns contents of edit_Formants_Snack_preemphasis as text
259 % str2double(get(hObject,'String')) returns contents of edit_Formants_Snack_preemphasis as a double
260 VSData = guidata(handles.VSHandle);
261 vars = VSData.vars;
262 num = str2num(get(hObject, 'String'));
263 if (isempty(num))
264 set(hObject, 'String', num2str(vars.preemphasis));
265 else
266 num = num(1);
267 VSData.vars.preemphasis = num;
268 set(hObject, 'String', num2str(num))
269 guidata(handles.VSHandle, VSData);
270 end
271
272
273
274 % --- Executes during object creation, after setting all properties.
275 function edit_Formants_Snack_preemphasis_CreateFcn(hObject, eventdata, handles)
276 % hObject handle to edit_Formants_Snack_preemphasis (see GCBO)
277 % eventdata reserved - to be defined in a future version of MATLAB
278 % handles empty - handles not created until after all CreateFcns called
279
280 % Hint: edit controls usually have a white background on Windows.
281 % See ISPC and COMPUTER.
282 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
283 set(hObject,'BackgroundColor','white');
284 end
285
286
287
288 function edit_F0_Straight_maxF0_Callback(hObject, eventdata, handles)
289 % hObject handle to edit_F0_Straight_maxF0 (see GCBO)
290 % eventdata reserved - to be defined in a future version of MATLAB
291 % handles structure with handles and user data (see GUIDATA)
292
293 % Hints: get(hObject,'String') returns contents of edit_F0_Straight_maxF0 as text
294 % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_maxF0 as a double
295 VSData = guidata(handles.VSHandle);
296 vars = VSData.vars;
297 num = str2num(get(hObject, 'String'));
298 if (isempty(num))
299 set(hObject, 'String', num2str(vars.maxstrF0));
300 else
301 num = num(1);
302 VSData.vars.maxstrF0 = num;
303 set(hObject, 'String', num2str(num))
304 guidata(handles.VSHandle, VSData);
305 end
306
307
308 % --- Executes during object creation, after setting all properties.
309 function edit_F0_Straight_maxF0_CreateFcn(hObject, eventdata, handles)
310 % hObject handle to edit_F0_Straight_maxF0 (see GCBO)
311 % eventdata reserved - to be defined in a future version of MATLAB
312 % handles empty - handles not created until after all CreateFcns called
313
314 % Hint: edit controls usually have a white background on Windows.
315 % See ISPC and COMPUTER.
316 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
317 set(hObject,'BackgroundColor','white');
318 end
319
320
321
322 function edit_F0_Straight_minF0_Callback(hObject, eventdata, handles)
323 % hObject handle to edit_F0_Straight_minF0 (see GCBO)
324 % eventdata reserved - to be defined in a future version of MATLAB
325 % handles structure with handles and user data (see GUIDATA)
326
327 % Hints: get(hObject,'String') returns contents of edit_F0_Straight_minF0 as text
328 % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_minF0 as a double
329 VSData = guidata(handles.VSHandle);
330 vars = VSData.vars;
331 num = str2num(get(hObject, 'String'));
332 if (isempty(num))
333 set(hObject, 'String', num2str(vars.minstrF0));
334 else
335 num = num(1);
336 VSData.vars.minstrF0 = num;
337 set(hObject, 'String', num2str(num))
338 guidata(handles.VSHandle, VSData);
339 end
340
341
342 % --- Executes during object creation, after setting all properties.
343 function edit_F0_Straight_minF0_CreateFcn(hObject, eventdata, handles)
344 % hObject handle to edit_F0_Straight_minF0 (see GCBO)
345 % eventdata reserved - to be defined in a future version of MATLAB
346 % handles empty - handles not created until after all CreateFcns called
347
348 % Hint: edit controls usually have a white background on Windows.
349 % See ISPC and COMPUTER.
350 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
351 set(hObject,'BackgroundColor','white');
352 end
353
354
355 % --- Executes on button press in radiobutton_F0_Straight.
356 function radiobutton_F0_Straight_Callback(hObject, eventdata, handles)
357 % hObject handle to radiobutton_F0_Straight (see GCBO)
358 % eventdata reserved - to be defined in a future version of MATLAB
359 % handles structure with handles and user data (see GUIDATA)
360
361 % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Straight
362
363
364 % --- Executes on button press in radiobutton_F0_Snack.
365 function radiobutton_F0_Snack_Callback(hObject, eventdata, handles)
366 % hObject handle to radiobutton_F0_Snack (see GCBO)
367 % eventdata reserved - to be defined in a future version of MATLAB
368 % handles structure with handles and user data (see GUIDATA)
369
370 % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Snack
371
372
373 % --- Executes on button press in radiobutton_F0_Other.
374 function radiobutton_F0_Other_Callback(hObject, eventdata, handles)
375 % hObject handle to radiobutton_F0_Other (see GCBO)
376 % eventdata reserved - to be defined in a future version of MATLAB
377 % handles structure with handles and user data (see GUIDATA)
378
379 % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Other
380
381
382
383 function edit_F0_Straight_maxduration_Callback(hObject, eventdata, handles)
384 % hObject handle to edit_F0_Straight_maxduration (see GCBO)
385 % eventdata reserved - to be defined in a future version of MATLAB
386 % handles structure with handles and user data (see GUIDATA)
387
388 % Hints: get(hObject,'String') returns contents of edit_F0_Straight_maxduration as text
389 % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_maxduration as a double
390 VSData = guidata(handles.VSHandle);
391 vars = VSData.vars;
392 num = str2num(get(hObject, 'String'));
393 if (isempty(num))
394 set(hObject, 'String', num2str(vars.maxstrdur));
395 else
396 num = num(1);
397 VSData.vars.maxstrdur = num;
398 set(hObject, 'String', num2str(num))
399 guidata(handles.VSHandle, VSData);
400 end
401
402
403 % --- Executes during object creation, after setting all properties.
404 function edit_F0_Straight_maxduration_CreateFcn(hObject, eventdata, handles)
405 % hObject handle to edit_F0_Straight_maxduration (see GCBO)
406 % eventdata reserved - to be defined in a future version of MATLAB
407 % handles empty - handles not created until after all CreateFcns called
408
409 % Hint: edit controls usually have a white background on Windows.
410 % See ISPC and COMPUTER.
411 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
412 set(hObject,'BackgroundColor','white');
413 end
414
415
416
417 function edit_F0_Snack_maxF0_Callback(hObject, eventdata, handles)
418 % hObject handle to edit_F0_Snack_maxF0 (see GCBO)
419 % eventdata reserved - to be defined in a future version of MATLAB
420 % handles structure with handles and user data (see GUIDATA)
421
422 % Hints: get(hObject,'String') returns contents of edit_F0_Snack_maxF0 as text
423 % str2double(get(hObject,'String')) returns contents of edit_F0_Snack_maxF0 as a double
424 VSData = guidata(handles.VSHandle);
425 vars = VSData.vars;
426 num = str2num(get(hObject, 'String'));
427 if (isempty(num))
428 set(hObject, 'String', num2str(vars.maxF0));
429 else
430 num = num(1);
431 VSData.vars.maxF0 = num;
432 guidata(handles.VSHandle, VSData);
433 set(hObject, 'String', num2str(num))
434 end
435
436
437 % --- Executes during object creation, after setting all properties.
438 function edit_F0_Snack_maxF0_CreateFcn(hObject, eventdata, handles)
439 % hObject handle to edit_F0_Snack_maxF0 (see GCBO)
440 % eventdata reserved - to be defined in a future version of MATLAB
441 % handles empty - handles not created until after all CreateFcns called
442
443 % Hint: edit controls usually have a white background on Windows.
444 % See ISPC and COMPUTER.
445 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
446 set(hObject,'BackgroundColor','white');
447 end
448
449
450
451 function edit_F0_Snack_minF0_Callback(hObject, eventdata, handles)
452 % hObject handle to edit_F0_Snack_minF0 (see GCBO)
453 % eventdata reserved - to be defined in a future version of MATLAB
454 % handles structure with handles and user data (see GUIDATA)
455
456 % Hints: get(hObject,'String') returns contents of edit_F0_Snack_minF0 as text
457 % str2double(get(hObject,'String')) returns contents of edit_F0_Snack_minF0 as a double
458 VSData = guidata(handles.VSHandle);
459 vars = VSData.vars;
460 num = str2num(get(hObject, 'String'));
461 if (isempty(num))
462 set(hObject, 'String', num2str(vars.minF0));
463 else
464 num = num(1);
465 VSData.vars.minF0 = num;
466 guidata(handles.VSHandle, VSData);
467 set(hObject, 'String', num2str(num))
468 end
469
470
471 % --- Executes during object creation, after setting all properties.
472 function edit_F0_Snack_minF0_CreateFcn(hObject, eventdata, handles)
473 % hObject handle to edit_F0_Snack_minF0 (see GCBO)
474 % eventdata reserved - to be defined in a future version of MATLAB
475 % handles empty - handles not created until after all CreateFcns called
476
477 % Hint: edit controls usually have a white background on Windows.
478 % See ISPC and COMPUTER.
479 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
480 set(hObject,'BackgroundColor','white');
481 end
482
483
484 % --- Executes on button press in checkbox_F0_Other_Enable.
485 function checkbox_F0_Other_Enable_Callback(hObject, eventdata, handles)
486 % hObject handle to checkbox_F0_Other_Enable (see GCBO)
487 % eventdata reserved - to be defined in a future version of MATLAB
488 % handles structure with handles and user data (see GUIDATA)
489
490 VSData = guidata(handles.VSHandle);
491
492 if (get(hObject, 'Value') == 1)
493 set(handles.edit_F0_Other_Command, 'Enable', 'on');
494 set(handles.edit_F0_Other_Offset, 'Enable', 'on');
495 set(handles.radiobutton_F0_Other, 'Enable', 'on');
496 VSData.vars.F0OtherEnable = 1;
497 else
498 set(handles.edit_F0_Other_Command, 'Enable', 'off');
499 set(handles.edit_F0_Other_Offset, 'Enable', 'off');
500 set(handles.radiobutton_F0_Other, 'Enable', 'off');
501 VSData.vars.F0OtherEnable = 0;
502
503 if (get(handles.radiobutton_F0_Other, 'Value') == 1) % switch back to Straight
504 set(handles.radiobutton_F0_Straight, 'Value', 1);
505 VSData.vars.F0algorithm = 'F0 (Straight)';
506 end
507 end
508
509 guidata(handles.VSHandle, VSData);
510 function edit_F0_Other_Command_Callback(hObject, eventdata, handles)
511 % hObject handle to edit_F0_Other_Command (see GCBO)
512 % eventdata reserved - to be defined in a future version of MATLAB
513 % handles structure with handles and user data (see GUIDATA)
514
515 % Hints: get(hObject,'String') returns contents of edit_F0_Other_Command as text
516 % str2double(get(hObject,'String')) returns contents of edit_F0_Other_Command as a double
517 VSData = guidata(handles.VSHandle);
518 vars = VSData.vars;
519 VSData.vars.F0OtherCommand = get(hObject, 'String');
520 guidata(handles.VSHandle, VSData);
521
522
523 % --- Executes during object creation, after setting all properties.
524 function edit_F0_Other_Command_CreateFcn(hObject, eventdata, handles)
525 % hObject handle to edit_F0_Other_Command (see GCBO)
526 % eventdata reserved - to be defined in a future version of MATLAB
527 % handles empty - handles not created until after all CreateFcns called
528
529 % Hint: edit controls usually have a white background on Windows.
530 % See ISPC and COMPUTER.
531 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
532 set(hObject,'BackgroundColor','white');
533 end
534
535
536
537 function edit_F0_Other_Offset_Callback(hObject, eventdata, handles)
538 % hObject handle to edit_F0_Other_Offset (see GCBO)
539 % eventdata reserved - to be defined in a future version of MATLAB
540 % handles structure with handles and user data (see GUIDATA)
541
542 % Hints: get(hObject,'String') returns contents of edit_F0_Other_Offset as text
543 % str2double(get(hObject,'String')) returns contents of edit_F0_Other_Offset as a double
544 VSData = guidata(handles.VSHandle);
545 vars = VSData.vars;
546 num = str2num(get(hObject, 'String'));
547 if (isempty(num))
548 set(hObject, 'String', num2str(vars.F0OtherOffset));
549 else
550 num = num(1);
551 VSData.vars.F0OtherOffset = num;
552 guidata(handles.VSHandle, VSData);
553 set(hObject, 'String', num2str(num))
554 end
555
556
557 % --- Executes during object creation, after setting all properties.
558 function edit_F0_Other_Offset_CreateFcn(hObject, eventdata, handles)
559 % hObject handle to edit_F0_Other_Offset (see GCBO)
560 % eventdata reserved - to be defined in a future version of MATLAB
561 % handles empty - handles not created until after all CreateFcns called
562
563 % Hint: edit controls usually have a white background on Windows.
564 % See ISPC and COMPUTER.
565 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
566 set(hObject,'BackgroundColor','white');
567 end
568
569
570 % --- Executes on button press in radiobutton_Formants_Snack.
571 function radiobutton_Formants_Snack_Callback(hObject, eventdata, handles)
572 % hObject handle to radiobutton_Formants_Snack (see GCBO)
573 % eventdata reserved - to be defined in a future version of MATLAB
574 % handles structure with handles and user data (see GUIDATA)
575
576 % Hint: get(hObject,'Value') returns toggle state of radiobutton_Formants_Snack
577
578
579 % --- Executes on button press in radiobutton_Formants_Other.
580 function radiobutton_Formants_Other_Callback(hObject, eventdata, handles)
581 % hObject handle to radiobutton_Formants_Other (see GCBO)
582 % eventdata reserved - to be defined in a future version of MATLAB
583 % handles structure with handles and user data (see GUIDATA)
584
585 % Hint: get(hObject,'Value') returns toggle state of radiobutton_Formants_Other
586
587
588
589 function edit_Formants_Other_Offset_Callback(hObject, eventdata, handles)
590 % hObject handle to edit_Formants_Other_Offset (see GCBO)
591 % eventdata reserved - to be defined in a future version of MATLAB
592 % handles structure with handles and user data (see GUIDATA)
593
594 % Hints: get(hObject,'String') returns contents of edit_Formants_Other_Offset as text
595 % str2double(get(hObject,'String')) returns contents of edit_Formants_Other_Offset as a double
596 VSData = guidata(handles.VSHandle);
597 vars = VSData.vars;
598 num = str2num(get(hObject, 'String'));
599 if (isempty(num))
600 set(hObject, 'String', num2str(vars.FormantsOtherOffset));
601 else
602 num = num(1);
603 VSData.vars.FormantsOtherOffset = num;
604 guidata(handles.VSHandle, VSData);
605 set(hObject, 'String', num2str(num))
606 end
607
608
609 % --- Executes during object creation, after setting all properties.
610 function edit_Formants_Other_Offset_CreateFcn(hObject, eventdata, handles)
611 % hObject handle to edit_Formants_Other_Offset (see GCBO)
612 % eventdata reserved - to be defined in a future version of MATLAB
613 % handles empty - handles not created until after all CreateFcns called
614
615 % Hint: edit controls usually have a white background on Windows.
616 % See ISPC and COMPUTER.
617 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
618 set(hObject,'BackgroundColor','white');
619 end
620
621
622
623 function edit_Formants_Other_Command_Callback(hObject, eventdata, handles)
624 % hObject handle to edit_Formants_Other_Command (see GCBO)
625 % eventdata reserved - to be defined in a future version of MATLAB
626 % handles structure with handles and user data (see GUIDATA)
627
628 % Hints: get(hObject,'String') returns contents of edit_Formants_Other_Command as text
629 % str2double(get(hObject,'String')) returns contents of edit_Formants_Other_Command as a double
630 VSData = guidata(handles.VSHandle);
631 vars = VSData.vars;
632 VSData.vars.FormantsOtherCommand = get(hObject, 'String');
633 guidata(handles.VSHandle, VSData);
634
635
636 % --- Executes during object creation, after setting all properties.
637 function edit_Formants_Other_Command_CreateFcn(hObject, eventdata, handles)
638 % hObject handle to edit_Formants_Other_Command (see GCBO)
639 % eventdata reserved - to be defined in a future version of MATLAB
640 % handles empty - handles not created until after all CreateFcns called
641
642 % Hint: edit controls usually have a white background on Windows.
643 % See ISPC and COMPUTER.
644 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
645 set(hObject,'BackgroundColor','white');
646 end
647
648
649 % --- Executes on button press in checkbox_Formants_Other_Enable.
650 function checkbox_Formants_Other_Enable_Callback(hObject, eventdata, handles)
651 % hObject handle to checkbox_Formants_Other_Enable (see GCBO)
652 % eventdata reserved - to be defined in a future version of MATLAB
653 % handles structure with handles and user data (see GUIDATA)
654
655 VSData = guidata(handles.VSHandle);
656
657 if (get(hObject, 'Value') == 1)
658 set(handles.edit_Formants_Other_Command, 'Enable', 'on');
659 set(handles.edit_Formants_Other_Offset, 'Enable', 'on');
660 set(handles.radiobutton_Formants_Other, 'Enable', 'on');
661 VSData.vars.FormantsOtherEnable = 1;
662 else
663 set(handles.edit_Formants_Other_Command, 'Enable', 'off');
664 set(handles.edit_Formants_Other_Offset, 'Enable', 'off');
665 set(handles.radiobutton_Formants_Other, 'Enable', 'off');
666 VSData.vars.FormantsOtherEnable = 0;
667
668 if (get(handles.radiobutton_Formants_Other, 'Value') == 1) % set back to Snack
669 set(handles.radiobutton_Formants_Snack, 'Value', 1);
670 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Snack)';
671 end
672 end
673
674 guidata(handles.VSHandle, VSData);
675
676
677 function edit_Textgrid_ignorelist_Callback(hObject, eventdata, handles)
678 % hObject handle to edit_Textgrid_ignorelist (see GCBO)
679 % eventdata reserved - to be defined in a future version of MATLAB
680 % handles structure with handles and user data (see GUIDATA)
681
682 % Hints: get(hObject,'String') returns contents of edit_Textgrid_ignorelist as text
683 % str2double(get(hObject,'String')) returns contents of edit_Textgrid_ignorelist as a double
684 VSData = guidata(handles.VSHandle);
685
686 if (isempty(get(hObject, 'String')))
687 set(hObject, 'String', '"", " ", "SIL"'); % this is the default, edit box cannot be empty
688 end
689
690 VSData.vars.TextgridIgnoreList = get(hObject, 'String');
691 guidata(handles.VSHandle, VSData);
692
693
694 % --- Executes during object creation, after setting all properties.
695 function edit_Textgrid_ignorelist_CreateFcn(hObject, eventdata, handles)
696 % hObject handle to edit_Textgrid_ignorelist (see GCBO)
697 % eventdata reserved - to be defined in a future version of MATLAB
698 % handles empty - handles not created until after all CreateFcns called
699
700 % Hint: edit controls usually have a white background on Windows.
701 % See ISPC and COMPUTER.
702 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
703 set(hObject,'BackgroundColor','white');
704 end
705
706
707
708 function edit_Textgrid_tiernumber_Callback(hObject, eventdata, handles)
709 % hObject handle to edit_Textgrid_tiernumber (see GCBO)
710 % eventdata reserved - to be defined in a future version of MATLAB
711 % handles structure with handles and user data (see GUIDATA)
712
713 % Hints: get(hObject,'String') returns contents of edit_Textgrid_tiernumber as text
714 % str2double(get(hObject,'String')) returns contents of edit_Textgrid_tiernumber as a double
715 VSData = guidata(handles.VSHandle);
716 vars = VSData.vars;
717 num = str2num(get(hObject, 'String'));
718 if (isempty(num))
719 set(hObject, 'String', num2str(vars.TextgridTierNumber));
720 else
721 VSData.vars.TextgridTierNumber = unique(num);
722 guidata(handles.VSHandle, VSData);
723 set(hObject, 'String', num2str(VSData.vars.TextgridTierNumber))
724 end
725
726
727 % --- Executes during object creation, after setting all properties.
728 function edit_Textgrid_tiernumber_CreateFcn(hObject, eventdata, handles)
729 % hObject handle to edit_Textgrid_tiernumber (see GCBO)
730 % eventdata reserved - to be defined in a future version of MATLAB
731 % handles empty - handles not created until after all CreateFcns called
732
733 % Hint: edit controls usually have a white background on Windows.
734 % See ISPC and COMPUTER.
735 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
736 set(hObject,'BackgroundColor','white');
737 end
738
739
740 % YS: executes on the press of a radio button in formants panel
741 function formants_buttongroup_SelectionChangeFcn(hObject, eventdata)
742 handles = guidata(hObject);
743 VSData = guidata(handles.VSHandle);
744
745 switch get(eventdata.NewValue, 'Tag')
746 case 'radiobutton_Formants_Snack'
747 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Snack)';
748 case 'radiobutton_Formants_Praat'
749 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Praat)';
750 case 'radiobutton_Formants_Other'
751 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Other)';
752 otherwise
753 end
754 guidata(handles.VSHandle, VSData);
755
756
757
758 % YS: executes on the press of a radio button in F0 panel
759 function F0_buttongroup_SelectionChangeFcn(hObject, eventdata)
760 handles = guidata(hObject);
761 VSData = guidata(handles.VSHandle);
762
763 switch get(eventdata.NewValue, 'Tag')
764 case 'radiobutton_F0_Straight'
765 VSData.vars.F0algorithm = 'F0 (Straight)';
766 case 'radiobutton_F0_Snack'
767 VSData.vars.F0algorithm = 'F0 (Snack)';
768 case 'radiobutton_F0_Praat'
769 VSData.vars.F0algorithm = 'F0 (Praat)';
770 case 'radiobutton_F0_Other'
771 VSData.vars.F0algorithm = 'F0 (Other)';
772 otherwise
773 end
774 guidata(handles.VSHandle, VSData);
775
776
777
778 % --- Executes on button press in pushbutton_Exit.
779 function pushbutton_Exit_Callback(hObject, eventdata, handles)
780 % hObject handle to pushbutton_Exit (see GCBO)
781 % eventdata reserved - to be defined in a future version of MATLAB
782 % handles structure with handles and user data (see GUIDATA)
783
784 delete(gcf);
785
786
787 % --------------------------------------------------------------------
788 function menu_Settings_Callback(hObject, eventdata, handles)
789 % hObject handle to menu_Settings (see GCBO)
790 % eventdata reserved - to be defined in a future version of MATLAB
791 % handles structure with handles and user data (see GUIDATA)
792
793
794 % --------------------------------------------------------------------
795 function menu_Settings_Load_Callback(hObject, eventdata, handles)
796 % hObject handle to menu_Settings_Load (see GCBO)
797 % eventdata reserved - to be defined in a future version of MATLAB
798 % handles structure with handles and user data (see GUIDATA)
799 VSData = guidata(handles.VSHandle);
800 filename = uigetfile('*.mat', 'Select File to Load');
801
802 if (~ischar(filename))
803 return;
804 end
805
806 matdata = load(filename);
807 VSData.vars = matdata.settings;
808
809 % set the machine specific variables
810 if (ispc)
811 VSData.vars.dirdelimiter = '\';
812 else
813 VSData.vars.dirdelimiter = '/';
814 end
815
816 if (exist(VSData.vars.wavdir, 'dir') ~= 7)
817 VSData.vars.wavdir = ['.' vars.dirdelimiter];
818 end
819
820 if (exist(VSData.vars.matdir, 'dir') ~= 7)
821 VSData.vars.matdir = ['.' vars.dirdelimiter];
822 end
823
824 guidata(handles.VSHandle, VSData);
825 setGUIVariables(handles);
826
827
828 % --------------------------------------------------------------------
829 function menu_Settings_Save_Callback(hObject, eventdata, handles)
830 % hObject handle to menu_Settings_Save (see GCBO)
831 % eventdata reserved - to be defined in a future version of MATLAB
832 % handles structure with handles and user data (see GUIDATA)
833 VSData = guidata(handles.VSHandle);
834 VSData.vars.PE_showwaveformst = 0; % this is a special case
835 settings = VSData.vars;
836 [filename, pathname] = uiputfile('*.mat', 'Select File to Save');
837
838 if (~ischar(filename))
839 return;
840 end
841
842 save([pathname filename], 'settings');
843
844 helpdlg('Save complete.', 'Save');
845
846
847
848 function edit_EGGData_headers_Callback(hObject, eventdata, handles)
849 % hObject handle to edit_EGGData_headers (see GCBO)
850 % eventdata reserved - to be defined in a future version of MATLAB
851 % handles structure with handles and user data (see GUIDATA)
852
853 % Hints: get(hObject,'String') returns contents of edit_EGGData_headers as text
854 % str2double(get(hObject,'String')) returns contents of edit_EGGData_headers as a double
855 VSData = guidata(handles.VSHandle);
856
857 if (isempty(get(hObject, 'String')))
858 set(hObject, 'String', VSData.vars.EGGheaders); % this is the default, edit box cannot be empty
859 end
860
861 VSData.vars.EGGheaders = get(hObject, 'String');
862 guidata(handles.VSHandle, VSData);
863
864
865 % --- Executes during object creation, after setting all properties.
866 function edit_EGGData_headers_CreateFcn(hObject, eventdata, handles)
867 % hObject handle to edit_EGGData_headers (see GCBO)
868 % eventdata reserved - to be defined in a future version of MATLAB
869 % handles empty - handles not created until after all CreateFcns called
870
871 % Hint: edit controls usually have a white background on Windows.
872 % See ISPC and COMPUTER.
873 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
874 set(hObject,'BackgroundColor','white');
875 end
876
877
878
879 function edit_EGGData_timelabel_Callback(hObject, eventdata, handles)
880 % hObject handle to edit_EGGData_timelabel (see GCBO)
881 % eventdata reserved - to be defined in a future version of MATLAB
882 % handles structure with handles and user data (see GUIDATA)
883
884 % Hints: get(hObject,'String') returns contents of edit_EGGData_timelabel as text
885 % str2double(get(hObject,'String')) returns contents of edit_EGGData_timelabel as a double
886 VSData = guidata(handles.VSHandle);
887
888 if (isempty(get(hObject, 'String')))
889 set(hObject, 'String', VSData.vars.EGGtimelabel); % this is the default, edit box cannot be empty
890 end
891
892 VSData.vars.EGGtimelabel = get(hObject, 'String');
893 guidata(handles.VSHandle, VSData);
894
895
896 % --- Executes during object creation, after setting all properties.
897 function edit_EGGData_timelabel_CreateFcn(hObject, eventdata, handles)
898 % hObject handle to edit_EGGData_timelabel (see GCBO)
899 % eventdata reserved - to be defined in a future version of MATLAB
900 % handles empty - handles not created until after all CreateFcns called
901
902 % Hint: edit controls usually have a white background on Windows.
903 % See ISPC and COMPUTER.
904 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
905 set(hObject,'BackgroundColor','white');
906 end
907
908
909
910 function edit_Common_NaN_Callback(hObject, eventdata, handles)
911 % hObject handle to edit_Common_NaN (see GCBO)
912 % eventdata reserved - to be defined in a future version of MATLAB
913 % handles structure with handles and user data (see GUIDATA)
914
915 % Hints: get(hObject,'String') returns contents of edit_Common_NaN as text
916 % str2double(get(hObject,'String')) returns contents of edit_Common_NaN as a double
917 VSData = guidata(handles.VSHandle);
918 VSData.vars.NotANumber = get(hObject, 'String');
919 guidata(handles.VSHandle, VSData);
920
921 % --- Executes during object creation, after setting all properties.
922 function edit_Common_NaN_CreateFcn(hObject, eventdata, handles)
923 % hObject handle to edit_Common_NaN (see GCBO)
924 % eventdata reserved - to be defined in a future version of MATLAB
925 % handles empty - handles not created until after all CreateFcns called
926
927 % Hint: edit controls usually have a white background on Windows.
928 % See ISPC and COMPUTER.
929 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
930 set(hObject,'BackgroundColor','white');
931 end
932
933
934 % --- Executes on button press in checkbox_Common_linkmatdir.
935 function checkbox_Common_linkmatdir_Callback(hObject, eventdata, handles)
936 % hObject handle to checkbox_Common_linkmatdir (see GCBO)
937 % eventdata reserved - to be defined in a future version of MATLAB
938 % handles structure with handles and user data (see GUIDATA)
939
940 % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_linkmatdir
941 VSData = guidata(handles.VSHandle);
942 VSData.vars.linkmatdir = get(hObject, 'Value');
943 guidata(handles.VSHandle, VSData);
944
945
946 % --- Executes on button press in checkbox_Common_linkwavdir.
947 function checkbox_Common_linkwavdir_Callback(hObject, eventdata, handles)
948 % hObject handle to checkbox_Common_linkwavdir (see GCBO)
949 % eventdata reserved - to be defined in a future version of MATLAB
950 % handles structure with handles and user data (see GUIDATA)
951
952 % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_linkwavdir
953 VSData = guidata(handles.VSHandle);
954 VSData.vars.linkwavdir = get(hObject, 'Value');
955 guidata(handles.VSHandle, VSData);
956
957
958 % --- Executes on button press in checkbox_Common_recursedir.
959 function checkbox_Common_recursedir_Callback(hObject, eventdata, handles)
960 % hObject handle to checkbox_Common_recursedir (see GCBO)
961 % eventdata reserved - to be defined in a future version of MATLAB
962 % handles structure with handles and user data (see GUIDATA)
963
964 % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_recursedir
965 VSData = guidata(handles.VSHandle);
966 VSData.vars.recursedir = get(hObject, 'Value');
967 guidata(handles.VSHandle, VSData);
968
969
970
971 function edit_Outputs_smoothwinsize_Callback(hObject, eventdata, handles)
972 % hObject handle to edit_Outputs_smoothwinsize (see GCBO)
973 % eventdata reserved - to be defined in a future version of MATLAB
974 % handles structure with handles and user data (see GUIDATA)
975
976 VSData = guidata(handles.VSHandle);
977 num = str2double(get(hObject, 'String'));
978
979 if (~isnan(num))
980 num = round(num);
981 if (num >= 0) % 0 denotes no output smoothing
982 set(hObject, 'String', num2str(num));
983 VSData.vars.O_smoothwinsize = num;
984 guidata(handles.VSHandle, VSData);
985 else
986 set(hObject, 'String', num2str(vars.O_smoothwinsize));
987 end
988 else
989 set(hObject, 'String', num2str(vars.O_smoothwinsize));
990 end
991
992
993
994 % --- Executes during object creation, after setting all properties.
995 function edit_Outputs_smoothwinsize_CreateFcn(hObject, eventdata, handles)
996 % hObject handle to edit_Outputs_smoothwinsize (see GCBO)
997 % eventdata reserved - to be defined in a future version of MATLAB
998 % handles empty - handles not created until after all CreateFcns called
999
1000 % Hint: edit controls usually have a white background on Windows.
1001 % See ISPC and COMPUTER.
1002 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1003 set(hObject,'BackgroundColor','white');
1004 end
1005
1006
1007
1008 function edit_Input_searchstring_Callback(hObject, eventdata, handles)
1009 % hObject handle to edit_Input_searchstring (see GCBO)
1010 % eventdata reserved - to be defined in a future version of MATLAB
1011 % handles structure with handles and user data (see GUIDATA)
1012
1013 VSData = guidata(handles.VSHandle);
1014 str = get(hObject, 'String');
1015 if (isempty(str))
1016 set(hObject, 'String', VSData.vars.I_searchstring);
1017 else
1018 VSData.vars.I_searchstring = str;
1019 guidata(handles.VSHandle, VSData);
1020 end
1021
1022
1023
1024 % --- Executes during object creation, after setting all properties.
1025 function edit_Input_searchstring_CreateFcn(hObject, eventdata, handles)
1026 % hObject handle to edit_Input_searchstring (see GCBO)
1027 % eventdata reserved - to be defined in a future version of MATLAB
1028 % handles empty - handles not created until after all CreateFcns called
1029
1030 % Hint: edit controls usually have a white background on Windows.
1031 % See ISPC and COMPUTER.
1032 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1033 set(hObject,'BackgroundColor','white');
1034 end
1035
1036
1037
1038 % --- Executes on button press in pushbutton_Settings_Praat.
1039 function pushbutton_Settings_Praat_Callback(hObject, eventdata, handles)
1040 % hObject handle to pushbutton_Settings_Praat (see GCBO)
1041 % eventdata reserved - to be defined in a future version of MATLAB
1042 % handles structure with handles and user data (see GUIDATA)
1043 vs_Settings_Praat();
1044
1045
1046
1047 function edit_SHR_min_F0_Callback(hObject, eventdata, handles)
1048 % hObject handle to edit_SHR_min_F0 (see GCBO)
1049 % eventdata reserved - to be defined in a future version of MATLAB
1050 % handles structure with handles and user data (see GUIDATA)
1051
1052 % Hints: get(hObject,'String') returns contents of edit_SHR_min_F0 as text
1053 % str2double(get(hObject,'String')) returns contents of edit_SHR_min_F0 as a double
1054 VSData = guidata(handles.VSHandle);
1055 vars = VSData.vars;
1056 num = str2double(get(hObject, 'String'));
1057 if (isempty(num) || num < 0)
1058 set(hObject, 'String', num2str(vars.SHRmin));
1059 else
1060 VSData.vars.SHRmin = num;
1061 guidata(handles.VSHandle, VSData);
1062 set(hObject, 'String', num2str(num))
1063 end
1064
1065
1066 % --- Executes during object creation, after setting all properties.
1067 function edit_SHR_min_F0_CreateFcn(hObject, eventdata, handles)
1068 % hObject handle to edit_SHR_min_F0 (see GCBO)
1069 % eventdata reserved - to be defined in a future version of MATLAB
1070 % handles empty - handles not created until after all CreateFcns called
1071
1072 % Hint: edit controls usually have a white background on Windows.
1073 % See ISPC and COMPUTER.
1074 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1075 set(hObject,'BackgroundColor','white');
1076 end
1077
1078
1079
1080 function edit_SHR_max_F0_Callback(hObject, eventdata, handles)
1081 % hObject handle to edit_SHR_max_F0 (see GCBO)
1082 % eventdata reserved - to be defined in a future version of MATLAB
1083 % handles structure with handles and user data (see GUIDATA)
1084
1085 % Hints: get(hObject,'String') returns contents of edit_SHR_max_F0 as text
1086 % str2double(get(hObject,'String')) returns contents of edit_SHR_max_F0 as a double
1087 VSData = guidata(handles.VSHandle);
1088 vars = VSData.vars;
1089 num = str2double(get(hObject, 'String'));
1090 if (isempty(num) || num < 0)
1091 set(hObject, 'String', num2str(vars.SHRmax));
1092 else
1093 VSData.vars.SHRmax = num;
1094 guidata(handles.VSHandle, VSData);
1095 set(hObject, 'String', num2str(num))
1096 end
1097
1098
1099 % --- Executes during object creation, after setting all properties.
1100 function edit_SHR_max_F0_CreateFcn(hObject, eventdata, handles)
1101 % hObject handle to edit_SHR_max_F0 (see GCBO)
1102 % eventdata reserved - to be defined in a future version of MATLAB
1103 % handles empty - handles not created until after all CreateFcns called
1104
1105 % Hint: edit controls usually have a white background on Windows.
1106 % See ISPC and COMPUTER.
1107 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1108 set(hObject,'BackgroundColor','white');
1109 end
1110
1111
1112
1113 function edit_SHR_threshold_Callback(hObject, eventdata, handles)
1114 % hObject handle to edit_SHR_threshold (see GCBO)
1115 % eventdata reserved - to be defined in a future version of MATLAB
1116 % handles structure with handles and user data (see GUIDATA)
1117
1118 % Hints: get(hObject,'String') returns contents of edit_SHR_threshold as text
1119 % str2double(get(hObject,'String')) returns contents of edit_SHR_threshold as a double
1120 VSData = guidata(handles.VSHandle);
1121 vars = VSData.vars;
1122 num = str2double(get(hObject, 'String'));
1123 if (isempty(num) || num < 0)
1124 set(hObject, 'String', num2str(vars.SHRThreshold));
1125 else
1126 VSData.vars.SHRThreshold = num;
1127 guidata(handles.VSHandle, VSData);
1128 set(hObject, 'String', num2str(num))
1129 end
1130
1131
1132 % --- Executes during object creation, after setting all properties.
1133 function edit_SHR_threshold_CreateFcn(hObject, eventdata, handles)
1134 % hObject handle to edit_SHR_threshold (see GCBO)
1135 % eventdata reserved - to be defined in a future version of MATLAB
1136 % handles empty - handles not created until after all CreateFcns called
1137
1138 % Hint: edit controls usually have a white background on Windows.
1139 % See ISPC and COMPUTER.
1140 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1141 set(hObject,'BackgroundColor','white');
1142 end
1143
1144
1145
1146 function edit_Common_Nperiods_Callback(hObject, eventdata, handles)
1147 % hObject handle to edit_Common_Nperiods (see GCBO)
1148 % eventdata reserved - to be defined in a future version of MATLAB
1149 % handles structure with handles and user data (see GUIDATA)
1150
1151 % Hints: get(hObject,'String') returns contents of edit_Common_Nperiods as text
1152 % str2double(get(hObject,'String')) returns contents of edit_Common_Nperiods as a double
1153 VSData = guidata(handles.VSHandle);
1154 vars = VSData.vars;
1155 num = str2double(get(hObject, 'String'));
1156 if (isempty(num) || round(num) < 0)
1157 set(hObject, 'String', num2str(vars.Nperiods));
1158 else
1159 VSData.vars.Nperiods = round(num);
1160 guidata(handles.VSHandle, VSData);
1161 set(hObject, 'String', num2str(round(num)))
1162 end
1163
1164
1165 % --- Executes during object creation, after setting all properties.
1166 function edit_Common_Nperiods_CreateFcn(hObject, eventdata, handles)
1167 % hObject handle to edit_Common_Nperiods (see GCBO)
1168 % eventdata reserved - to be defined in a future version of MATLAB
1169 % handles empty - handles not created until after all CreateFcns called
1170
1171 % Hint: edit controls usually have a white background on Windows.
1172 % See ISPC and COMPUTER.
1173 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1174 set(hObject,'BackgroundColor','white');
1175 end
1176
1177
1178
1179 function edit_Common_Nperiods_EC_Callback(hObject, eventdata, handles)
1180 % hObject handle to edit_Common_Nperiods_EC (see GCBO)
1181 % eventdata reserved - to be defined in a future version of MATLAB
1182 % handles structure with handles and user data (see GUIDATA)
1183
1184 % Hints: get(hObject,'String') returns contents of edit_Common_Nperiods_EC as text
1185 % str2double(get(hObject,'String')) returns contents of edit_Common_Nperiods_EC as a double
1186 VSData = guidata(handles.VSHandle);
1187 vars = VSData.vars;
1188 num = str2double(get(hObject, 'String'));
1189 if (isempty(num) || round(num) < 0)
1190 set(hObject, 'String', num2str(vars.Nperiods_EC));
1191 else
1192 VSData.vars.Nperiods_EC = round(num);
1193 guidata(handles.VSHandle, VSData);
1194 set(hObject, 'String', num2str(round(num)))
1195 end
1196
1197
1198 % --- Executes during object creation, after setting all properties.
1199 function edit_Common_Nperiods_EC_CreateFcn(hObject, eventdata, handles)
1200 % hObject handle to edit_Common_Nperiods_EC (see GCBO)
1201 % eventdata reserved - to be defined in a future version of MATLAB
1202 % handles empty - handles not created until after all CreateFcns called
1203
1204 % Hint: edit controls usually have a white background on Windows.
1205 % See ISPC and COMPUTER.
1206 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1207 set(hObject,'BackgroundColor','white');
1208 end