comparison src/matlab/nimfks.m @ 0:c52bc3e8d3ad tip

user: boblsturm branch 'default' added README.md added assets/.DS_Store added assets/playButton.jpg added assets/stopButton.png added assets/swapButton.jpg added data/.DS_Store added data/fiveoctaves.mp3 added data/glock2.wav added data/sinScale.mp3 added data/speech_female.mp3 added data/sweep.wav added nimfks.m.lnk added src/.DS_Store added src/matlab/.DS_Store added src/matlab/AnalysisCache.m added src/matlab/CSS.m added src/matlab/DataHash.m added src/matlab/ExistsInCache.m added src/matlab/KLDivCost.m added src/matlab/LoadFromCache.m added src/matlab/SA_B_NMF.m added src/matlab/SaveInCache.m added src/matlab/Sound.m added src/matlab/SynthesisCache.m added src/matlab/chromagram_E.m added src/matlab/chromagram_IF.m added src/matlab/chromagram_P.m added src/matlab/chromsynth.m added src/matlab/computeSTFTFeat.m added src/matlab/controller.m added src/matlab/decibelSliderReleaseCallback.m added src/matlab/drawClickCallBack.m added src/matlab/fft2chromamx.m added src/matlab/hz2octs.m added src/matlab/ifgram.m added src/matlab/ifptrack.m added src/matlab/istft.m added src/matlab/nimfks.fig added src/matlab/nimfks.m added src/matlab/nmfFn.m added src/matlab/nmf_beta.m added src/matlab/nmf_divergence.m added src/matlab/nmf_euclidean.m added src/matlab/prune_corpus.m added src/matlab/rot_kernel.m added src/matlab/templateAdditionResynth.m added src/matlab/templateDelCb.m added src/matlab/templateScrollCb.m
author boblsturm
date Sun, 18 Jun 2017 06:26:13 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c52bc3e8d3ad
1 function varargout = nimfks(varargin)
2 % nimfks MATLAB code for nimfks.fig
3 % nimfks, by itself, creates a new nimfks or raises the existing
4 % singleton*.
5 %
6 % H = nimfks returns the handle to a new nimfks or the handle to
7 % the existing singleton*.
8 %
9 % nimfks('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in nimfks.M with the given input arguments.
11 %
12 % nimfks('Property','Value',...) creates a new nimfks or raises the
13 % existing singleton*. Starting from the left, property value pairs are
14 % applied to the nimfks before nimfks_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to nimfks_OpeningFcn via varargin.
17 %
18 % *See nimfks Options on GUIDE's Tools menu. Choose "nimfks 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 nimfks
24
25 % Last Modified by GUIDE v2.5 22-Apr-2017 18:29:19
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', @nimfks_OpeningFcn, ...
32 'gui_OutputFcn', @nimfks_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 nimfks is made visible.
48 function nimfks_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 nimfks (see VARARGIN)
54
55 set(gcf, 'units', 'normalized', 'position', [0.1 0.1 0.8 0.85])
56 %Place "playback" symbol onto buttons
57 [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'playButton.jpg']);
58
59 % [pathstr, ~, ~] = fileparts(pwd);
60 % addpath(genpath(strcat(pathstr, '/MFAMC', '/assets')));
61 % [a,map]=imread('playButton.jpg');
62
63 [r,c,d]=size(a);
64 x=ceil(r/30);
65 y=ceil(c/30);
66 g=a(1:x:end,1:y:end,:);
67 g(g==255)=5.5*255;
68 set(handles.btn_play_2,'CData',g);
69 set(handles.btn_play_3,'CData',g);
70
71 [swapButtonImg,swapBtnMap]=imread(['..' filesep '..' filesep 'assets' filesep 'swapButton.jpg']);
72 [r,c,d]=size(swapButtonImg);
73 x=ceil(r/20);
74 y=ceil(c/20);
75 g=swapButtonImg(1:x:end,1:y:end,:);
76 g(g==255)=5.5*255;
77 set(handles.btn_soundswap,'CData',g);
78
79 %Set resynthesis file explorer and restriction parameters to invisible
80 set([handles.pnl_activation_sketching, handles.edt_mod_rep, handles.edt_mod_poly, handles.edt_mod_cont, ...
81 handles.draw_activations, handles.delete_activations, handles.template_manipulation_tool, handles.btn_play_3, ...
82 handles.tbl_plotdata, handles.btn_synthesis, handles.btn_play_2, handles.pop_pattern, handles.txt_pattern],'Visible','off');
83
84 %Initialize parameters
85 set(handles.edt_winlen,'String','100'); %Window length
86 set(handles.edt_overlap,'String','50'); %Overlap
87 % set(handles.edt_sndlen,'String','5'); %Length of synthesis
88 set(handles.edt_iter,'String','10'); %NNMF Iterations
89 set(handles.edt_rand,'String','0'); %NNMF Activations Random Seed
90 set(handles.edt_conv,'String','0'); %NNMF Convergence Criteria
91 set(handles.edt_mod_rep,'String','-1'); %Repitition restriction parameter
92 set(handles.edt_mod_poly,'String','-1'); %Polyphony restriction parameter
93 set(handles.edt_mod_cont,'String','-1'); %Continuity enhancement parameter
94 set(handles.edt_sparse_lambda,'String','5'); %Lambda (regularizer) for sparse NMF
95 set(handles.edt_prune,'String','0'); %Pruning parameter
96
97 % fig=gcf;
98 % set(findall(fig,'-property','FontSize'),'FontSize',11)
99
100 % if( strcmp(get(handles.tool_menu_dev_cacheEnable, 'Checked'), 'on') && ~exist('nimfks_cache.mat','file') )
101 if( ~exist('nimfks_cache.mat','file') )
102 AnalysisCacheMap = struct();
103 SynthesisCacheMap = struct();
104 save('nimfks_cache.mat', 'SynthesisCacheMap', 'AnalysisCacheMap');
105 end
106
107 % Choose default command line output for nimfks
108 handles.output = hObject;
109
110 % Update handles structure
111 guidata(hObject, handles);
112
113 % UIWAIT makes nimfks wait for user response (see UIRESUME)
114 % uiwait(handles.figure1);
115
116
117 % --- Outputs from this function are returned to the command line.
118 function varargout = nimfks_OutputFcn(hObject, eventdata, handles)
119 % varargout cell array for returning output args (see VARARGOUT);
120 % hObject handle to figure
121 % eventdata reserved - to be defined in a future version of MATLAB
122 % handles structure with handles and user data (see GUIDATA)
123
124 % Get default command line output from handles structure
125 varargout{1} = handles.output;
126
127
128 % --- Executes on button press in pushbutton1.
129 function pushbutton1_Callback(hObject, eventdata, handles)
130 % hObject handle to pushbutton1 (see GCBO)
131 % eventdata reserved - to be defined in a future version of MATLAB
132 % handles structure with handles and user data (see GUIDATA)
133
134 InterfaceObj=findobj(handles.figure1,'Enable','on');
135 set(InterfaceObj,'Enable','off');
136 % SynthesisCtr('verifyParams', handles);
137
138 waitbarHandle = waitbar(0, 'Starting Synthesis...');
139 handles.waitbarHandle = waitbarHandle;
140 guidata(hObject, handles);
141
142 if(strcmp(get(handles.tool_menu_dev_timer, 'Checked'), 'on'))
143 tic
144 SynthesisCtr('run', handles);
145 toc
146 else
147 SynthesisCtr('run', handles);
148 end
149
150 set(InterfaceObj,'Enable','on');
151 % guidata(gcf, handles);
152
153 % enableReplay handles;
154 set([handles.pushbutton18 handles.text8 handles.text26],'Visible','on')
155 SynthesisCtr('configPlotlist', handles);
156 SynthesisCtr('openResynthesis', handles);
157
158 if(strcmp(get(handles.tool_menu_dev_exportWorkspace, 'Checked'), 'on'))
159 synthObj = handles.SynthesisObject;
160 save('synth.mat','synthObj');
161 end
162
163 close(waitbarHandle)
164
165
166 % --- Executes on button press in pushbutton2.
167 function pushbutton2_Callback(hObject, eventdata, handles)
168 % hObject handle to pushbutton2 (see GCBO)
169 % eventdata reserved - to be defined in a future version of MATLAB
170 % handles structure with handles and user data (see GUIDATA)
171 originalGui = ancestor(hObject, 'figure');
172 delete(originalGui);
173 GUI;
174
175 % --- Executes on button press in pushbutton3.
176 function pushbutton3_Callback(hObject, eventdata, handles)
177 % hObject handle to pushbutton3 (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
182 % --- Executes on selection change in listbox1.
183 function listbox1_Callback(hObject, eventdata, handles)
184 % hObject handle to listbox1 (see GCBO)
185 % eventdata reserved - to be defined in a future version of MATLAB
186 % handles structure with handles and user data (see GUIDATA)
187 SynthesisCtr('switchPlot', handles);
188 % Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array
189 % contents{get(hObject,'Value')} returns selected item from listbox1
190
191
192 % --- Executes during object creation, after setting all properties.
193 function listbox1_CreateFcn(hObject, eventdata, handles)
194 % hObject handle to listbox1 (see GCBO)
195 % eventdata reserved - to be defined in a future version of MATLAB
196 % handles empty - handles not created until after all CreateFcns called
197
198 % Hint: listbox controls usually have a white background on Windows.
199 % See ISPC and COMPUTER.
200 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
201 set(hObject,'BackgroundColor','white');
202 end
203
204
205 % --- Executes on button press in pushbutton11.
206 function pushbutton11_Callback(hObject, eventdata, handles)
207 % hObject handle to pushbutton11 (see GCBO)
208 % eventdata reserved - to be defined in a future version of MATLAB
209 % handles structure with handles and user data (see GUIDATA)
210 SynthesisCtr('playTarget', handles);
211
212
213 function edit5_Callback(hObject, eventdata, handles)
214 % hObject handle to text5 (see GCBO)
215 % eventdata reserved - to be defined in a future version of MATLAB
216 % handles structure with handles and user data (see GUIDATA)
217
218 % Hints: get(hObject,'String') returns contents of text5 as text
219 % str2double(get(hObject,'String')) returns contents of text5 as a double
220
221
222 % --- Executes during object creation, after setting all properties.
223 function text5_CreateFcn(hObject, eventdata, handles)
224 % hObject handle to text5 (see GCBO)
225 % eventdata reserved - to be defined in a future version of MATLAB
226 % handles empty - handles not created until after all CreateFcns called
227
228 % Hint: edit controls usually have a white background on Windows.
229 % See ISPC and COMPUTER.
230 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
231 set(hObject,'BackgroundColor','white');
232 end
233
234
235 % --- Executes on button press in pushbutton15.
236 function pushbutton15_Callback(hObject, eventdata, handles)
237 % hObject handle to pushbutton15 (see GCBO)
238 % eventdata reserved - to be defined in a future version of MATLAB
239 % handles structure with handles and user data (see GUIDATA)
240 SynthesisCtr('playSource', handles);
241
242
243 function edit7_Callback(hObject, eventdata, handles)
244 % hObject handle to text7 (see GCBO)
245 % eventdata reserved - to be defined in a future version of MATLAB
246 % handles structure with handles and user data (see GUIDATA)
247
248 % Hints: get(hObject,'String') returns contents of text7 as text
249 % str2double(get(hObject,'String')) returns contents of text7 as a double
250
251
252 % --- Executes during object creation, after setting all properties.
253 function text7_CreateFcn(hObject, eventdata, handles)
254 % hObject handle to text7 (see GCBO)
255 % eventdata reserved - to be defined in a future version of MATLAB
256 % handles empty - handles not created until after all CreateFcns called
257
258 % Hint: edit controls usually have a white background on Windows.
259 % See ISPC and COMPUTER.
260 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
261 set(hObject,'BackgroundColor','white');
262 end
263
264
265 % --- Executes on button press in pushbutton16.
266 function pushbutton16_Callback(hObject, eventdata, handles)
267 % hObject handle to pushbutton16 (see GCBO)
268 % eventdata reserved - to be defined in a future version of MATLAB
269 % handles structure with handles and user data (see GUIDATA)
270 SynthesisCtr('openSource', handles);
271
272
273
274 % --- Executes on button press in pushbutton18.
275 function pushbutton18_Callback(hObject, eventdata, handles)
276 % hObject handle to pushbutton18 (see GCBO)
277 % eventdata reserved - to be defined in a future version of MATLAB
278 % handles structure with handles and user data (see GUIDATA)
279 SynthesisCtr('playResynthesis', handles);
280
281
282 function edit8_Callback(hObject, eventdata, handles)
283 % hObject handle to text8 (see GCBO)
284 % eventdata reserved - to be defined in a future version of MATLAB
285 % handles structure with handles and user data (see GUIDATA)
286
287 % Hints: get(hObject,'String') returns contents of text8 as text
288 % str2double(get(hObject,'String')) returns contents of text8 as a double
289
290
291 % --- Executes during object creation, after setting all properties.
292 function text8_CreateFcn(hObject, eventdata, handles)
293 % hObject handle to text8 (see GCBO)
294 % eventdata reserved - to be defined in a future version of MATLAB
295 % handles empty - handles not created until after all CreateFcns called
296
297 % Hint: edit controls usually have a white background on Windows.
298 % See ISPC and COMPUTER.
299 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
300 set(hObject,'BackgroundColor','white');
301 end
302
303
304
305 function edit9_Callback(hObject, eventdata, handles)
306 % hObject handle to edit9 (see GCBO)
307 % eventdata reserved - to be defined in a future version of MATLAB
308 % handles structure with handles and user data (see GUIDATA)
309
310 % Hints: get(hObject,'String') returns contents of edit9 as text
311 % str2double(get(hObject,'String')) returns contents of edit9 as a double
312
313
314 % --- Executes during object creation, after setting all properties.
315 function edit9_CreateFcn(hObject, eventdata, handles)
316 % hObject handle to edit9 (see GCBO)
317 % eventdata reserved - to be defined in a future version of MATLAB
318 % handles empty - handles not created until after all CreateFcns called
319
320 % Hint: edit controls usually have a white background on Windows.
321 % See ISPC and COMPUTER.
322 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
323 set(hObject,'BackgroundColor','white');
324 end
325
326
327
328 function edit10_Callback(hObject, eventdata, handles)
329 % hObject handle to edit10 (see GCBO)
330 % eventdata reserved - to be defined in a future version of MATLAB
331 % handles structure with handles and user data (see GUIDATA)
332
333 % Hints: get(hObject,'String') returns contents of edit10 as text
334 % str2double(get(hObject,'String')) returns contents of edit10 as a double
335
336
337 % --- Executes during object creation, after setting all properties.
338 function edit10_CreateFcn(hObject, eventdata, handles)
339 % hObject handle to edit10 (see GCBO)
340 % eventdata reserved - to be defined in a future version of MATLAB
341 % handles empty - handles not created until after all CreateFcns called
342
343 % Hint: edit controls usually have a white background on Windows.
344 % See ISPC and COMPUTER.
345 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
346 set(hObject,'BackgroundColor','white');
347 end
348
349
350
351 function edit11_Callback(hObject, eventdata, handles)
352 % hObject handle to edit11 (see GCBO)
353 % eventdata reserved - to be defined in a future version of MATLAB
354 % handles structure with handles and user data (see GUIDATA)
355
356 % Hints: get(hObject,'String') returns contents of edit11 as text
357 % str2double(get(hObject,'String')) returns contents of edit11 as a double
358
359
360 % --- Executes during object creation, after setting all properties.
361 function edit11_CreateFcn(hObject, eventdata, handles)
362 % hObject handle to edit11 (see GCBO)
363 % eventdata reserved - to be defined in a future version of MATLAB
364 % handles empty - handles not created until after all CreateFcns called
365
366 % Hint: edit controls usually have a white background on Windows.
367 % See ISPC and COMPUTER.
368 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
369 set(hObject,'BackgroundColor','white');
370 end
371
372
373 % --- Executes on selection change in popupmenu1.
374 function popupmenu1_Callback(hObject, eventdata, handles)
375 % hObject handle to popupmenu1 (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 % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array
380 % contents{get(hObject,'Value')} returns selected item from popupmenu1
381
382
383 % --- Executes during object creation, after setting all properties.
384 function popupmenu1_CreateFcn(hObject, eventdata, handles)
385 % hObject handle to popupmenu1 (see GCBO)
386 % eventdata reserved - to be defined in a future version of MATLAB
387 % handles empty - handles not created until after all CreateFcns called
388
389 % Hint: popupmenu controls usually have a white background on Windows.
390 % See ISPC and COMPUTER.
391 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
392 set(hObject,'BackgroundColor','white');
393 end
394
395
396 % --- Executes on selection change in popupmenu2.
397 function popupmenu2_Callback(hObject, eventdata, handles)
398 % hObject handle to popupmenu2 (see GCBO)
399 % eventdata reserved - to be defined in a future version of MATLAB
400 % handles structure with handles and user data (see GUIDATA)
401
402 % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu2 contents as cell array
403 % contents{get(hObject,'Value')} returns selected item from popupmenu2
404
405
406 % --- Executes during object creation, after setting all properties.
407 function popupmenu2_CreateFcn(hObject, eventdata, handles)
408 % hObject handle to popupmenu2 (see GCBO)
409 % eventdata reserved - to be defined in a future version of MATLAB
410 % handles empty - handles not created until after all CreateFcns called
411
412 % Hint: popupmenu controls usually have a white background on Windows.
413 % See ISPC and COMPUTER.
414 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
415 set(hObject,'BackgroundColor','white');
416 end
417
418
419 % --- Executes on selection change in popupmenu3.
420 function popupmenu3_Callback(hObject, eventdata, handles)
421 % hObject handle to popupmenu3 (see GCBO)
422 % eventdata reserved - to be defined in a future version of MATLAB
423 % handles structure with handles and user data (see GUIDATA)
424
425 % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu3 contents as cell array
426 % contents{get(hObject,'Value')} returns selected item from popupmenu3
427
428
429 % --- Executes during object creation, after setting all properties.
430 function popupmenu3_CreateFcn(hObject, eventdata, handles)
431 % hObject handle to popupmenu3 (see GCBO)
432 % eventdata reserved - to be defined in a future version of MATLAB
433 % handles empty - handles not created until after all CreateFcns called
434
435 % Hint: popupmenu controls usually have a white background on Windows.
436 % See ISPC and COMPUTER.
437 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
438 set(hObject,'BackgroundColor','white');
439 end
440
441
442 % --- Executes on selection change in popupmenu4.
443 function popupmenu4_Callback(hObject, eventdata, handles)
444 % hObject handle to popupmenu4 (see GCBO)
445 % eventdata reserved - to be defined in a future version of MATLAB
446 % handles structure with handles and user data (see GUIDATA)
447
448 % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu4 contents as cell array
449 % contents{get(hObject,'Value')} returns selected item from popupmenu4
450
451
452 % --- Executes during object creation, after setting all properties.
453 function popupmenu4_CreateFcn(hObject, eventdata, handles)
454 % hObject handle to popupmenu4 (see GCBO)
455 % eventdata reserved - to be defined in a future version of MATLAB
456 % handles empty - handles not created until after all CreateFcns called
457
458 % Hint: popupmenu controls usually have a white background on Windows.
459 % See ISPC and COMPUTER.
460 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
461 set(hObject,'BackgroundColor','white');
462 end
463
464
465 % --- Executes on button press in checkbox1.
466 function checkbox1_Callback(hObject, eventdata, handles)
467 % hObject handle to checkbox1 (see GCBO)
468 % eventdata reserved - to be defined in a future version of MATLAB
469 % handles structure with handles and user data (see GUIDATA)
470
471 % Hint: get(hObject,'Value') returns toggle state of checkbox1
472
473
474 % --- Executes on button press in checkbox2.
475 function checkbox2_Callback(hObject, eventdata, handles)
476 % hObject handle to checkbox2 (see GCBO)
477 % eventdata reserved - to be defined in a future version of MATLAB
478 % handles structure with handles and user data (see GUIDATA)
479
480 % Hint: get(hObject,'Value') returns toggle state of checkbox2
481
482
483 % --- Executes on button press in checkbox3.
484 function checkbox3_Callback(hObject, eventdata, handles)
485 % hObject handle to checkbox3 (see GCBO)
486 % eventdata reserved - to be defined in a future version of MATLAB
487 % handles structure with handles and user data (see GUIDATA)
488
489 % Hint: get(hObject,'Value') returns toggle state of checkbox3
490
491
492 % --- Executes on button press in checkbox4.
493 function checkbox4_Callback(hObject, eventdata, handles)
494 % hObject handle to checkbox4 (see GCBO)
495 % eventdata reserved - to be defined in a future version of MATLAB
496 % handles structure with handles and user data (see GUIDATA)
497
498 % Hint: get(hObject,'Value') returns toggle state of checkbox4
499
500
501 % --- Executes on button press in checkbox5.
502 function checkbox5_Callback(hObject, eventdata, handles)
503 % hObject handle to checkbox5 (see GCBO)
504 % eventdata reserved - to be defined in a future version of MATLAB
505 % handles structure with handles and user data (see GUIDATA)
506
507 % Hint: get(hObject,'Value') returns toggle state of checkbox5
508
509
510 % --- Executes on button press in checkbox6.
511 function checkbox6_Callback(hObject, eventdata, handles)
512 % hObject handle to checkbox6 (see GCBO)
513 % eventdata reserved - to be defined in a future version of MATLAB
514 % handles structure with handles and user data (see GUIDATA)
515
516 % Hint: get(hObject,'Value') returns toggle state of checkbox6
517
518
519
520 function edit12_Callback(hObject, eventdata, handles)
521 % hObject handle to edit12 (see GCBO)
522 % eventdata reserved - to be defined in a future version of MATLAB
523 % handles structure with handles and user data (see GUIDATA)
524
525 % Hints: get(hObject,'String') returns contents of edit12 as text
526 % str2double(get(hObject,'String')) returns contents of edit12 as a double
527
528
529 % --- Executes during object creation, after setting all properties.
530 function edit12_CreateFcn(hObject, eventdata, handles)
531 % hObject handle to edit12 (see GCBO)
532 % eventdata reserved - to be defined in a future version of MATLAB
533 % handles empty - handles not created until after all CreateFcns called
534
535 % Hint: edit controls usually have a white background on Windows.
536 % See ISPC and COMPUTER.
537 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
538 set(hObject,'BackgroundColor','white');
539 end
540
541
542
543 function edit13_Callback(hObject, eventdata, handles)
544 % hObject handle to edit13 (see GCBO)
545 % eventdata reserved - to be defined in a future version of MATLAB
546 % handles structure with handles and user data (see GUIDATA)
547
548 % Hints: get(hObject,'String') returns contents of edit13 as text
549 % str2double(get(hObject,'String')) returns contents of edit13 as a double
550
551
552 % --- Executes during object creation, after setting all properties.
553 function edit13_CreateFcn(hObject, eventdata, handles)
554 % hObject handle to edit13 (see GCBO)
555 % eventdata reserved - to be defined in a future version of MATLAB
556 % handles empty - handles not created until after all CreateFcns called
557
558 % Hint: edit controls usually have a white background on Windows.
559 % See ISPC and COMPUTER.
560 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
561 set(hObject,'BackgroundColor','white');
562 end
563
564
565
566 function edit14_Callback(hObject, eventdata, handles)
567 % hObject handle to edit14 (see GCBO)
568 % eventdata reserved - to be defined in a future version of MATLAB
569 % handles structure with handles and user data (see GUIDATA)
570
571 % Hints: get(hObject,'String') returns contents of edit14 as text
572 % str2double(get(hObject,'String')) returns contents of edit14 as a double
573
574
575 % --- Executes during object creation, after setting all properties.
576 function edit14_CreateFcn(hObject, eventdata, handles)
577 % hObject handle to edit14 (see GCBO)
578 % eventdata reserved - to be defined in a future version of MATLAB
579 % handles empty - handles not created until after all CreateFcns called
580
581 % Hint: edit controls usually have a white background on Windows.
582 % See ISPC and COMPUTER.
583 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
584 set(hObject,'BackgroundColor','white');
585 end
586
587
588 % --- Executes on button press in checkbox7.
589 function checkbox7_Callback(hObject, eventdata, handles)
590 % hObject handle to checkbox7 (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 % Hint: get(hObject,'Value') returns toggle state of checkbox7
595 if(get(hObject, 'Value'))
596 set(handles.edit19,'Visible','on')
597 else
598 set(handles.edit19,'Visible','off')
599 end
600
601 % --- Executes on button press in checkbox9.
602 function checkbox8_Callback(hObject, eventdata, handles)
603 % hObject handle to checkbox9 (see GCBO)
604 % eventdata reserved - to be defined in a future version of MATLAB
605 % handles structure with handles and user data (see GUIDATA)
606
607 % Hint: get(hObject,'Value') returns toggle state of checkbox9
608 if(get(hObject, 'Value'))
609 set(handles.edit20,'Visible','on')
610 else
611 set(handles.edit20,'Visible','off')
612 end
613
614 % --- Executes on button press in checkbox9.
615 function checkbox9_Callback(hObject, eventdata, handles)
616 % hObject handle to checkbox9 (see GCBO)
617 % eventdata reserved - to be defined in a future version of MATLAB
618 % handles structure with handles and user data (see GUIDATA)
619
620 % Hint: get(hObject,'Value') returns toggle state of checkbox9
621 if(get(hObject, 'Value'))
622 set(handles.edit21,'Visible','on')
623 else
624 set(handles.edit21,'Visible','off')
625 end
626
627 function edit15_Callback(hObject, eventdata, handles)
628 % hObject handle to edit15 (see GCBO)
629 % eventdata reserved - to be defined in a future version of MATLAB
630 % handles structure with handles and user data (see GUIDATA)
631
632 % Hints: get(hObject,'String') returns contents of edit15 as text
633 % str2double(get(hObject,'String')) returns contents of edit15 as a double
634
635
636 % --- Executes during object creation, after setting all properties.
637 function edit15_CreateFcn(hObject, eventdata, handles)
638 % hObject handle to edit15 (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 checkbox7.
650 function checkbox10_Callback(hObject, eventdata, handles)
651 % hObject handle to checkbox7 (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 % Hint: get(hObject,'Value') returns toggle state of checkbox7
656
657
658 % --- Executes on button press in checkbox9.
659 function checkbox11_Callback(hObject, eventdata, handles)
660 % hObject handle to checkbox9 (see GCBO)
661 % eventdata reserved - to be defined in a future version of MATLAB
662 % handles structure with handles and user data (see GUIDATA)
663
664 % Hint: get(hObject,'Value') returns toggle state of checkbox9
665
666
667 % --- Executes on button press in checkbox12.
668 function checkbox12_Callback(hObject, eventdata, handles)
669 % hObject handle to checkbox12 (see GCBO)
670 % eventdata reserved - to be defined in a future version of MATLAB
671 % handles structure with handles and user data (see GUIDATA)
672
673 % Hint: get(hObject,'Value') returns toggle state of checkbox12
674
675
676 % --- Executes when entered data in editable cell(s) in uitable3.
677 function uitable3_CellEditCallback(hObject, eventdata, handles)
678 % hObject handle to uitable3 (see GCBO)
679 % eventdata structure with the following fields (see MATLAB.UI.CONTROL.TABLE)
680 % Indices: row and column indices of the cell(s) edited
681 % PreviousData: previous data for the cell(s) edited
682 % EditData: string(s) entered by the user
683 % NewData: EditData or its converted form set on the Data property. Empty if Data was not changed
684 % Error: error string when failed to convert EditData to appropriate value for Data
685 % handles structure with handles and user data (see GUIDATA)
686
687
688 % --- Executes during object creation, after setting all properties.
689 function uitable3_CreateFcn(hObject, eventdata, handles)
690 % hObject handle to uitable3 (see GCBO)
691 % eventdata reserved - to be defined in a future version of MATLAB
692 % handles empty - handles not created until after all CreateFcns called
693
694
695 % --- Executes on selection change in popupmenu5.
696 function popupmenu5_Callback(hObject, eventdata, handles)
697 % hObject handle to popupmenu5 (see GCBO)
698 % eventdata reserved - to be defined in a future version of MATLAB
699 % handles structure with handles and user data (see GUIDATA)
700
701 % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu5 contents as cell array
702 % contents{get(hObject,'Value')} returns selected item from popupmenu5
703
704
705 % --- Executes during object creation, after setting all properties.
706 function popupmenu5_CreateFcn(hObject, eventdata, handles)
707 % hObject handle to popupmenu5 (see GCBO)
708 % eventdata reserved - to be defined in a future version of MATLAB
709 % handles empty - handles not created until after all CreateFcns called
710
711 % Hint: popupmenu controls usually have a white background on Windows.
712 % See ISPC and COMPUTER.
713 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
714 set(hObject,'BackgroundColor','white');
715 end
716
717
718 % --------------------------------------------------------------------
719 function tool_menu_Callback(hObject, eventdata, handles)
720 % hObject handle to tool_menu (see GCBO)
721 % eventdata reserved - to be defined in a future version of MATLAB
722 % handles structure with handles and user data (see GUIDATA)
723
724
725 % --------------------------------------------------------------------
726 function tool_menu_dev_Callback(hObject, eventdata, handles)
727 % hObject handle to tool_menu_dev (see GCBO)
728 % eventdata reserved - to be defined in a future version of MATLAB
729 % handles structure with handles and user data (see GUIDATA)
730
731
732 % --------------------------------------------------------------------
733 function tool_menu_dev_timer_Callback(hObject, eventdata, handles)
734 % hObject handle to tool_menu_dev_timer (see GCBO)
735 % eventdata reserved - to be defined in a future version of MATLAB
736 % handles structure with handles and user data (see GUIDATA)
737 if strcmp(get(hObject,'Checked'),'on')
738 set(hObject,'Checked','off');
739 else
740 set(hObject,'Checked','on');
741 end
742
743
744 % --------------------------------------------------------------------
745 function tool_menu_dev_timer_ButtonDownFcn(hObject, eventdata, handles)
746 % hObject handle to tool_menu_dev_timer (see GCBO)
747 % eventdata reserved - to be defined in a future version of MATLAB
748 % handles structure with handles and user data (see GUIDATA)
749
750
751
752 function edit19_Callback(hObject, eventdata, handles)
753 % hObject handle to edit19 (see GCBO)
754 % eventdata reserved - to be defined in a future version of MATLAB
755 % handles structure with handles and user data (see GUIDATA)
756
757 % Hints: get(hObject,'String') returns contents of edit19 as text
758 % str2double(get(hObject,'String')) returns contents of edit19 as a double
759
760
761 % --- Executes during object creation, after setting all properties.
762 function edit19_CreateFcn(hObject, eventdata, handles)
763 % hObject handle to edit19 (see GCBO)
764 % eventdata reserved - to be defined in a future version of MATLAB
765 % handles empty - handles not created until after all CreateFcns called
766
767 % Hint: edit controls usually have a white background on Windows.
768 % See ISPC and COMPUTER.
769 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
770 set(hObject,'BackgroundColor','white');
771 end
772
773
774
775 function edit20_Callback(hObject, eventdata, handles)
776 % hObject handle to edit20 (see GCBO)
777 % eventdata reserved - to be defined in a future version of MATLAB
778 % handles structure with handles and user data (see GUIDATA)
779
780 % Hints: get(hObject,'String') returns contents of edit20 as text
781 % str2double(get(hObject,'String')) returns contents of edit20 as a double
782
783
784 % --- Executes during object creation, after setting all properties.
785 function edit20_CreateFcn(hObject, eventdata, handles)
786 % hObject handle to edit20 (see GCBO)
787 % eventdata reserved - to be defined in a future version of MATLAB
788 % handles empty - handles not created until after all CreateFcns called
789
790 % Hint: edit controls usually have a white background on Windows.
791 % See ISPC and COMPUTER.
792 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
793 set(hObject,'BackgroundColor','white');
794 end
795
796
797
798 function edit21_Callback(hObject, eventdata, handles)
799 % hObject handle to edit21 (see GCBO)
800 % eventdata reserved - to be defined in a future version of MATLAB
801 % handles structure with handles and user data (see GUIDATA)
802
803 % Hints: get(hObject,'String') returns contents of edit21 as text
804 % str2double(get(hObject,'String')) returns contents of edit21 as a double
805
806
807 % --- Executes during object creation, after setting all properties.
808 function edit21_CreateFcn(hObject, eventdata, handles)
809 % hObject handle to edit21 (see GCBO)
810 % eventdata reserved - to be defined in a future version of MATLAB
811 % handles empty - handles not created until after all CreateFcns called
812
813 % Hint: edit controls usually have a white background on Windows.
814 % See ISPC and COMPUTER.
815 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
816 set(hObject,'BackgroundColor','white');
817 end
818
819
820 % --------------------------------------------------------------------
821 function file_menu_Callback(hObject, eventdata, handles)
822 % hObject handle to file_menu (see GCBO)
823 % eventdata reserved - to be defined in a future version of MATLAB
824 % handles structure with handles and user data (see GUIDATA)
825
826
827 % --------------------------------------------------------------------
828 function file_menu_export_Callback(hObject, eventdata, handles)
829 % hObject handle to file_menu_export (see GCBO)
830 % eventdata reserved - to be defined in a future version of MATLAB
831 % handles structure with handles and user data (see GUIDATA)
832 handles.Sound_synthesis.save_audio;
833
834 % --------------------------------------------------------------------
835 function uipushtool1_ClickedCallback(hObject, eventdata, handles)
836 % hObject handle to uipushtool1 (see GCBO)
837 % eventdata reserved - to be defined in a future version of MATLAB
838 % handles structure with handles and user data (see GUIDATA)
839 SynthesisCtr('savePlot', handles);
840
841
842 % --------------------------------------------------------------------
843 function file_menu_export_ButtonDownFcn(hObject, eventdata, handles)
844 % hObject handle to file_menu_export (see GCBO)
845 % eventdata reserved - to be defined in a future version of MATLAB
846 % handles structure with handles and user data (see GUIDATA)
847
848
849 % --------------------------------------------------------------------
850 function draw_activations_OnCallback(hObject, eventdata, handles)
851 % hObject handle to draw_activations (see GCBO)
852 % eventdata reserved - to be defined in a future version of MATLAB
853 % handles structure with handles and user data (see GUIDATA)
854 set(gcf,'WindowButtonDownFcn',{@drawClickCallBack, 'Draw'})
855
856
857 % --------------------------------------------------------------------
858 function draw_activations_OffCallback(hObject, eventdata, handles)
859 % hObject handle to draw_activations (see GCBO)
860 % eventdata reserved - to be defined in a future version of MATLAB
861 % handles structure with handles and user data (see GUIDATA)
862 set(gcf,'WindowButtonDownFcn','')
863
864
865 % --------------------------------------------------------------------
866 function delete_activations_OffCallback(hObject, eventdata, handles)
867 % hObject handle to delete_activations (see GCBO)
868 % eventdata reserved - to be defined in a future version of MATLAB
869 % handles structure with handles and user data (see GUIDATA)
870 set(gcf,'WindowButtonDownFcn','')
871
872
873 % --------------------------------------------------------------------
874 function delete_activations_OnCallback(hObject, eventdata, handles)
875 % hObject handle to delete_activations (see GCBO)
876 % eventdata reserved - to be defined in a future version of MATLAB
877 % handles structure with handles and user data (see GUIDATA)
878 set(gcf,'WindowButtonDownFcn',{@drawClickCallBack, 'Erase'})
879
880
881 % --- Executes on slider movement.
882 function slider3_Callback(hObject, eventdata, handles)
883 % hObject handle to slider3 (see GCBO)
884 % eventdata reserved - to be defined in a future version of MATLAB
885 % handles structure with handles and user data (see GUIDATA)
886
887 % Hints: get(hObject,'Value') returns position of slider
888 % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
889
890
891 % --- Executes during object creation, after setting all properties.
892 function slider3_CreateFcn(hObject, eventdata, handles)
893 % hObject handle to slider3 (see GCBO)
894 % eventdata reserved - to be defined in a future version of MATLAB
895 % handles empty - handles not created until after all CreateFcns called
896
897 % Hint: slider controls usually have a light gray background.
898 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
899 set(hObject,'BackgroundColor',[.9 .9 .9]);
900 end
901
902
903 % --- Executes on button press in pushbutton19.
904 function pushbutton19_Callback(hObject, eventdata, handles)
905 % hObject handle to pushbutton19 (see GCBO)
906 % eventdata reserved - to be defined in a future version of MATLAB
907 % handles structure with handles and user data (see GUIDATA)
908 controller('resynthesize', handles);
909
910 % --------------------------------------------------------------------
911 function draw_activations_ClickedCallback(hObject, eventdata, handles)
912 % hObject handle to draw_activations (see GCBO)
913 % eventdata reserved - to be defined in a future version of MATLAB
914 % handles structure with handles and user data (see GUIDATA)
915
916 % acts = handles.SynthesisObject.NNMFSynthesis.Activations;
917 % set(handles.slider3, 'Value', floor(mean(acts)));
918 % set(handles.slider3, 'Max', floor(max(max(acts))));
919 % set(handles.slider3, 'Min', floor(min(min(acts))));
920 % set(handles.slider3, 'SliderStep', floor([min(min(acts)) mean(mean(acts))]));
921 % guidata(hObject, handles);
922
923 acts = handles.SynthesisObject.Activations;
924 set(handles.sld_actstrength, 'Max', max(max(acts)));
925 set(handles.sld_actstrength, 'Value', mean(mean(acts)));
926 set(handles.sld_actstrength, 'Min', min(min(acts)));
927 set(handles.sld_actstrength, 'SliderStep', [mean(mean(acts)) mean(mean(acts))]);
928 guidata(hObject, handles);
929
930
931 % --- Executes on slider movement.
932 function slider4_Callback(hObject, eventdata, handles)
933 % hObject handle to slider4 (see GCBO)
934 % eventdata reserved - to be defined in a future version of MATLAB
935 % handles structure with handles and user data (see GUIDATA)
936 % Hints: get(hObject,'Value') returns position of slider
937 % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
938
939
940 % --- Executes during object creation, after setting all properties.
941 function slider4_CreateFcn(hObject, eventdata, handles)
942 % hObject handle to slider4 (see GCBO)
943 % eventdata reserved - to be defined in a future version of MATLAB
944 % handles empty - handles not created until after all CreateFcns called
945
946 % Hint: slider controls usually have a light gray background.
947 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
948 set(hObject,'BackgroundColor',[.9 .9 .9]);
949 end
950
951
952 % --- Executes on button press in radiobutton4.
953 function radiobutton4_Callback(hObject, eventdata, handles)
954 % hObject handle to radiobutton4 (see GCBO)
955 % eventdata reserved - to be defined in a future version of MATLAB
956 % handles structure with handles and user data (see GUIDATA)
957
958 % Hint: get(hObject,'Value') returns toggle state of radiobutton4
959
960
961 % --- Executes on button press in radiobutton5.
962 function radiobutton5_Callback(hObject, eventdata, handles)
963 % hObject handle to radiobutton5 (see GCBO)
964 % eventdata reserved - to be defined in a future version of MATLAB
965 % handles structure with handles and user data (see GUIDATA)
966
967 % Hint: get(hObject,'Value') returns toggle state of radiobutton5
968
969
970 % --------------------------------------------------------------------
971 function template_manipulation_tool_OffCallback(hObject, eventdata, handles)
972 % hObject handle to template_manipulation_tool (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 set(gcf,'WindowKeyPressFcn','')
976 set(gcf,'WindowScrollWheelFcn','')
977
978 % --------------------------------------------------------------------
979 function template_manipulation_tool_OnCallback(hObject, eventdata, handles)
980 % hObject handle to template_manipulation_tool (see GCBO)
981 % eventdata reserved - to be defined in a future version of MATLAB
982 % handles structure with handles and user data (see GUIDATA)
983
984 set(gcf,'WindowKeyPressFcn',@templateDelCb)
985 set(gcf,'WindowScrollWheelFcn',{@templateScrollCb, findobj(gca,'Type','line')})
986
987
988 % --------------------------------------------------------------------
989 function template_manipulation_tool_ClickedCallback(hObject, eventdata, handles)
990 % hObject handle to template_manipulation_tool (see GCBO)
991 % eventdata reserved - to be defined in a future version of MATLAB
992 % handles structure with handles and user data (see GUIDATA)
993 templates = handles.Sound_corpus.Features.STFT.S;
994 [~,I]=max(templates);
995 [~,Ix] = sort(I,'ascend');
996 handles.templateIndices = Ix;
997 guidata(hObject, handles);
998
999
1000 % --------------------------------------------------------------------
1001 function file_menu_exportWorkspace_Callback(hObject, eventdata, handles)
1002 % hObject handle to file_menu_exportWorkspace_Callback (see GCBO)
1003 % eventdata reserved - to be defined in a future version of MATLAB
1004 % handles structure with handles and user data (see GUIDATA)
1005 currentWorkspace = struct('Sound_corpus', handles.Sound_corpus, ...
1006 'Sound_target', handles.Sound_target, ...
1007 'Sound_synthesis', handles.Sound_synthesis, ...
1008 'SynthesisObject', handles.SynthesisObject);
1009
1010 [file,path] = uiputfile('*.mat','Save Workspace As');
1011 save([path filesep file], '-struct', 'currentWorkspace');
1012
1013 % --- Executes on button press in pushbutton21.
1014 function pushbutton21_Callback(hObject, eventdata, handles)
1015 % hObject handle to pushbutton21 (see GCBO)
1016 % eventdata reserved - to be defined in a future version of MATLAB
1017 % handles structure with handles and user data (see GUIDATA)
1018 SynthesisCtr('rerun', handles);
1019
1020
1021 % --- Executes on button press in checkbox14.
1022 function checkbox14_Callback(hObject, eventdata, handles)
1023 % hObject handle to checkbox14 (see GCBO)
1024 % eventdata reserved - to be defined in a future version of MATLAB
1025 % handles structure with handles and user data (see GUIDATA)
1026
1027 % Hint: get(hObject,'Value') returns toggle state of checkbox14
1028
1029
1030 % --- Executes on button press in pushbutton22.
1031 function pushbutton22_Callback(hObject, eventdata, handles)
1032 % hObject handle to pushbutton22 (see GCBO)
1033 % eventdata reserved - to be defined in a future version of MATLAB
1034 % handles structure with handles and user data (see GUIDATA)
1035 SynthesisCtr('Swap Sounds', handles);
1036
1037
1038 % --- Executes on button press in btn_synthesis.
1039 function btn_synthesis_Callback(hObject, eventdata, handles)
1040 % hObject handle to btn_synthesis (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 if(strcmp(get(handles.tool_menu_dev_timer, 'Checked'), 'on'))
1044 tic
1045 controller('runSynthesis', handles);
1046 toc
1047 else
1048 controller('runSynthesis', handles);
1049 end
1050
1051 handles = guidata(hObject); %Necessary to update handles
1052
1053 set([handles.btn_play_3], 'Visible', 'on');
1054
1055 controller('switchPlot', handles);
1056
1057 % --- Executes on button press in btn_analysis.
1058 function btn_analysis_Callback(hObject, eventdata, handles)
1059 % hObject handle to btn_analysis (see GCBO)
1060 % eventdata reserved - to be defined in a future version of MATLAB
1061 % handles structure with handles and user data (see GUIDATA)
1062 guidata(hObject, handles);
1063
1064 if(strcmp(get(handles.tool_menu_dev_timer, 'Checked'), 'on'))
1065 tic
1066 controller('runAnalysis', handles);
1067 toc
1068 else
1069 controller('runAnalysis', handles);
1070 end
1071 set(handles.btn_synthesis, 'Visible', 'on');
1072
1073 % --- Executes on selection change in popupmenu11.
1074 function popupmenu11_Callback(hObject, eventdata, handles)
1075 % hObject handle to popupmenu11 (see GCBO)
1076 % eventdata reserved - to be defined in a future version of MATLAB
1077 % handles structure with handles and user data (see GUIDATA)
1078
1079 % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu11 contents as cell array
1080 % contents{get(hObject,'Value')} returns selected item from popupmenu11
1081
1082
1083 % --- Executes during object creation, after setting all properties.
1084 function popupmenu11_CreateFcn(hObject, eventdata, handles)
1085 % hObject handle to popupmenu11 (see GCBO)
1086 % eventdata reserved - to be defined in a future version of MATLAB
1087 % handles empty - handles not created until after all CreateFcns called
1088
1089 % Hint: popupmenu controls usually have a white background on Windows.
1090 % See ISPC and COMPUTER.
1091 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1092 set(hObject,'BackgroundColor','white');
1093 end
1094
1095
1096 % --- Executes on selection change in pop_cost.
1097 function pop_cost_Callback(hObject, eventdata, handles)
1098 % hObject handle to pop_cost (see GCBO)
1099 % eventdata reserved - to be defined in a future version of MATLAB
1100 % handles structure with handles and user data (see GUIDATA)
1101
1102 % Hints: contents = cellstr(get(hObject,'String')) returns pop_cost contents as cell array
1103 % contents{get(hObject,'Value')} returns selected item from pop_cost
1104 contents = cellstr(get(hObject,'String'));
1105 cost = contents{get(hObject,'Value')};
1106 if( strcmp(cost, 'Sparse NMF'))
1107 set([handles.edt_sparse_lambda handles.txt_sparse_lambda], 'Visible', 'on');
1108 else
1109 set([handles.edt_sparse_lambda handles.txt_sparse_lambda], 'Visible', 'off');
1110 end
1111
1112 % --- Executes during object creation, after setting all properties.
1113 function pop_cost_CreateFcn(hObject, eventdata, handles)
1114 % hObject handle to pop_cost (see GCBO)
1115 % eventdata reserved - to be defined in a future version of MATLAB
1116 % handles empty - handles not created until after all CreateFcns called
1117
1118 % Hint: popupmenu controls usually have a white background on Windows.
1119 % See ISPC and COMPUTER.
1120 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1121 set(hObject,'BackgroundColor','white');
1122 end
1123
1124
1125
1126 function edt_winlen_Callback(hObject, eventdata, handles)
1127 % hObject handle to edt_winlen (see GCBO)
1128 % eventdata reserved - to be defined in a future version of MATLAB
1129 % handles structure with handles and user data (see GUIDATA)
1130
1131 % Hints: get(hObject,'String') returns contents of edt_winlen as text
1132 % str2double(get(hObject,'String')) returns contents of edt_winlen as a double
1133
1134
1135 % --- Executes during object creation, after setting all properties.
1136 function edt_winlen_CreateFcn(hObject, eventdata, handles)
1137 % hObject handle to edt_winlen (see GCBO)
1138 % eventdata reserved - to be defined in a future version of MATLAB
1139 % handles empty - handles not created until after all CreateFcns called
1140
1141 % Hint: edit controls usually have a white background on Windows.
1142 % See ISPC and COMPUTER.
1143 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1144 set(hObject,'BackgroundColor','white');
1145 end
1146
1147
1148
1149 function edt_overlap_Callback(hObject, eventdata, handles)
1150 % hObject handle to edt_overlap (see GCBO)
1151 % eventdata reserved - to be defined in a future version of MATLAB
1152 % handles structure with handles and user data (see GUIDATA)
1153
1154 % Hints: get(hObject,'String') returns contents of edt_overlap as text
1155 % str2double(get(hObject,'String')) returns contents of edt_overlap as a double
1156
1157
1158 % --- Executes during object creation, after setting all properties.
1159 function edt_overlap_CreateFcn(hObject, eventdata, handles)
1160 % hObject handle to edt_overlap (see GCBO)
1161 % eventdata reserved - to be defined in a future version of MATLAB
1162 % handles empty - handles not created until after all CreateFcns called
1163
1164 % Hint: edit controls usually have a white background on Windows.
1165 % See ISPC and COMPUTER.
1166 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1167 set(hObject,'BackgroundColor','white');
1168 end
1169
1170
1171
1172 function edt_sndlen_Callback(hObject, eventdata, handles)
1173 % hObject handle to edt_sndlen (see GCBO)
1174 % eventdata reserved - to be defined in a future version of MATLAB
1175 % handles structure with handles and user data (see GUIDATA)
1176
1177 % Hints: get(hObject,'String') returns contents of edt_sndlen as text
1178 % str2double(get(hObject,'String')) returns contents of edt_sndlen as a double
1179
1180
1181 % --- Executes during object creation, after setting all properties.
1182 function edt_sndlen_CreateFcn(hObject, eventdata, handles)
1183 % hObject handle to edt_sndlen (see GCBO)
1184 % eventdata reserved - to be defined in a future version of MATLAB
1185 % handles empty - handles not created until after all CreateFcns called
1186
1187 % Hint: edit controls usually have a white background on Windows.
1188 % See ISPC and COMPUTER.
1189 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1190 set(hObject,'BackgroundColor','white');
1191 end
1192
1193
1194 % --- Executes on selection change in pop_wintype.
1195 function pop_wintype_Callback(hObject, eventdata, handles)
1196 % hObject handle to pop_wintype (see GCBO)
1197 % eventdata reserved - to be defined in a future version of MATLAB
1198 % handles structure with handles and user data (see GUIDATA)
1199
1200 % Hints: contents = cellstr(get(hObject,'String')) returns pop_wintype contents as cell array
1201 % contents{get(hObject,'Value')} returns selected item from pop_wintype
1202
1203
1204 % --- Executes during object creation, after setting all properties.
1205 function pop_wintype_CreateFcn(hObject, eventdata, handles)
1206 % hObject handle to pop_wintype (see GCBO)
1207 % eventdata reserved - to be defined in a future version of MATLAB
1208 % handles empty - handles not created until after all CreateFcns called
1209
1210 % Hint: popupmenu controls usually have a white background on Windows.
1211 % See ISPC and COMPUTER.
1212 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1213 set(hObject,'BackgroundColor','white');
1214 end
1215
1216
1217 % --- Executes on button press in checkbox21.
1218 function checkbox21_Callback(hObject, eventdata, handles)
1219 % hObject handle to checkbox21 (see GCBO)
1220 % eventdata reserved - to be defined in a future version of MATLAB
1221 % handles structure with handles and user data (see GUIDATA)
1222
1223 % Hint: get(hObject,'Value') returns toggle state of checkbox21
1224
1225
1226 % --- Executes on selection change in pop_specttype.
1227 function pop_specttype_Callback(hObject, eventdata, handles)
1228 % hObject handle to pop_specttype (see GCBO)
1229 % eventdata reserved - to be defined in a future version of MATLAB
1230 % handles structure with handles and user data (see GUIDATA)
1231
1232 % Hints: contents = cellstr(get(hObject,'String')) returns pop_specttype contents as cell array
1233 % contents{get(hObject,'Value')} returns selected item from pop_specttype
1234
1235
1236 % --- Executes during object creation, after setting all properties.
1237 function pop_specttype_CreateFcn(hObject, eventdata, handles)
1238 % hObject handle to pop_specttype (see GCBO)
1239 % eventdata reserved - to be defined in a future version of MATLAB
1240 % handles empty - handles not created until after all CreateFcns called
1241
1242 % Hint: popupmenu controls usually have a white background on Windows.
1243 % See ISPC and COMPUTER.
1244 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1245 set(hObject,'BackgroundColor','white');
1246 end
1247
1248
1249 % --- Executes on selection change in pop_synthmethod.
1250 function pop_synthmethod_Callback(hObject, eventdata, handles)
1251 % hObject handle to pop_synthmethod (see GCBO)
1252 % eventdata reserved - to be defined in a future version of MATLAB
1253 % handles structure with handles and user data (see GUIDATA)
1254
1255 % Hints: contents = cellstr(get(hObject,'String')) returns pop_synthmethod contents as cell array
1256 % contents{get(hObject,'Value')} returns selected item from pop_synthmethod
1257
1258
1259 % --- Executes during object creation, after setting all properties.
1260 function pop_synthmethod_CreateFcn(hObject, eventdata, handles)
1261 % hObject handle to pop_synthmethod (see GCBO)
1262 % eventdata reserved - to be defined in a future version of MATLAB
1263 % handles empty - handles not created until after all CreateFcns called
1264
1265 % Hint: popupmenu controls usually have a white background on Windows.
1266 % See ISPC and COMPUTER.
1267 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1268 set(hObject,'BackgroundColor','white');
1269 end
1270
1271
1272 % --- Executes on button press in btn_play_3.
1273 function btn_play_3_Callback(hObject, eventdata, handles)
1274 % hObject handle to btn_play_3 (see GCBO)
1275 % eventdata reserved - to be defined in a future version of MATLAB
1276 % handles structure with handles and user data (see GUIDATA)
1277 if(isplaying(handles.Sound_synthesis.Audioplayer))
1278 controller('stopSynthesis', handles);
1279 [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'playButton.jpg']);
1280 [r,c,d]=size(a);
1281 x=ceil(r/30);
1282 y=ceil(c/30);
1283 g=a(1:x:end,1:y:end,:);
1284 g(g==255)=5.5*255;
1285 set(handles.btn_play_3,'CData',g)
1286 else
1287 controller('playSynthesis', handles);
1288 [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'stopButton.png']);
1289 [r,c,d]=size(a);
1290 x=ceil(r/30);
1291 y=ceil(c/30);
1292 g=a(1:x:end,1:y:end,:);
1293 g(g==255)=5.5*255;
1294 set(handles.btn_play_3,'CData',g);
1295 end
1296
1297 % --- Executes on selection change in pop_plot.
1298 function pop_plot_Callback(hObject, eventdata, handles)
1299 % hObject handle to pop_plot (see GCBO)
1300 % eventdata reserved - to be defined in a future version of MATLAB
1301 % handles structure with handles and user data (see GUIDATA)
1302
1303 % Hints: contents = cellstr(get(hObject,'String')) returns pop_plot contents as cell array
1304 % contents{get(hObject,'Value')} returns selected item from pop_plot
1305 controller('switchPlot', handles);
1306
1307 % --- Executes during object creation, after setting all properties.
1308 function pop_plot_CreateFcn(hObject, eventdata, handles)
1309 % hObject handle to pop_plot (see GCBO)
1310 % eventdata reserved - to be defined in a future version of MATLAB
1311 % handles empty - handles not created until after all CreateFcns called
1312
1313 % Hint: popupmenu controls usually have a white background on Windows.
1314 % See ISPC and COMPUTER.
1315 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1316 set(hObject,'BackgroundColor','white');
1317 end
1318
1319
1320 % --- Executes on button press in btn_play_2.
1321 function btn_play_2_Callback(hObject, eventdata, handles)
1322 % hObject handle to btn_play_2 (see GCBO)
1323 % eventdata reserved - to be defined in a future version of MATLAB
1324 % handles structure with handles and user data (see GUIDATA)
1325 if(isplaying(handles.Sound_target.Audioplayer))
1326 controller('stopTarget', handles);
1327 [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'playButton.jpg']);
1328 [r,c,d]=size(a);
1329 x=ceil(r/30);
1330 y=ceil(c/30);
1331 g=a(1:x:end,1:y:end,:);
1332 g(g==255)=5.5*255;
1333 set(handles.btn_play_2,'CData',g)
1334 else
1335 controller('playTarget', handles);
1336 [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'stopButton.png']);
1337 [r,c,d]=size(a);
1338 x=ceil(r/30);
1339 y=ceil(c/30);
1340 g=a(1:x:end,1:y:end,:);
1341 g(g==255)=5.5*255;
1342 set(handles.btn_play_2,'CData',g);
1343 end
1344
1345 % --- Executes on button press in btn_load_target.
1346 function btn_load_target_Callback(hObject, eventdata, handles)
1347 % hObject handle to btn_load_target (see GCBO)
1348 % eventdata reserved - to be defined in a future version of MATLAB
1349 % handles structure with handles and user data (see GUIDATA)
1350 controller('openTarget', handles);
1351 set(handles.btn_play_2, 'Visible', 'on');
1352
1353 % --- Executes on button press in btn_load_corpus.
1354 function btn_load_corpus_Callback(hObject, eventdata, handles)
1355 % hObject handle to btn_load_corpus (see GCBO)
1356 % eventdata reserved - to be defined in a future version of MATLAB
1357 % handles structure with handles and user data (see GUIDATA)
1358 controller('openSource', handles);
1359
1360 % --- Executes on button press in btn_post_processing_run.
1361 function btn_post_processing_run_Callback(hObject, eventdata, handles)
1362 % hObject handle to btn_post_processing_run (see GCBO)
1363 % eventdata reserved - to be defined in a future version of MATLAB
1364 % handles structure with handles and user data (see GUIDATA)
1365 controller('rerun', handles);
1366
1367 % --- Executes on slider movement.
1368 function sld_maxdb_Callback(hObject, eventdata, handles)
1369 % hObject handle to sld_maxdb (see GCBO)
1370 % eventdata reserved - to be defined in a future version of MATLAB
1371 % handles structure with handles and user data (see GUIDATA)
1372 controller('switchPlot', handles);
1373 % Hints: get(hObject,'Value') returns position of slider
1374 % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
1375
1376
1377 % --- Executes during object creation, after setting all properties.
1378 function sld_maxdb_CreateFcn(hObject, eventdata, handles)
1379 % hObject handle to sld_maxdb (see GCBO)
1380 % eventdata reserved - to be defined in a future version of MATLAB
1381 % handles empty - handles not created until after all CreateFcns called
1382
1383 % Hint: slider controls usually have a light gray background.
1384 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1385 set(hObject,'BackgroundColor',[.9 .9 .9]);
1386 end
1387
1388
1389 % --- Executes on button press in btn_resynthesis.
1390 function btn_resynthesis_Callback(hObject, eventdata, handles)
1391 % hObject handle to btn_resynthesis (see GCBO)
1392 % eventdata reserved - to be defined in a future version of MATLAB
1393 % handles structure with handles and user data (see GUIDATA)
1394 controller('resynthesize', handles);
1395
1396 % --- Executes on slider movement.
1397 function sld_actstrength_Callback(hObject, eventdata, handles)
1398 % hObject handle to sld_actstrength (see GCBO)
1399 % eventdata reserved - to be defined in a future version of MATLAB
1400 % handles structure with handles and user data (see GUIDATA)
1401
1402 % Hints: get(hObject,'Value') returns position of slider
1403 % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
1404
1405
1406 % --- Executes during object creation, after setting all properties.
1407 function sld_actstrength_CreateFcn(hObject, eventdata, handles)
1408 % hObject handle to sld_actstrength (see GCBO)
1409 % eventdata reserved - to be defined in a future version of MATLAB
1410 % handles empty - handles not created until after all CreateFcns called
1411
1412 % Hint: slider controls usually have a light gray background.
1413 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1414 set(hObject,'BackgroundColor',[.9 .9 .9]);
1415 end
1416
1417
1418
1419 function edt_iter_Callback(hObject, eventdata, handles)
1420 % hObject handle to edt_iter (see GCBO)
1421 % eventdata reserved - to be defined in a future version of MATLAB
1422 % handles structure with handles and user data (see GUIDATA)
1423
1424 % Hints: get(hObject,'String') returns contents of edt_iter as text
1425 % str2double(get(hObject,'String')) returns contents of edt_iter as a double
1426
1427
1428 % --- Executes during object creation, after setting all properties.
1429 function edt_iter_CreateFcn(hObject, eventdata, handles)
1430 % hObject handle to edt_iter (see GCBO)
1431 % eventdata reserved - to be defined in a future version of MATLAB
1432 % handles empty - handles not created until after all CreateFcns called
1433
1434 % Hint: edit controls usually have a white background on Windows.
1435 % See ISPC and COMPUTER.
1436 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1437 set(hObject,'BackgroundColor','white');
1438 end
1439
1440
1441
1442 function edt_rand_Callback(hObject, eventdata, handles)
1443 % hObject handle to edt_rand (see GCBO)
1444 % eventdata reserved - to be defined in a future version of MATLAB
1445 % handles structure with handles and user data (see GUIDATA)
1446
1447 % Hints: get(hObject,'String') returns contents of edt_rand as text
1448 % str2double(get(hObject,'String')) returns contents of edt_rand as a double
1449
1450
1451 % --- Executes during object creation, after setting all properties.
1452 function edt_rand_CreateFcn(hObject, eventdata, handles)
1453 % hObject handle to edt_rand (see GCBO)
1454 % eventdata reserved - to be defined in a future version of MATLAB
1455 % handles empty - handles not created until after all CreateFcns called
1456
1457 % Hint: edit controls usually have a white background on Windows.
1458 % See ISPC and COMPUTER.
1459 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1460 set(hObject,'BackgroundColor','white');
1461 end
1462
1463
1464
1465 function edt_conv_Callback(hObject, eventdata, handles)
1466 % hObject handle to edt_conv (see GCBO)
1467 % eventdata reserved - to be defined in a future version of MATLAB
1468 % handles structure with handles and user data (see GUIDATA)
1469
1470 % Hints: get(hObject,'String') returns contents of edt_conv as text
1471 % str2double(get(hObject,'String')) returns contents of edt_conv as a double
1472
1473
1474 % --- Executes during object creation, after setting all properties.
1475 function edt_conv_CreateFcn(hObject, eventdata, handles)
1476 % hObject handle to edt_conv (see GCBO)
1477 % eventdata reserved - to be defined in a future version of MATLAB
1478 % handles empty - handles not created until after all CreateFcns called
1479
1480 % Hint: edit controls usually have a white background on Windows.
1481 % See ISPC and COMPUTER.
1482 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1483 set(hObject,'BackgroundColor','white');
1484 end
1485
1486
1487 % --- Executes on button press in chk_mod_rep.
1488 function chk_mod_rep_Callback(hObject, eventdata, handles)
1489 % hObject handle to chk_mod_rep (see GCBO)
1490 % eventdata reserved - to be defined in a future version of MATLAB
1491 % handles structure with handles and user data (see GUIDATA)
1492
1493 % Hint: get(hObject,'Value') returns toggle state of chk_mod_rep
1494 if(get(hObject, 'Value'))
1495 set([handles.edt_mod_rep],'Visible','on')
1496 else
1497 set([handles.edt_mod_rep],'Visible','off')
1498 set([handles.edt_mod_rep],'String', '-1' )
1499 end
1500
1501 % --- Executes on button press in chk_mod_poly.
1502 function chk_mod_poly_Callback(hObject, eventdata, handles)
1503 % hObject handle to chk_mod_poly (see GCBO)
1504 % eventdata reserved - to be defined in a future version of MATLAB
1505 % handles structure with handles and user data (see GUIDATA)
1506
1507 % Hint: get(hObject,'Value') returns toggle state of chk_mod_poly
1508 if(get(hObject, 'Value'))
1509 set([handles.edt_mod_poly],'Visible','on')
1510 else
1511 set([handles.edt_mod_poly],'Visible','off')
1512 set([handles.edt_mod_poly],'String', '-1' )
1513 end
1514
1515 % --- Executes on button press in chk_mod_cont.
1516 function chk_mod_cont_Callback(hObject, eventdata, handles)
1517 % hObject handle to chk_mod_cont (see GCBO)
1518 % eventdata reserved - to be defined in a future version of MATLAB
1519 % handles structure with handles and user data (see GUIDATA)
1520
1521 % Hint: get(hObject,'Value') returns toggle state of chk_mod_cont
1522 if(get(hObject, 'Value'))
1523 set([handles.edt_mod_cont, handles.pop_pattern, ...
1524 handles.txt_pattern, handles.edt_mod_cont_rot, handles.txt_rot],'Visible','on')
1525 else
1526 set([handles.edt_mod_cont, handles.pop_pattern, ...
1527 handles.txt_pattern, handles.edt_mod_cont_rot, handles.txt_rot],'Visible','off')
1528 set([handles.edt_mod_cont],'String', '-1' )
1529 end
1530
1531
1532 function edt_mod_rep_Callback(hObject, eventdata, handles)
1533 % hObject handle to edt_mod_rep (see GCBO)
1534 % eventdata reserved - to be defined in a future version of MATLAB
1535 % handles structure with handles and user data (see GUIDATA)
1536
1537 % Hints: get(hObject,'String') returns contents of edt_mod_rep as text
1538 % str2double(get(hObject,'String')) returns contents of edt_mod_rep as a double
1539
1540
1541 % --- Executes during object creation, after setting all properties.
1542 function edt_mod_rep_CreateFcn(hObject, eventdata, handles)
1543 % hObject handle to edt_mod_rep (see GCBO)
1544 % eventdata reserved - to be defined in a future version of MATLAB
1545 % handles empty - handles not created until after all CreateFcns called
1546
1547 % Hint: edit controls usually have a white background on Windows.
1548 % See ISPC and COMPUTER.
1549 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1550 set(hObject,'BackgroundColor','white');
1551 end
1552
1553
1554
1555 function edt_mod_poly_Callback(hObject, eventdata, handles)
1556 % hObject handle to edt_mod_poly (see GCBO)
1557 % eventdata reserved - to be defined in a future version of MATLAB
1558 % handles structure with handles and user data (see GUIDATA)
1559
1560 % Hints: get(hObject,'String') returns contents of edt_mod_poly as text
1561 % str2double(get(hObject,'String')) returns contents of edt_mod_poly as a double
1562
1563
1564 % --- Executes during object creation, after setting all properties.
1565 function edt_mod_poly_CreateFcn(hObject, eventdata, handles)
1566 % hObject handle to edt_mod_poly (see GCBO)
1567 % eventdata reserved - to be defined in a future version of MATLAB
1568 % handles empty - handles not created until after all CreateFcns called
1569
1570 % Hint: edit controls usually have a white background on Windows.
1571 % See ISPC and COMPUTER.
1572 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1573 set(hObject,'BackgroundColor','white');
1574 end
1575
1576
1577
1578 function edt_mod_cont_Callback(hObject, eventdata, handles)
1579 % hObject handle to edt_mod_cont (see GCBO)
1580 % eventdata reserved - to be defined in a future version of MATLAB
1581 % handles structure with handles and user data (see GUIDATA)
1582
1583 % Hints: get(hObject,'String') returns contents of edt_mod_cont as text
1584 % str2double(get(hObject,'String')) returns contents of edt_mod_cont as a double
1585
1586
1587 % --- Executes during object creation, after setting all properties.
1588 function edt_mod_cont_CreateFcn(hObject, eventdata, handles)
1589 % hObject handle to edt_mod_cont (see GCBO)
1590 % eventdata reserved - to be defined in a future version of MATLAB
1591 % handles empty - handles not created until after all CreateFcns called
1592
1593 % Hint: edit controls usually have a white background on Windows.
1594 % See ISPC and COMPUTER.
1595 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1596 set(hObject,'BackgroundColor','white');
1597 end
1598
1599
1600
1601 function edit37_Callback(hObject, eventdata, handles)
1602 % hObject handle to edt_sndlen (see GCBO)
1603 % eventdata reserved - to be defined in a future version of MATLAB
1604 % handles structure with handles and user data (see GUIDATA)
1605
1606 % Hints: get(hObject,'String') returns contents of edt_sndlen as text
1607 % str2double(get(hObject,'String')) returns contents of edt_sndlen as a double
1608
1609
1610 % --- Executes during object creation, after setting all properties.
1611 function edit37_CreateFcn(hObject, eventdata, handles)
1612 % hObject handle to edt_sndlen (see GCBO)
1613 % eventdata reserved - to be defined in a future version of MATLAB
1614 % handles empty - handles not created until after all CreateFcns called
1615
1616 % Hint: edit controls usually have a white background on Windows.
1617 % See ISPC and COMPUTER.
1618 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1619 set(hObject,'BackgroundColor','white');
1620 end
1621
1622
1623 % --- Executes on button press in chk_corpuslen.
1624 function chk_corpuslen_Callback(hObject, eventdata, handles)
1625 % hObject handle to chk_corpuslen (see GCBO)
1626 % eventdata reserved - to be defined in a future version of MATLAB
1627 % handles structure with handles and user data (see GUIDATA)
1628
1629 % Hint: get(hObject,'Value') returns toggle state of chk_corpuslen
1630
1631
1632 % --- Executes during object creation, after setting all properties.
1633 function txt_corpusfile_CreateFcn(hObject, eventdata, handles)
1634 % hObject handle to txt_corpusfile (see GCBO)
1635 % eventdata reserved - to be defined in a future version of MATLAB
1636 % handles empty - handles not created until after all CreateFcns called
1637
1638
1639 % --- Executes during object creation, after setting all properties.
1640 function txt_targetfile_CreateFcn(hObject, eventdata, handles)
1641 % hObject handle to txt_targetfile (see GCBO)
1642 % eventdata reserved - to be defined in a future version of MATLAB
1643 % handles empty - handles not created until after all CreateFcns called
1644
1645
1646 % --- Executes during object creation, after setting all properties.
1647 function chk_mod_rep_CreateFcn(hObject, eventdata, handles)
1648 % hObject handle to chk_mod_rep (see GCBO)
1649 % eventdata reserved - to be defined in a future version of MATLAB
1650 % handles empty - handles not created until after all CreateFcns called
1651
1652
1653 % --- Executes during object creation, after setting all properties.
1654 function chk_mod_poly_CreateFcn(hObject, eventdata, handles)
1655 % hObject handle to chk_mod_poly (see GCBO)
1656 % eventdata reserved - to be defined in a future version of MATLAB
1657 % handles empty - handles not created until after all CreateFcns called
1658
1659
1660 % --- Executes during object creation, after setting all properties.
1661 function chk_mod_cont_CreateFcn(hObject, eventdata, handles)
1662 % hObject handle to chk_mod_cont (see GCBO)
1663 % eventdata reserved - to be defined in a future version of MATLAB
1664 % handles empty - handles not created until after all CreateFcns called
1665
1666
1667 % --- Executes during object creation, after setting all properties.
1668 function tbl_plotdata_CreateFcn(hObject, eventdata, handles)
1669 % hObject handle to tbl_plotdata (see GCBO)
1670 % eventdata reserved - to be defined in a future version of MATLAB
1671 % handles empty - handles not created until after all CreateFcns called
1672
1673
1674 % --------------------------------------------------------------------
1675 function tool_menu_activations_Callback(hObject, eventdata, handles)
1676 % hObject handle to tool_menu_activations (see GCBO)
1677 % eventdata reserved - to be defined in a future version of MATLAB
1678 % handles structure with handles and user data (see GUIDATA)
1679 set([handles.pnl_activation_sketching, handles.draw_activations, handles.delete_activations, handles.btn_resynthesis], 'Visible', 'on');
1680
1681 % --------------------------------------------------------------------
1682 function tool_menu_templates_Callback(hObject, eventdata, handles)
1683 % hObject handle to tool_menu_templates (see GCBO)
1684 % eventdata reserved - to be defined in a future version of MATLAB
1685 % handles structure with handles and user data (see GUIDATA)
1686 set([handles.template_manipulation_tool, handles.btn_post_processing_run], 'Visible', 'on');
1687
1688
1689 % --------------------------------------------------------------------
1690 function tool_menu_dev_plotData_Callback(hObject, eventdata, handles)
1691 % hObject handle to tool_menu_dev_plotData (see GCBO)
1692 % eventdata reserved - to be defined in a future version of MATLAB
1693 % handles structure with handles and user data (see GUIDATA)
1694 set(handles.tbl_plotdata, 'Visible', 'on');
1695
1696
1697 % --- Executes on selection change in pop_pattern.
1698 function pop_pattern_Callback(hObject, eventdata, handles)
1699 % hObject handle to pop_pattern (see GCBO)
1700 % eventdata reserved - to be defined in a future version of MATLAB
1701 % handles structure with handles and user data (see GUIDATA)
1702
1703 % Hints: contents = cellstr(get(hObject,'String')) returns pop_pattern contents as cell array
1704 % contents{get(hObject,'Value')} returns selected item from pop_pattern
1705
1706
1707 % --- Executes during object creation, after setting all properties.
1708 function pop_pattern_CreateFcn(hObject, eventdata, handles)
1709 % hObject handle to pop_pattern (see GCBO)
1710 % eventdata reserved - to be defined in a future version of MATLAB
1711 % handles empty - handles not created until after all CreateFcns called
1712
1713 % Hint: popupmenu controls usually have a white background on Windows.
1714 % See ISPC and COMPUTER.
1715 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1716 set(hObject,'BackgroundColor','white');
1717 end
1718
1719
1720 % --- Executes on button press in chk_endtime.
1721 function chk_endtime_Callback(hObject, eventdata, handles)
1722 % hObject handle to chk_endtime (see GCBO)
1723 % eventdata reserved - to be defined in a future version of MATLAB
1724 % handles structure with handles and user data (see GUIDATA)
1725
1726 % Hint: get(hObject,'Value') returns toggle state of chk_endtime
1727
1728
1729 % --------------------------------------------------------------------
1730 function file_menu_importWorkspace_Callback(hObject, eventdata, handles)
1731 % hObject handle to file_menu_importWorkspace (see GCBO)
1732 % eventdata reserved - to be defined in a future version of MATLAB
1733 % handles structure with handles and user data (see GUIDATA)
1734 [FileName,PathName] = uigetfile('*.mat','Select the workspace');
1735 importedWorkspace = load([PathName FileName]);
1736
1737 handles.Sound_corpus = importedWorkspace.Sound_corpus;
1738 handles.Sound_target = importedWorkspace.Sound_target;
1739 handles.Sound_synthesis = importedWorkspace.Sound_synthesis;
1740 handles.SynthesisObject = importedWorkspace.SynthesisObject;
1741
1742 guidata(hObject, handles);
1743
1744 set([handles.btn_play_2, handles.btn_play_3, handles.btn_synthesis], 'Visible', 'on');
1745 set(handles.txt_corpusfile, 'String', handles.Sound_corpus.Filename);
1746 set(handles.txt_targetfile, 'String', handles.Sound_target.Filename);
1747
1748
1749
1750 function edt_mod_cont_rot_Callback(hObject, eventdata, handles)
1751 % hObject handle to edt_mod_cont_rot (see GCBO)
1752 % eventdata reserved - to be defined in a future version of MATLAB
1753 % handles structure with handles and user data (see GUIDATA)
1754
1755 % Hints: get(hObject,'String') returns contents of edt_mod_cont_rot as text
1756 % str2double(get(hObject,'String')) returns contents of edt_mod_cont_rot as a double
1757
1758
1759 % --- Executes during object creation, after setting all properties.
1760 function edt_mod_cont_rot_CreateFcn(hObject, eventdata, handles)
1761 % hObject handle to edt_mod_cont_rot (see GCBO)
1762 % eventdata reserved - to be defined in a future version of MATLAB
1763 % handles empty - handles not created until after all CreateFcns called
1764
1765 % Hint: edit controls usually have a white background on Windows.
1766 % See ISPC and COMPUTER.
1767 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1768 set(hObject,'BackgroundColor','white');
1769 end
1770
1771
1772
1773 function edt_sparse_lambda_Callback(hObject, eventdata, handles)
1774 % hObject handle to edt_sparse_lambda (see GCBO)
1775 % eventdata reserved - to be defined in a future version of MATLAB
1776 % handles structure with handles and user data (see GUIDATA)
1777
1778 % Hints: get(hObject,'String') returns contents of edt_sparse_lambda as text
1779 % str2double(get(hObject,'String')) returns contents of edt_sparse_lambda as a double
1780
1781
1782 % --- Executes during object creation, after setting all properties.
1783 function edt_sparse_lambda_CreateFcn(hObject, eventdata, handles)
1784 % hObject handle to edt_sparse_lambda (see GCBO)
1785 % eventdata reserved - to be defined in a future version of MATLAB
1786 % handles empty - handles not created until after all CreateFcns called
1787
1788 % Hint: edit controls usually have a white background on Windows.
1789 % See ISPC and COMPUTER.
1790 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1791 set(hObject,'BackgroundColor','white');
1792 end
1793
1794
1795 % --------------------------------------------------------------------
1796 function tool_menu_dev_cacheEnable_Callback(hObject, eventdata, handles)
1797 % hObject handle to tool_menu_dev_cacheEnable (see GCBO)
1798 % eventdata reserved - to be defined in a future version of MATLAB
1799 % handles structure with handles and user data (see GUIDATA)
1800 if strcmp(get(hObject,'Checked'),'on')
1801 set(hObject,'Checked','off');
1802 else
1803 set(hObject,'Checked','on');
1804 end
1805
1806
1807
1808 function edt_prune_Callback(hObject, eventdata, handles)
1809 % hObject handle to edt_prune (see GCBO)
1810 % eventdata reserved - to be defined in a future version of MATLAB
1811 % handles structure with handles and user data (see GUIDATA)
1812
1813 % Hints: get(hObject,'String') returns contents of edt_prune as text
1814 % str2double(get(hObject,'String')) returns contents of edt_prune as a double
1815
1816
1817 % --- Executes during object creation, after setting all properties.
1818 function edt_prune_CreateFcn(hObject, eventdata, handles)
1819 % hObject handle to edt_prune (see GCBO)
1820 % eventdata reserved - to be defined in a future version of MATLAB
1821 % handles empty - handles not created until after all CreateFcns called
1822
1823 % Hint: edit controls usually have a white background on Windows.
1824 % See ISPC and COMPUTER.
1825 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1826 set(hObject,'BackgroundColor','white');
1827 end
1828
1829
1830 % --- Executes on button press in btn_soundswap.
1831 function btn_soundswap_Callback(hObject, eventdata, handles)
1832 % hObject handle to btn_soundswap (see GCBO)
1833 % eventdata reserved - to be defined in a future version of MATLAB
1834 % handles structure with handles and user data (see GUIDATA)
1835 controller('swapSourceAndTarget', handles);
1836 set(handles.btn_play_2, 'Visible', 'on');