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