tomwalters@0: % procedure for 'aim-mat' tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % bleeck@3: % bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: bleeck@3: tomwalters@0: tomwalters@0: function aim_savecurrentstate(handles) tomwalters@0: % save some crucial information to a file tomwalters@0: tomwalters@0: nam=handles.info.projectfilename; tomwalters@0: tomwalters@0: % in which directory is the wavefile? users could have changed it! tomwalters@0: dirname=handles.info.original_soundfile_directory; tomwalters@0: tomwalters@0: rnam=fullfile(dirname,nam); tomwalters@0: id=fopen(rnam,'wt'); tomwalters@0: tomwalters@0: fprintf(id,'\n%% Project information'); tomwalters@0: fprintf(id,'\n%% for the project: \n\n%%%%%%%%%%%%%%%%%%%%%%%%%%'); tomwalters@0: fprintf(id,'\n%%'); tomwalters@0: filename=sprintf(' %s\n',handles.info.uniqueworkingname); tomwalters@0: fprintf(id,filename); tomwalters@0: fprintf(id,'%% %s',date); tomwalters@0: fprintf(id,'\n%% produced by '); tomwalters@0: result = license('inuse'); tomwalters@0: cuser=result(1).user; tomwalters@0: fprintf(id,'%s',cuser); tomwalters@0: fprintf(id,'\n%% Dont write anything in this file'); tomwalters@0: fprintf(id,'\n%%%%%%%%%%%%%%%%%%%%%%%%%%\n'); tomwalters@0: tomwalters@0: % infos about the setup of the project itself tomwalters@0: % fprintf(id,'current_pcp_module=''%s'';\n',handles.info.calculated_pcp_module); tomwalters@0: % fprintf(id,'current_bmm_module=''%s'';\n',handles.info.calculated_nap_module); tomwalters@0: % fprintf(id,'current_nap_module=''%s'';\n',handles.info.calculated_bmm_module); tomwalters@0: % fprintf(id,'current_strobes_module=''%s'';\n',handles.info.calculated_strobes_module); tomwalters@0: % fprintf(id,'current_sai_module=''%s'';\n',handles.info.calculated_sai_module); tomwalters@0: % fprintf(id,'current_usermodule=''%s'';\n',handles.info.calculated_usermodule_module); tomwalters@0: % fprintf(id,'current_movie_module=''%s'';\n',handles.info.calculated_movie_module); tomwalters@0: tomwalters@0: tomwalters@0: % and infos about the grapical display tomwalters@0: fprintf(id,'current_plot=%d;\n',handles.info.current_plot); tomwalters@0: tomwalters@0: start_time=slidereditcontrol_get_value(handles.currentslidereditcombi); tomwalters@0: if handles.info.current_plot<6 tomwalters@0: fprintf(id,'start_time=%f;\n',start_time); tomwalters@0: else tomwalters@0: fprintf(id,'start_time=%d;\n',round(start_time)); tomwalters@0: end tomwalters@0: tomwalters@0: duration=slidereditcontrol_get_value(handles.slideredit_duration); tomwalters@0: fprintf(id,'duration=%f;\n',duration); tomwalters@0: scale=slidereditcontrol_get_value(handles.slideredit_scale); tomwalters@0: fprintf(id,'scale=%f;\n',scale); tomwalters@0: tomwalters@0: tomwalters@0: hastime=get(handles.checkbox6,'Value'); tomwalters@0: hasfreq=get(handles.checkbox7,'Value'); tomwalters@0: hassignal=get(handles.checkbox10,'Value'); tomwalters@0: fprintf(id,'hastime=%d;\n',hastime); tomwalters@0: fprintf(id,'hasfreq=%d;\n',hasfreq); tomwalters@0: fprintf(id,'hassignal=%d;\n',hassignal); tomwalters@0: tomwalters@0: pos=get(handles.figure1,'Position'); tomwalters@0: if isfield(handles.info,'current_figure') tomwalters@0: fprintf(id,'winx=%d;\n',pos(1)); tomwalters@0: fprintf(id,'winy=%d;\n',pos(2)); tomwalters@0: if ishandle(handles.info.current_figure) tomwalters@0: gpos=get(handles.info.current_figure,'Position'); tomwalters@0: fprintf(id,'grafixwinnr=%d;\n',handles.info.current_figure); tomwalters@0: fprintf(id,'grafixwinx=%d;\n',gpos(1)); tomwalters@0: fprintf(id,'grafixwiny=%d;\n',gpos(2)); tomwalters@0: fprintf(id,'grafixwinb=%d;\n',gpos(3)); tomwalters@0: fprintf(id,'grafixwinh=%d;\n',gpos(4)); tomwalters@0: end tomwalters@0: end tomwalters@0: fclose(id);