tomwalters@0: % generating function 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 sig=genome(sig,options) tomwalters@0: % generating function for the outer/middle ear transfere function tomwalters@0: tomwalters@0: waithand=waitbar(0,'generating pre cochlea processing'); tomwalters@0: tomwalters@0: samplerate=getsr(sig); tomwalters@0: start_time=getminimumtime(sig); tomwalters@0: tomwalters@0: tomwalters@0: firfiltercoef = OutMidCrctFilt('MAP',samplerate,0); tomwalters@0: tomwalters@0: tomwalters@0: % to compensate the huge delay from the filter, a pause is added to the tomwalters@0: % signal, that is taken away in the end: tomwalters@0: pause=signal(abs(options.delay_correction),samplerate); tomwalters@0: sig=setstarttime(sig,0); tomwalters@0: sig=append(sig,pause); tomwalters@0: tomwalters@0: Snd=getvalues(sig); tomwalters@0: Snd=Snd'; tomwalters@0: Snd = filter(firfiltercoef,1,Snd); tomwalters@0: tomwalters@0: sig=setvalues(sig,Snd); tomwalters@0: tomwalters@0: %take the delay back: tomwalters@0: siglen=getlength(sig); tomwalters@0: sig=getpart(sig,abs(options.delay_correction),siglen); tomwalters@0: sig=setstarttime(sig,start_time); tomwalters@0: tomwalters@0: close(waithand);