tomwalters@0
|
1 % support file for 'aim-mat'
|
tomwalters@0
|
2 %
|
tomwalters@0
|
3 % This file is included as part of the 'aim-mat' distribution package
|
bleeck@3
|
4 % (c) 2011, University of Southampton
|
bleeck@3
|
5 % Maintained by Stefan Bleeck (bleeck@gmail.com)
|
bleeck@3
|
6 % download of current version is on the soundsoftware site:
|
bleeck@3
|
7 % http://code.soundsoftware.ac.uk/projects/aimmat
|
bleeck@3
|
8 % documentation and everything is on http://www.acousticscale.org
|
bleeck@3
|
9
|
tomwalters@0
|
10
|
tomwalters@0
|
11 function res=generate_clicktrain_normal
|
tomwalters@0
|
12 % generate the "standart clicktrain response, that is subtracted from
|
tomwalters@0
|
13 % the sai
|
tomwalters@0
|
14 % generate a clicktrain, send it through an aim-model and average the
|
tomwalters@0
|
15 % clicktrain response from 50-200 ms. Save the result in a file called
|
tomwalters@0
|
16 % "click_frame"
|
tomwalters@0
|
17
|
tomwalters@0
|
18
|
tomwalters@0
|
19 clear all_options
|
tomwalters@0
|
20 ct=clicktrain(0.2,25000,25); % the clicktrain is below the width of the image
|
tomwalters@0
|
21
|
tomwalters@0
|
22 % generate the model parameters:
|
tomwalters@0
|
23
|
tomwalters@0
|
24 %%%%%%%%%%%%%
|
tomwalters@0
|
25 % Signaloptions
|
tomwalters@0
|
26 all_options.signal.signal_filename='temp.wav';
|
tomwalters@0
|
27 all_options.signal.start_time=0;
|
tomwalters@0
|
28 all_options.signal.duration=0.5;
|
tomwalters@0
|
29 all_options.signal.samplerate=getsr(ct);
|
tomwalters@0
|
30
|
tomwalters@0
|
31 %%%%%%%%%%%%%
|
tomwalters@0
|
32 % outer/middle ear filter function
|
tomwalters@0
|
33 all_options.pcp.none.generatingfunction='gennopcp';
|
tomwalters@0
|
34 all_options.pcp.none.displayname='no correction by outer/middle ear';
|
tomwalters@0
|
35 all_options.pcp.none.revision='$Revision: 585 $';
|
tomwalters@0
|
36
|
tomwalters@0
|
37
|
tomwalters@0
|
38 %%%%%%%%%%%%%
|
tomwalters@0
|
39 % bmm
|
tomwalters@0
|
40 all_options.bmm.gtfb.generatingfunction='gen_gtfb';
|
tomwalters@0
|
41 all_options.bmm.gtfb.displayname='Gamma tone filter bank';
|
tomwalters@0
|
42 all_options.bmm.gtfb.revision='$Revision: 585 $';
|
tomwalters@0
|
43 all_options.bmm.gtfb.nr_channels=50;
|
tomwalters@0
|
44 all_options.bmm.gtfb.lowest_frequency=100;
|
tomwalters@0
|
45 all_options.bmm.gtfb.highest_frequency=6400;
|
tomwalters@0
|
46 all_options.bmm.gtfb.do_phase_alignment='off';
|
tomwalters@0
|
47 all_options.bmm.gtfb.phase_alignment_nr_cycles=3;
|
tomwalters@0
|
48 all_options.bmm.gtfb.b=1.019;
|
tomwalters@0
|
49
|
tomwalters@0
|
50
|
tomwalters@0
|
51 %%%%%%%%%%%%%
|
tomwalters@0
|
52 % nap
|
tomwalters@0
|
53 all_options.nap.hcl.generatingfunction='gen_hcl';
|
tomwalters@0
|
54 all_options.nap.hcl.displayname='halfwave rectification, compression and lowpass filtering';
|
tomwalters@0
|
55 all_options.nap.hcl.revision='$Revision: 585 $';
|
tomwalters@0
|
56 all_options.nap.hcl.compression='log';
|
tomwalters@0
|
57 all_options.nap.hcl.do_lowpassfiltering=1;
|
tomwalters@0
|
58 all_options.nap.hcl.lowpass_cutoff_frequency=1200;
|
tomwalters@0
|
59 all_options.nap.hcl.lowpass_order=2;
|
tomwalters@0
|
60
|
tomwalters@0
|
61
|
tomwalters@0
|
62 %%%%%%%%%%%%%
|
tomwalters@0
|
63 % strobes
|
tomwalters@0
|
64 all_options.strobes.sf2003.generatingfunction='gen_sf2003';
|
tomwalters@0
|
65 all_options.strobes.sf2003.displayname='strobe finding';
|
tomwalters@0
|
66 all_options.strobes.sf2003.revision='$Revision: 585 $';
|
tomwalters@0
|
67 all_options.strobes.sf2003.strobe_criterion='interparabola';
|
tomwalters@0
|
68 all_options.strobes.sf2003.strobe_decay_time=0.02;
|
tomwalters@0
|
69 all_options.strobes.sf2003.parabel_heigth=1.2;
|
tomwalters@0
|
70 all_options.strobes.sf2003.parabel_width_in_cycles=1.5;
|
tomwalters@0
|
71 all_options.strobes.sf2003.bunt=1.02;
|
tomwalters@0
|
72 all_options.strobes.sf2003.wait_cycles=1.5;
|
tomwalters@0
|
73 all_options.strobes.sf2003.wait_timeout_ms=20;
|
tomwalters@0
|
74 all_options.strobes.sf2003.slope_coefficient=1;
|
tomwalters@0
|
75
|
tomwalters@0
|
76
|
tomwalters@0
|
77 %%%%%%%%%%%%%
|
tomwalters@0
|
78 % sai
|
tomwalters@0
|
79 all_options.sai.ti2003.generatingfunction='gen_ti2003';
|
tomwalters@0
|
80 all_options.sai.ti2003.displayname='time integration stabilized auditory image';
|
tomwalters@0
|
81 all_options.sai.ti2003.revision='$Revision: 585 $';
|
tomwalters@0
|
82 all_options.sai.ti2003.criterion='change_weights';
|
tomwalters@0
|
83 all_options.sai.ti2003.start_time=0;
|
tomwalters@0
|
84 all_options.sai.ti2003.maxdelay=0.035;
|
tomwalters@0
|
85 all_options.sai.ti2003.buffer_memory_decay=0.03;
|
tomwalters@0
|
86 all_options.sai.ti2003.frames_per_second=300;
|
tomwalters@0
|
87 all_options.sai.ti2003.weight_threshold=0;
|
tomwalters@0
|
88 all_options.sai.ti2003.do_normalize=1;
|
tomwalters@0
|
89 all_options.sai.ti2003.do_times_nap_height=0;
|
tomwalters@0
|
90 all_options.sai.ti2003.do_adjust_weights=1;
|
tomwalters@0
|
91 all_options.sai.ti2003.strobe_weight_alpha=0.5;
|
tomwalters@0
|
92 all_options.sai.ti2003.delay_weight_change=0.5;
|
tomwalters@0
|
93 all_options.sai.ti2003.erb_frequency_integration=0;
|
tomwalters@0
|
94
|
tomwalters@0
|
95
|
tomwalters@0
|
96
|
tomwalters@0
|
97 % set the signal to the appropriate one
|
tomwalters@0
|
98 savewave(ct,'temp.wav');
|
tomwalters@0
|
99
|
tomwalters@0
|
100
|
tomwalters@0
|
101
|
tomwalters@0
|
102 res=aim(all_options);
|
tomwalters@0
|
103
|
tomwalters@0
|
104 resu=res.result;
|
tomwalters@0
|
105 len=length(resu);
|
tomwalters@0
|
106 click_frame=resu{1}; % its an empty one anyhow
|
tomwalters@0
|
107 for i=10:len
|
tomwalters@0
|
108 fr=resu{i}/1000;
|
tomwalters@0
|
109 click_frame=click_frame+fr;
|
tomwalters@0
|
110 end
|
tomwalters@0
|
111
|
tomwalters@0
|
112 save click_frame click_frame
|
tomwalters@0
|
113
|
tomwalters@0
|
114
|
tomwalters@0
|
115 res=click_frame;
|