tomwalters@0: % support file for 'aim-mat' tomwalters@0: % tomwalters@0: % This file is included as part of the 'aim-mat' distribution package 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: tomwalters@0: tomwalters@0: function res=generate_clicktrain_normal tomwalters@0: % generate the "standart clicktrain response, that is subtracted from tomwalters@0: % the sai tomwalters@0: % generate a clicktrain, send it through an aim-model and average the tomwalters@0: % clicktrain response from 50-200 ms. Save the result in a file called tomwalters@0: % "click_frame" tomwalters@0: tomwalters@0: tomwalters@0: clear all_options tomwalters@0: ct=clicktrain(0.2,25000,25); % the clicktrain is below the width of the image tomwalters@0: tomwalters@0: % generate the model parameters: tomwalters@0: tomwalters@0: %%%%%%%%%%%%% tomwalters@0: % Signaloptions tomwalters@0: all_options.signal.signal_filename='temp.wav'; tomwalters@0: all_options.signal.start_time=0; tomwalters@0: all_options.signal.duration=0.5; tomwalters@0: all_options.signal.samplerate=getsr(ct); tomwalters@0: tomwalters@0: %%%%%%%%%%%%% tomwalters@0: % outer/middle ear filter function tomwalters@0: all_options.pcp.none.generatingfunction='gennopcp'; tomwalters@0: all_options.pcp.none.displayname='no correction by outer/middle ear'; tomwalters@0: all_options.pcp.none.revision='$Revision: 585 $'; tomwalters@0: tomwalters@0: tomwalters@0: %%%%%%%%%%%%% tomwalters@0: % bmm tomwalters@0: all_options.bmm.gtfb.generatingfunction='gen_gtfb'; tomwalters@0: all_options.bmm.gtfb.displayname='Gamma tone filter bank'; tomwalters@0: all_options.bmm.gtfb.revision='$Revision: 585 $'; tomwalters@0: all_options.bmm.gtfb.nr_channels=50; tomwalters@0: all_options.bmm.gtfb.lowest_frequency=100; tomwalters@0: all_options.bmm.gtfb.highest_frequency=6400; tomwalters@0: all_options.bmm.gtfb.do_phase_alignment='off'; tomwalters@0: all_options.bmm.gtfb.phase_alignment_nr_cycles=3; tomwalters@0: all_options.bmm.gtfb.b=1.019; tomwalters@0: tomwalters@0: tomwalters@0: %%%%%%%%%%%%% tomwalters@0: % nap tomwalters@0: all_options.nap.hcl.generatingfunction='gen_hcl'; tomwalters@0: all_options.nap.hcl.displayname='halfwave rectification, compression and lowpass filtering'; tomwalters@0: all_options.nap.hcl.revision='$Revision: 585 $'; tomwalters@0: all_options.nap.hcl.compression='log'; tomwalters@0: all_options.nap.hcl.do_lowpassfiltering=1; tomwalters@0: all_options.nap.hcl.lowpass_cutoff_frequency=1200; tomwalters@0: all_options.nap.hcl.lowpass_order=2; tomwalters@0: tomwalters@0: tomwalters@0: %%%%%%%%%%%%% tomwalters@0: % strobes tomwalters@0: all_options.strobes.sf2003.generatingfunction='gen_sf2003'; tomwalters@0: all_options.strobes.sf2003.displayname='strobe finding'; tomwalters@0: all_options.strobes.sf2003.revision='$Revision: 585 $'; tomwalters@0: all_options.strobes.sf2003.strobe_criterion='interparabola'; tomwalters@0: all_options.strobes.sf2003.strobe_decay_time=0.02; tomwalters@0: all_options.strobes.sf2003.parabel_heigth=1.2; tomwalters@0: all_options.strobes.sf2003.parabel_width_in_cycles=1.5; tomwalters@0: all_options.strobes.sf2003.bunt=1.02; tomwalters@0: all_options.strobes.sf2003.wait_cycles=1.5; tomwalters@0: all_options.strobes.sf2003.wait_timeout_ms=20; tomwalters@0: all_options.strobes.sf2003.slope_coefficient=1; tomwalters@0: tomwalters@0: tomwalters@0: %%%%%%%%%%%%% tomwalters@0: % sai tomwalters@0: all_options.sai.ti2003.generatingfunction='gen_ti2003'; tomwalters@0: all_options.sai.ti2003.displayname='time integration stabilized auditory image'; tomwalters@0: all_options.sai.ti2003.revision='$Revision: 585 $'; tomwalters@0: all_options.sai.ti2003.criterion='change_weights'; tomwalters@0: all_options.sai.ti2003.start_time=0; tomwalters@0: all_options.sai.ti2003.maxdelay=0.035; tomwalters@0: all_options.sai.ti2003.buffer_memory_decay=0.03; tomwalters@0: all_options.sai.ti2003.frames_per_second=300; tomwalters@0: all_options.sai.ti2003.weight_threshold=0; tomwalters@0: all_options.sai.ti2003.do_normalize=1; tomwalters@0: all_options.sai.ti2003.do_times_nap_height=0; tomwalters@0: all_options.sai.ti2003.do_adjust_weights=1; tomwalters@0: all_options.sai.ti2003.strobe_weight_alpha=0.5; tomwalters@0: all_options.sai.ti2003.delay_weight_change=0.5; tomwalters@0: all_options.sai.ti2003.erb_frequency_integration=0; tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: % set the signal to the appropriate one tomwalters@0: savewave(ct,'temp.wav'); tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: res=aim(all_options); tomwalters@0: tomwalters@0: resu=res.result; tomwalters@0: len=length(resu); tomwalters@0: click_frame=resu{1}; % its an empty one anyhow tomwalters@0: for i=10:len tomwalters@0: fr=resu{i}/1000; tomwalters@0: click_frame=click_frame+fr; tomwalters@0: end tomwalters@0: tomwalters@0: save click_frame click_frame tomwalters@0: tomwalters@0: tomwalters@0: res=click_frame;