tomwalters@0: % Script to compare the AIM2006 output for four files (listed below) tomwalters@0: % This scrips creates six figure windows, one for each stage of the AIM tomwalters@0: % processing model and plots four panes, one for each file in each one tomwalters@0: tomwalters@0: % (c) 2006-2008, University of Cambridge, Medical Research Council tomwalters@0: % Tom Walters tcw24@cam.ac.uk tomwalters@0: % http://www.pdn.cam.ac.uk/cnbh/aim2006 tomwalters@0: % $Date: 2008-06-10 18:00:16 +0100 (Tue, 10 Jun 2008) $ tomwalters@0: % $Revision: 585 $ tomwalters@0: tomwalters@0: filenames{1}='aa110p122s100t.wav'; tomwalters@0: filenames{2}='aa256p122s100t.wav'; tomwalters@0: filenames{3}='aa110p089s100t.wav'; tomwalters@0: filenames{4}='aa256p089s100t.wav'; tomwalters@0: tomwalters@0: tomwalters@0: analysis_start_time=0; tomwalters@0: analysis_end_time=0.2; tomwalters@0: tomwalters@0: display_start_time=0.13; tomwalters@0: display_end_time=0.154; tomwalters@0: tomwalters@0: bmm_scaling=16; tomwalters@0: nap_scaling=0.008; tomwalters@0: sai_scaling=0.004; tomwalters@0: mellin_scaling=16; tomwalters@0: tomwalters@0: for ii=1:length(filenames) tomwalters@0: name=filenames{ii}; tomwalters@0: tomwalters@0: % Find the pitch and scale of the input sound from the filename tomwalters@0: inp=strfind(name,'p'); tomwalters@0: pitch=str2num(name(inp-3:inp-1)); tomwalters@0: ins=strfind(name,'s'); tomwalters@0: scale=str2num(name(ins-3:ins-1)); tomwalters@0: tomwalters@0: % Set the parameters for analysis of the sound tomwalters@0: gtfb_options=setparams_gtfb(filenames{ii}, analysis_start_time, analysis_end_time); tomwalters@0: tomwalters@0: tomwalters@0: % Analyse with aim2006 tomwalters@0: gtfb_output{ii}=aim(gtfb_options); tomwalters@0: tomwalters@0: tomwalters@0: options.minimum_time=display_start_time; tomwalters@0: options.maximum_time=display_end_time; tomwalters@0: tomwalters@0: title_string=['Pitch:' num2str(pitch) ' Scale:' num2str(scale)]; tomwalters@0: tomwalters@0: figure(1) tomwalters@0: set(gcf, 'Name', ['PCP: ' gtfb_output{ii}.info.current_pcp_module]); tomwalters@0: subplot(2,2,ii); tomwalters@0: plot(gtfb_output{ii}.data.pcp, [display_start_time display_end_time]); tomwalters@0: tomwalters@0: figure(2) tomwalters@0: set(gcf, 'Name', ['BMM: ' gtfb_output{ii}.info.current_bmm_module]); tomwalters@0: subplot(2,2,ii); tomwalters@0: plot_bmm(gtfb_output{ii}, options, bmm_scaling,title_string); tomwalters@0: tomwalters@0: figure(3) tomwalters@0: set(gcf, 'Name', ['NAP: ' gtfb_output{ii}.info.current_nap_module]); tomwalters@0: subplot(2,2,ii); tomwalters@0: plot_nap(gtfb_output{ii},options, nap_scaling,title_string); tomwalters@0: tomwalters@0: figure(4) tomwalters@0: set(gcf, 'Name', ['SP: ' gtfb_output{ii}.info.current_strobes_module]); tomwalters@0: subplot(2,2,ii); tomwalters@0: %plot(gtfb_output{ii}.data.nap); tomwalters@0: %hold on; tomwalters@0: plot_strobes(gtfb_output{ii}, options, nap_scaling,title_string); tomwalters@0: tomwalters@0: max_frame=length(gtfb_output{ii}.data.sai); tomwalters@0: tomwalters@0: figure(5) tomwalters@0: set(gcf, 'Name', ['SAI: ' gtfb_output{ii}.info.current_sai_module]); tomwalters@0: subplot(2,2,ii); tomwalters@0: plot_sai(gtfb_output{ii},max_frame, sai_scaling,title_string); tomwalters@0: tomwalters@0: figure(6) tomwalters@0: set(gcf, 'Name', ['Usermodule: ' gtfb_output{ii}.info.current_usermodule_module]); tomwalters@0: subplot(2,2,ii); tomwalters@0: plot_mellin(gtfb_output{ii},max_frame, mellin_scaling, title_string); tomwalters@0: tomwalters@0: end