tomwalters@0: % tomwalters@0: % function adjacent_band_level=calcfreqslope(cf,af); tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % 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 adjacent_band_level=calcfreqslope(cf,af,b); tomwalters@0: % function used to calculate the relative amplitudes in adjacent GTFBs tomwalters@0: %e.g to calculate the level in 2000Hz critical band due to excitation tomwalters@0: %in 1000Hz critical band calcfreqslope(2000,1000); tomwalters@0: tomwalters@0: tomwalters@0: n=4; tomwalters@0: %ERB = 24.7+0.108.*cf; tomwalters@0: [dummy ERB]=Freq2ERB(cf); tomwalters@0: B=b.*ERB; tomwalters@0: tomwalters@0: tomwalters@0: h_cf=abs(3.*(B./(2.*pi.*i.*(cf-cf)+2.*pi.*B)).^n); tomwalters@0: h_af=abs(3.*(B./(2.*pi.*i.*(af-cf)+2.*pi.*B)).^n); tomwalters@0: tomwalters@0: adjacent_band_level=h_af./h_cf; tomwalters@0: adjacent_band_level=20.*log10(adjacent_band_level); tomwalters@0: tomwalters@0: