boblsturm@0: function varargout = nimfks(varargin) boblsturm@0: % nimfks MATLAB code for nimfks.fig boblsturm@0: % nimfks, by itself, creates a new nimfks or raises the existing boblsturm@0: % singleton*. boblsturm@0: % boblsturm@0: % H = nimfks returns the handle to a new nimfks or the handle to boblsturm@0: % the existing singleton*. boblsturm@0: % boblsturm@0: % nimfks('CALLBACK',hObject,eventData,handles,...) calls the local boblsturm@0: % function named CALLBACK in nimfks.M with the given input arguments. boblsturm@0: % boblsturm@0: % nimfks('Property','Value',...) creates a new nimfks or raises the boblsturm@0: % existing singleton*. Starting from the left, property value pairs are boblsturm@0: % applied to the nimfks before nimfks_OpeningFcn gets called. An boblsturm@0: % unrecognized property name or invalid value makes property application boblsturm@0: % stop. All inputs are passed to nimfks_OpeningFcn via varargin. boblsturm@0: % boblsturm@0: % *See nimfks Options on GUIDE's Tools menu. Choose "nimfks allows only one boblsturm@0: % instance to run (singleton)". boblsturm@0: % boblsturm@0: % See also: GUIDE, GUIDATA, GUIHANDLES boblsturm@0: boblsturm@0: % Edit the above text to modify the response to help nimfks boblsturm@0: boblsturm@0: % Last Modified by GUIDE v2.5 22-Apr-2017 18:29:19 boblsturm@0: boblsturm@0: % Begin initialization code - DO NOT EDIT boblsturm@0: gui_Singleton = 1; boblsturm@0: gui_State = struct('gui_Name', mfilename, ... boblsturm@0: 'gui_Singleton', gui_Singleton, ... boblsturm@0: 'gui_OpeningFcn', @nimfks_OpeningFcn, ... boblsturm@0: 'gui_OutputFcn', @nimfks_OutputFcn, ... boblsturm@0: 'gui_LayoutFcn', [] , ... boblsturm@0: 'gui_Callback', []); boblsturm@0: if nargin && ischar(varargin{1}) boblsturm@0: gui_State.gui_Callback = str2func(varargin{1}); boblsturm@0: end boblsturm@0: boblsturm@0: if nargout boblsturm@0: [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); boblsturm@0: else boblsturm@0: gui_mainfcn(gui_State, varargin{:}); boblsturm@0: end boblsturm@0: % End initialization code - DO NOT EDIT boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes just before nimfks is made visible. boblsturm@0: function nimfks_OpeningFcn(hObject, eventdata, handles, varargin) boblsturm@0: % This function has no output args, see OutputFcn. boblsturm@0: % hObject handle to figure boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: % varargin command line arguments to nimfks (see VARARGIN) boblsturm@0: boblsturm@0: set(gcf, 'units', 'normalized', 'position', [0.1 0.1 0.8 0.85]) boblsturm@0: %Place "playback" symbol onto buttons boblsturm@0: [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'playButton.jpg']); boblsturm@0: boblsturm@0: % [pathstr, ~, ~] = fileparts(pwd); boblsturm@0: % addpath(genpath(strcat(pathstr, '/MFAMC', '/assets'))); boblsturm@0: % [a,map]=imread('playButton.jpg'); boblsturm@0: boblsturm@0: [r,c,d]=size(a); boblsturm@0: x=ceil(r/30); boblsturm@0: y=ceil(c/30); boblsturm@0: g=a(1:x:end,1:y:end,:); boblsturm@0: g(g==255)=5.5*255; boblsturm@0: set(handles.btn_play_2,'CData',g); boblsturm@0: set(handles.btn_play_3,'CData',g); boblsturm@0: boblsturm@0: [swapButtonImg,swapBtnMap]=imread(['..' filesep '..' filesep 'assets' filesep 'swapButton.jpg']); boblsturm@0: [r,c,d]=size(swapButtonImg); boblsturm@0: x=ceil(r/20); boblsturm@0: y=ceil(c/20); boblsturm@0: g=swapButtonImg(1:x:end,1:y:end,:); boblsturm@0: g(g==255)=5.5*255; boblsturm@0: set(handles.btn_soundswap,'CData',g); boblsturm@0: boblsturm@0: %Set resynthesis file explorer and restriction parameters to invisible boblsturm@0: set([handles.pnl_activation_sketching, handles.edt_mod_rep, handles.edt_mod_poly, handles.edt_mod_cont, ... boblsturm@0: handles.draw_activations, handles.delete_activations, handles.template_manipulation_tool, handles.btn_play_3, ... boblsturm@0: handles.tbl_plotdata, handles.btn_synthesis, handles.btn_play_2, handles.pop_pattern, handles.txt_pattern],'Visible','off'); boblsturm@0: boblsturm@0: %Initialize parameters boblsturm@0: set(handles.edt_winlen,'String','100'); %Window length boblsturm@0: set(handles.edt_overlap,'String','50'); %Overlap boblsturm@0: % set(handles.edt_sndlen,'String','5'); %Length of synthesis boblsturm@0: set(handles.edt_iter,'String','10'); %NNMF Iterations boblsturm@0: set(handles.edt_rand,'String','0'); %NNMF Activations Random Seed boblsturm@0: set(handles.edt_conv,'String','0'); %NNMF Convergence Criteria boblsturm@0: set(handles.edt_mod_rep,'String','-1'); %Repitition restriction parameter boblsturm@0: set(handles.edt_mod_poly,'String','-1'); %Polyphony restriction parameter boblsturm@0: set(handles.edt_mod_cont,'String','-1'); %Continuity enhancement parameter boblsturm@0: set(handles.edt_sparse_lambda,'String','5'); %Lambda (regularizer) for sparse NMF boblsturm@0: set(handles.edt_prune,'String','0'); %Pruning parameter boblsturm@0: boblsturm@0: % fig=gcf; boblsturm@0: % set(findall(fig,'-property','FontSize'),'FontSize',11) boblsturm@0: boblsturm@0: % if( strcmp(get(handles.tool_menu_dev_cacheEnable, 'Checked'), 'on') && ~exist('nimfks_cache.mat','file') ) boblsturm@0: if( ~exist('nimfks_cache.mat','file') ) boblsturm@0: AnalysisCacheMap = struct(); boblsturm@0: SynthesisCacheMap = struct(); boblsturm@0: save('nimfks_cache.mat', 'SynthesisCacheMap', 'AnalysisCacheMap'); boblsturm@0: end boblsturm@0: boblsturm@0: % Choose default command line output for nimfks boblsturm@0: handles.output = hObject; boblsturm@0: boblsturm@0: % Update handles structure boblsturm@0: guidata(hObject, handles); boblsturm@0: boblsturm@0: % UIWAIT makes nimfks wait for user response (see UIRESUME) boblsturm@0: % uiwait(handles.figure1); boblsturm@0: boblsturm@0: boblsturm@0: % --- Outputs from this function are returned to the command line. boblsturm@0: function varargout = nimfks_OutputFcn(hObject, eventdata, handles) boblsturm@0: % varargout cell array for returning output args (see VARARGOUT); boblsturm@0: % hObject handle to figure boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Get default command line output from handles structure boblsturm@0: varargout{1} = handles.output; boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton1. boblsturm@0: function pushbutton1_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton1 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: InterfaceObj=findobj(handles.figure1,'Enable','on'); boblsturm@0: set(InterfaceObj,'Enable','off'); boblsturm@0: % SynthesisCtr('verifyParams', handles); boblsturm@0: boblsturm@0: waitbarHandle = waitbar(0, 'Starting Synthesis...'); boblsturm@0: handles.waitbarHandle = waitbarHandle; boblsturm@0: guidata(hObject, handles); boblsturm@0: boblsturm@0: if(strcmp(get(handles.tool_menu_dev_timer, 'Checked'), 'on')) boblsturm@0: tic boblsturm@0: SynthesisCtr('run', handles); boblsturm@0: toc boblsturm@0: else boblsturm@0: SynthesisCtr('run', handles); boblsturm@0: end boblsturm@0: boblsturm@0: set(InterfaceObj,'Enable','on'); boblsturm@0: % guidata(gcf, handles); boblsturm@0: boblsturm@0: % enableReplay handles; boblsturm@0: set([handles.pushbutton18 handles.text8 handles.text26],'Visible','on') boblsturm@0: SynthesisCtr('configPlotlist', handles); boblsturm@0: SynthesisCtr('openResynthesis', handles); boblsturm@0: boblsturm@0: if(strcmp(get(handles.tool_menu_dev_exportWorkspace, 'Checked'), 'on')) boblsturm@0: synthObj = handles.SynthesisObject; boblsturm@0: save('synth.mat','synthObj'); boblsturm@0: end boblsturm@0: boblsturm@0: close(waitbarHandle) boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton2. boblsturm@0: function pushbutton2_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton2 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: originalGui = ancestor(hObject, 'figure'); boblsturm@0: delete(originalGui); boblsturm@0: GUI; boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton3. boblsturm@0: function pushbutton3_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in listbox1. boblsturm@0: function listbox1_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to listbox1 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('switchPlot', handles); boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from listbox1 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function listbox1_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to listbox1 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: listbox controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton11. boblsturm@0: function pushbutton11_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton11 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('playTarget', handles); boblsturm@0: boblsturm@0: boblsturm@0: function edit5_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to text5 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of text5 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of text5 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function text5_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to text5 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton15. boblsturm@0: function pushbutton15_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton15 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('playSource', handles); boblsturm@0: boblsturm@0: boblsturm@0: function edit7_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to text7 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of text7 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of text7 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function text7_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to text7 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton16. boblsturm@0: function pushbutton16_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton16 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('openSource', handles); boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton18. boblsturm@0: function pushbutton18_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton18 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('playResynthesis', handles); boblsturm@0: boblsturm@0: boblsturm@0: function edit8_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to text8 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of text8 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of text8 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function text8_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to text8 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit9_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit9 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit9 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit9 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit9_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit9 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit10_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit10 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit10 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit10 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit10_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit10 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit11_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit11 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit11 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit11 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit11_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit11 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in popupmenu1. boblsturm@0: function popupmenu1_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu1 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from popupmenu1 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function popupmenu1_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu1 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in popupmenu2. boblsturm@0: function popupmenu2_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu2 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu2 contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from popupmenu2 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function popupmenu2_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu2 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in popupmenu3. boblsturm@0: function popupmenu3_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu3 contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from popupmenu3 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function popupmenu3_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in popupmenu4. boblsturm@0: function popupmenu4_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu4 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu4 contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from popupmenu4 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function popupmenu4_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu4 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox1. boblsturm@0: function checkbox1_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox1 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox1 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox2. boblsturm@0: function checkbox2_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox2 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox2 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox3. boblsturm@0: function checkbox3_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox3 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox4. boblsturm@0: function checkbox4_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox4 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox4 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox5. boblsturm@0: function checkbox5_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox5 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox5 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox6. boblsturm@0: function checkbox6_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox6 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox6 boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit12_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit12 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit12 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit12 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit12_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit12 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit13_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit13 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit13 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit13 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit13_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit13 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit14_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit14 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit14 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit14 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit14_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit14 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox7. boblsturm@0: function checkbox7_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox7 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox7 boblsturm@0: if(get(hObject, 'Value')) boblsturm@0: set(handles.edit19,'Visible','on') boblsturm@0: else boblsturm@0: set(handles.edit19,'Visible','off') boblsturm@0: end boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox9. boblsturm@0: function checkbox8_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox9 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox9 boblsturm@0: if(get(hObject, 'Value')) boblsturm@0: set(handles.edit20,'Visible','on') boblsturm@0: else boblsturm@0: set(handles.edit20,'Visible','off') boblsturm@0: end boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox9. boblsturm@0: function checkbox9_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox9 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox9 boblsturm@0: if(get(hObject, 'Value')) boblsturm@0: set(handles.edit21,'Visible','on') boblsturm@0: else boblsturm@0: set(handles.edit21,'Visible','off') boblsturm@0: end boblsturm@0: boblsturm@0: function edit15_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit15 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit15 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit15 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit15_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit15 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox7. boblsturm@0: function checkbox10_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox7 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox7 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox9. boblsturm@0: function checkbox11_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox9 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox9 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox12. boblsturm@0: function checkbox12_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox12 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox12 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes when entered data in editable cell(s) in uitable3. boblsturm@0: function uitable3_CellEditCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to uitable3 (see GCBO) boblsturm@0: % eventdata structure with the following fields (see MATLAB.UI.CONTROL.TABLE) boblsturm@0: % Indices: row and column indices of the cell(s) edited boblsturm@0: % PreviousData: previous data for the cell(s) edited boblsturm@0: % EditData: string(s) entered by the user boblsturm@0: % NewData: EditData or its converted form set on the Data property. Empty if Data was not changed boblsturm@0: % Error: error string when failed to convert EditData to appropriate value for Data boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function uitable3_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to uitable3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in popupmenu5. boblsturm@0: function popupmenu5_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu5 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu5 contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from popupmenu5 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function popupmenu5_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu5 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_dev_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu_dev (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_dev_timer_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu_dev_timer (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: if strcmp(get(hObject,'Checked'),'on') boblsturm@0: set(hObject,'Checked','off'); boblsturm@0: else boblsturm@0: set(hObject,'Checked','on'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_dev_timer_ButtonDownFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu_dev_timer (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit19_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit19 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit19 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit19 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit19_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit19 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit20_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit20 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit20 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit20 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit20_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit20 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit21_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit21 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edit21 as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edit21 as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit21_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edit21 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function file_menu_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to file_menu (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function file_menu_export_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to file_menu_export (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: handles.Sound_synthesis.save_audio; boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function uipushtool1_ClickedCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to uipushtool1 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('savePlot', handles); boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function file_menu_export_ButtonDownFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to file_menu_export (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function draw_activations_OnCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to draw_activations (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set(gcf,'WindowButtonDownFcn',{@drawClickCallBack, 'Draw'}) boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function draw_activations_OffCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to draw_activations (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set(gcf,'WindowButtonDownFcn','') boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function delete_activations_OffCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to delete_activations (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set(gcf,'WindowButtonDownFcn','') boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function delete_activations_OnCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to delete_activations (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set(gcf,'WindowButtonDownFcn',{@drawClickCallBack, 'Erase'}) boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on slider movement. boblsturm@0: function slider3_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to slider3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'Value') returns position of slider boblsturm@0: % get(hObject,'Min') and get(hObject,'Max') to determine range of slider boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function slider3_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to slider3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: slider controls usually have a light gray background. boblsturm@0: if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor',[.9 .9 .9]); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton19. boblsturm@0: function pushbutton19_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton19 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: controller('resynthesize', handles); boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function draw_activations_ClickedCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to draw_activations (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % acts = handles.SynthesisObject.NNMFSynthesis.Activations; boblsturm@0: % set(handles.slider3, 'Value', floor(mean(acts))); boblsturm@0: % set(handles.slider3, 'Max', floor(max(max(acts)))); boblsturm@0: % set(handles.slider3, 'Min', floor(min(min(acts)))); boblsturm@0: % set(handles.slider3, 'SliderStep', floor([min(min(acts)) mean(mean(acts))])); boblsturm@0: % guidata(hObject, handles); boblsturm@0: boblsturm@0: acts = handles.SynthesisObject.Activations; boblsturm@0: set(handles.sld_actstrength, 'Max', max(max(acts))); boblsturm@0: set(handles.sld_actstrength, 'Value', mean(mean(acts))); boblsturm@0: set(handles.sld_actstrength, 'Min', min(min(acts))); boblsturm@0: set(handles.sld_actstrength, 'SliderStep', [mean(mean(acts)) mean(mean(acts))]); boblsturm@0: guidata(hObject, handles); boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on slider movement. boblsturm@0: function slider4_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to slider4 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: % Hints: get(hObject,'Value') returns position of slider boblsturm@0: % get(hObject,'Min') and get(hObject,'Max') to determine range of slider boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function slider4_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to slider4 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: slider controls usually have a light gray background. boblsturm@0: if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor',[.9 .9 .9]); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in radiobutton4. boblsturm@0: function radiobutton4_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to radiobutton4 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of radiobutton4 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in radiobutton5. boblsturm@0: function radiobutton5_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to radiobutton5 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of radiobutton5 boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function template_manipulation_tool_OffCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to template_manipulation_tool (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set(gcf,'WindowKeyPressFcn','') boblsturm@0: set(gcf,'WindowScrollWheelFcn','') boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function template_manipulation_tool_OnCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to template_manipulation_tool (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: set(gcf,'WindowKeyPressFcn',@templateDelCb) boblsturm@0: set(gcf,'WindowScrollWheelFcn',{@templateScrollCb, findobj(gca,'Type','line')}) boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function template_manipulation_tool_ClickedCallback(hObject, eventdata, handles) boblsturm@0: % hObject handle to template_manipulation_tool (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: templates = handles.Sound_corpus.Features.STFT.S; boblsturm@0: [~,I]=max(templates); boblsturm@0: [~,Ix] = sort(I,'ascend'); boblsturm@0: handles.templateIndices = Ix; boblsturm@0: guidata(hObject, handles); boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function file_menu_exportWorkspace_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to file_menu_exportWorkspace_Callback (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: currentWorkspace = struct('Sound_corpus', handles.Sound_corpus, ... boblsturm@0: 'Sound_target', handles.Sound_target, ... boblsturm@0: 'Sound_synthesis', handles.Sound_synthesis, ... boblsturm@0: 'SynthesisObject', handles.SynthesisObject); boblsturm@0: boblsturm@0: [file,path] = uiputfile('*.mat','Save Workspace As'); boblsturm@0: save([path filesep file], '-struct', 'currentWorkspace'); boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton21. boblsturm@0: function pushbutton21_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton21 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('rerun', handles); boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox14. boblsturm@0: function checkbox14_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox14 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox14 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in pushbutton22. boblsturm@0: function pushbutton22_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pushbutton22 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: SynthesisCtr('Swap Sounds', handles); boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in btn_synthesis. boblsturm@0: function btn_synthesis_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_synthesis (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: if(strcmp(get(handles.tool_menu_dev_timer, 'Checked'), 'on')) boblsturm@0: tic boblsturm@0: controller('runSynthesis', handles); boblsturm@0: toc boblsturm@0: else boblsturm@0: controller('runSynthesis', handles); boblsturm@0: end boblsturm@0: boblsturm@0: handles = guidata(hObject); %Necessary to update handles boblsturm@0: boblsturm@0: set([handles.btn_play_3], 'Visible', 'on'); boblsturm@0: boblsturm@0: controller('switchPlot', handles); boblsturm@0: boblsturm@0: % --- Executes on button press in btn_analysis. boblsturm@0: function btn_analysis_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_analysis (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: guidata(hObject, handles); boblsturm@0: boblsturm@0: if(strcmp(get(handles.tool_menu_dev_timer, 'Checked'), 'on')) boblsturm@0: tic boblsturm@0: controller('runAnalysis', handles); boblsturm@0: toc boblsturm@0: else boblsturm@0: controller('runAnalysis', handles); boblsturm@0: end boblsturm@0: set(handles.btn_synthesis, 'Visible', 'on'); boblsturm@0: boblsturm@0: % --- Executes on selection change in popupmenu11. boblsturm@0: function popupmenu11_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu11 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu11 contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from popupmenu11 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function popupmenu11_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to popupmenu11 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in pop_cost. boblsturm@0: function pop_cost_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_cost (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns pop_cost contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from pop_cost boblsturm@0: contents = cellstr(get(hObject,'String')); boblsturm@0: cost = contents{get(hObject,'Value')}; boblsturm@0: if( strcmp(cost, 'Sparse NMF')) boblsturm@0: set([handles.edt_sparse_lambda handles.txt_sparse_lambda], 'Visible', 'on'); boblsturm@0: else boblsturm@0: set([handles.edt_sparse_lambda handles.txt_sparse_lambda], 'Visible', 'off'); boblsturm@0: end boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function pop_cost_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_cost (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_winlen_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_winlen (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_winlen as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_winlen as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_winlen_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_winlen (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_overlap_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_overlap (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_overlap as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_overlap as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_overlap_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_overlap (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_sndlen_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_sndlen (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_sndlen as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_sndlen as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_sndlen_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_sndlen (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in pop_wintype. boblsturm@0: function pop_wintype_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_wintype (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns pop_wintype contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from pop_wintype boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function pop_wintype_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_wintype (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in checkbox21. boblsturm@0: function checkbox21_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to checkbox21 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of checkbox21 boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in pop_specttype. boblsturm@0: function pop_specttype_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_specttype (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns pop_specttype contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from pop_specttype boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function pop_specttype_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_specttype (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in pop_synthmethod. boblsturm@0: function pop_synthmethod_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_synthmethod (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns pop_synthmethod contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from pop_synthmethod boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function pop_synthmethod_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_synthmethod (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in btn_play_3. boblsturm@0: function btn_play_3_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_play_3 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: if(isplaying(handles.Sound_synthesis.Audioplayer)) boblsturm@0: controller('stopSynthesis', handles); boblsturm@0: [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'playButton.jpg']); boblsturm@0: [r,c,d]=size(a); boblsturm@0: x=ceil(r/30); boblsturm@0: y=ceil(c/30); boblsturm@0: g=a(1:x:end,1:y:end,:); boblsturm@0: g(g==255)=5.5*255; boblsturm@0: set(handles.btn_play_3,'CData',g) boblsturm@0: else boblsturm@0: controller('playSynthesis', handles); boblsturm@0: [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'stopButton.png']); boblsturm@0: [r,c,d]=size(a); boblsturm@0: x=ceil(r/30); boblsturm@0: y=ceil(c/30); boblsturm@0: g=a(1:x:end,1:y:end,:); boblsturm@0: g(g==255)=5.5*255; boblsturm@0: set(handles.btn_play_3,'CData',g); boblsturm@0: end boblsturm@0: boblsturm@0: % --- Executes on selection change in pop_plot. boblsturm@0: function pop_plot_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_plot (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns pop_plot contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from pop_plot boblsturm@0: controller('switchPlot', handles); boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function pop_plot_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_plot (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in btn_play_2. boblsturm@0: function btn_play_2_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_play_2 (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: if(isplaying(handles.Sound_target.Audioplayer)) boblsturm@0: controller('stopTarget', handles); boblsturm@0: [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'playButton.jpg']); boblsturm@0: [r,c,d]=size(a); boblsturm@0: x=ceil(r/30); boblsturm@0: y=ceil(c/30); boblsturm@0: g=a(1:x:end,1:y:end,:); boblsturm@0: g(g==255)=5.5*255; boblsturm@0: set(handles.btn_play_2,'CData',g) boblsturm@0: else boblsturm@0: controller('playTarget', handles); boblsturm@0: [a,map]=imread(['..' filesep '..' filesep 'assets' filesep 'stopButton.png']); boblsturm@0: [r,c,d]=size(a); boblsturm@0: x=ceil(r/30); boblsturm@0: y=ceil(c/30); boblsturm@0: g=a(1:x:end,1:y:end,:); boblsturm@0: g(g==255)=5.5*255; boblsturm@0: set(handles.btn_play_2,'CData',g); boblsturm@0: end boblsturm@0: boblsturm@0: % --- Executes on button press in btn_load_target. boblsturm@0: function btn_load_target_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_load_target (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: controller('openTarget', handles); boblsturm@0: set(handles.btn_play_2, 'Visible', 'on'); boblsturm@0: boblsturm@0: % --- Executes on button press in btn_load_corpus. boblsturm@0: function btn_load_corpus_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_load_corpus (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: controller('openSource', handles); boblsturm@0: boblsturm@0: % --- Executes on button press in btn_post_processing_run. boblsturm@0: function btn_post_processing_run_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_post_processing_run (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: controller('rerun', handles); boblsturm@0: boblsturm@0: % --- Executes on slider movement. boblsturm@0: function sld_maxdb_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to sld_maxdb (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: controller('switchPlot', handles); boblsturm@0: % Hints: get(hObject,'Value') returns position of slider boblsturm@0: % get(hObject,'Min') and get(hObject,'Max') to determine range of slider boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function sld_maxdb_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to sld_maxdb (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: slider controls usually have a light gray background. boblsturm@0: if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor',[.9 .9 .9]); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in btn_resynthesis. boblsturm@0: function btn_resynthesis_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_resynthesis (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: controller('resynthesize', handles); boblsturm@0: boblsturm@0: % --- Executes on slider movement. boblsturm@0: function sld_actstrength_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to sld_actstrength (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'Value') returns position of slider boblsturm@0: % get(hObject,'Min') and get(hObject,'Max') to determine range of slider boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function sld_actstrength_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to sld_actstrength (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: slider controls usually have a light gray background. boblsturm@0: if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor',[.9 .9 .9]); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_iter_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_iter (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_iter as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_iter as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_iter_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_iter (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_rand_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_rand (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_rand as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_rand as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_rand_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_rand (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_conv_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_conv (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_conv as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_conv as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_conv_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_conv (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in chk_mod_rep. boblsturm@0: function chk_mod_rep_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_mod_rep (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of chk_mod_rep boblsturm@0: if(get(hObject, 'Value')) boblsturm@0: set([handles.edt_mod_rep],'Visible','on') boblsturm@0: else boblsturm@0: set([handles.edt_mod_rep],'Visible','off') boblsturm@0: set([handles.edt_mod_rep],'String', '-1' ) boblsturm@0: end boblsturm@0: boblsturm@0: % --- Executes on button press in chk_mod_poly. boblsturm@0: function chk_mod_poly_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_mod_poly (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of chk_mod_poly boblsturm@0: if(get(hObject, 'Value')) boblsturm@0: set([handles.edt_mod_poly],'Visible','on') boblsturm@0: else boblsturm@0: set([handles.edt_mod_poly],'Visible','off') boblsturm@0: set([handles.edt_mod_poly],'String', '-1' ) boblsturm@0: end boblsturm@0: boblsturm@0: % --- Executes on button press in chk_mod_cont. boblsturm@0: function chk_mod_cont_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_mod_cont (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of chk_mod_cont boblsturm@0: if(get(hObject, 'Value')) boblsturm@0: set([handles.edt_mod_cont, handles.pop_pattern, ... boblsturm@0: handles.txt_pattern, handles.edt_mod_cont_rot, handles.txt_rot],'Visible','on') boblsturm@0: else boblsturm@0: set([handles.edt_mod_cont, handles.pop_pattern, ... boblsturm@0: handles.txt_pattern, handles.edt_mod_cont_rot, handles.txt_rot],'Visible','off') boblsturm@0: set([handles.edt_mod_cont],'String', '-1' ) boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: function edt_mod_rep_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_rep (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_mod_rep as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_mod_rep as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_mod_rep_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_rep (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_mod_poly_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_poly (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_mod_poly as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_mod_poly as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_mod_poly_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_poly (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_mod_cont_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_cont (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_mod_cont as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_mod_cont as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_mod_cont_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_cont (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edit37_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_sndlen (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_sndlen as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_sndlen as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edit37_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_sndlen (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in chk_corpuslen. boblsturm@0: function chk_corpuslen_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_corpuslen (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of chk_corpuslen boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function txt_corpusfile_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to txt_corpusfile (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function txt_targetfile_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to txt_targetfile (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function chk_mod_rep_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_mod_rep (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function chk_mod_poly_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_mod_poly (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function chk_mod_cont_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_mod_cont (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function tbl_plotdata_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to tbl_plotdata (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_activations_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu_activations (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set([handles.pnl_activation_sketching, handles.draw_activations, handles.delete_activations, handles.btn_resynthesis], 'Visible', 'on'); boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_templates_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu_templates (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set([handles.template_manipulation_tool, handles.btn_post_processing_run], 'Visible', 'on'); boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_dev_plotData_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu_dev_plotData (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: set(handles.tbl_plotdata, 'Visible', 'on'); boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on selection change in pop_pattern. boblsturm@0: function pop_pattern_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_pattern (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: contents = cellstr(get(hObject,'String')) returns pop_pattern contents as cell array boblsturm@0: % contents{get(hObject,'Value')} returns selected item from pop_pattern boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function pop_pattern_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to pop_pattern (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: popupmenu controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in chk_endtime. boblsturm@0: function chk_endtime_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to chk_endtime (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hint: get(hObject,'Value') returns toggle state of chk_endtime boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function file_menu_importWorkspace_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to file_menu_importWorkspace (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: [FileName,PathName] = uigetfile('*.mat','Select the workspace'); boblsturm@0: importedWorkspace = load([PathName FileName]); boblsturm@0: boblsturm@0: handles.Sound_corpus = importedWorkspace.Sound_corpus; boblsturm@0: handles.Sound_target = importedWorkspace.Sound_target; boblsturm@0: handles.Sound_synthesis = importedWorkspace.Sound_synthesis; boblsturm@0: handles.SynthesisObject = importedWorkspace.SynthesisObject; boblsturm@0: boblsturm@0: guidata(hObject, handles); boblsturm@0: boblsturm@0: set([handles.btn_play_2, handles.btn_play_3, handles.btn_synthesis], 'Visible', 'on'); boblsturm@0: set(handles.txt_corpusfile, 'String', handles.Sound_corpus.Filename); boblsturm@0: set(handles.txt_targetfile, 'String', handles.Sound_target.Filename); boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_mod_cont_rot_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_cont_rot (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_mod_cont_rot as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_mod_cont_rot as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_mod_cont_rot_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_mod_cont_rot (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_sparse_lambda_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_sparse_lambda (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_sparse_lambda as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_sparse_lambda as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_sparse_lambda_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_sparse_lambda (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % -------------------------------------------------------------------- boblsturm@0: function tool_menu_dev_cacheEnable_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to tool_menu_dev_cacheEnable (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: if strcmp(get(hObject,'Checked'),'on') boblsturm@0: set(hObject,'Checked','off'); boblsturm@0: else boblsturm@0: set(hObject,'Checked','on'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: boblsturm@0: function edt_prune_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_prune (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: boblsturm@0: % Hints: get(hObject,'String') returns contents of edt_prune as text boblsturm@0: % str2double(get(hObject,'String')) returns contents of edt_prune as a double boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes during object creation, after setting all properties. boblsturm@0: function edt_prune_CreateFcn(hObject, eventdata, handles) boblsturm@0: % hObject handle to edt_prune (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles empty - handles not created until after all CreateFcns called boblsturm@0: boblsturm@0: % Hint: edit controls usually have a white background on Windows. boblsturm@0: % See ISPC and COMPUTER. boblsturm@0: if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) boblsturm@0: set(hObject,'BackgroundColor','white'); boblsturm@0: end boblsturm@0: boblsturm@0: boblsturm@0: % --- Executes on button press in btn_soundswap. boblsturm@0: function btn_soundswap_Callback(hObject, eventdata, handles) boblsturm@0: % hObject handle to btn_soundswap (see GCBO) boblsturm@0: % eventdata reserved - to be defined in a future version of MATLAB boblsturm@0: % handles structure with handles and user data (see GUIDATA) boblsturm@0: controller('swapSourceAndTarget', handles); boblsturm@0: set(handles.btn_play_2, 'Visible', 'on');