tomwalters@0: % procedure for 'aim-mat' tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % tomwalters@0: % (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: tomwalters@0: tomwalters@0: tomwalters@0: function handles=edit_start(hObject, eventdata, handles) tomwalters@0: tomwalters@0: curval=get(hObject,'String'); tomwalters@0: curval=str2num(curval); tomwalters@0: handles.currentslidereditcombi=... tomwalters@0: slidereditcontrol_set_raweditvalue(handles.currentslidereditcombi,curval); tomwalters@0: tomwalters@0: if handles.info.current_plot>=6 %sai has additionally the start time below: tomwalters@0: sai=handles.data.sai; tomwalters@0: cval=slidereditcontrol_get_value(handles.currentslidereditcombi); tomwalters@0: cval=round(cval); tomwalters@0: start_time=getcurrentframestarttime(sai{cval}); tomwalters@0: set(handles.edit2,'String',num2str(cval)); tomwalters@0: set(handles.edit3,'String',num2str(fround(start_time*1000,1))); tomwalters@0: else tomwalters@0: % range check: tomwalters@0: start=slidereditcontrol_get_value(handles.currentslidereditcombi); tomwalters@0: start=max(start,0); tomwalters@0: dur=slidereditcontrol_get_value(handles.slideredit_duration); tomwalters@0: sig=handles.data.signal; tomwalters@0: siglen=getmaximumtime(sig); tomwalters@0: if start+dur>siglen tomwalters@0: start=siglen-dur; tomwalters@0: end tomwalters@0: handles.currentslidereditcombi=... tomwalters@0: slidereditcontrol_set_value(handles.currentslidereditcombi,start); tomwalters@0: % % and set a new range tomwalters@0: % handles.slideredit_start=slidereditcontrol_set_range(handles.slideredit_start,dur); % the duration tomwalters@0: tomwalters@0: end