


ERB2FRQ Convert ERB frequency scale to Hertz FRQ=(ERB)
frq = erb2frq(erb) converts a vector of ERB-rate values
to the corresponding frequencies in Hz.
[frq,bnd] = erb2frq(erb) also calculates the ERB bandwidths
Note that erb values must not exceed 42.79
See also: frq2erb

0001 function [frq,bnd] = erb2frq(erb) 0002 %ERB2FRQ Convert ERB frequency scale to Hertz FRQ=(ERB) 0003 % frq = erb2frq(erb) converts a vector of ERB-rate values 0004 % to the corresponding frequencies in Hz. 0005 % [frq,bnd] = erb2frq(erb) also calculates the ERB bandwidths 0006 % 0007 % Note that erb values must not exceed 42.79 0008 % 0009 % See also: frq2erb 0010 0011 % We have df/de = 6.23*f^2 + 93.39*f + 28.52 0012 % where the above expression gives the Equivalent Rectangular 0013 % Bandwidth (ERB)in Hz of a human auditory filter with a centre 0014 % frequency of f kHz. 0015 % 0016 % By integrating the reciprocal of the above expression, we 0017 % get: 0018 % e = a ln((f/p-1)/(f/q-1))/c 0019 % 0020 % where p and q are the roots of the equation: -0.312 and -14.7 0021 % and c = (6.23*(p-q))/1000 = 0.08950404 0022 % 0023 % from this we can derive: 0024 % 0025 % f = a/(b-exp(c*e)) - d 0026 % 0027 % where a = 1000 q (1 - q/p) = 676170.4 0028 % b = q/p = 47.06538 0029 % d = -1000q = 14678.49 0030 % and f is in Hz 0031 % 0032 % References: 0033 % 0034 % [1] B.C.J.Moore & B.R.Glasberg "Suggested formula for 0035 % calculating auditory-filter bandwidth and excitation 0036 % patterns", J Acoust Soc America V74, pp 750-753, 1983 0037 % 0038 % [2] O. Ghitza, "Auditory Models & Human Performance in Tasks 0039 % related to Speech Coding & Speech Recognition", 0040 % IEEE Trans on Speech & Audio Processing, Vol 2, 0041 % pp 115-132, Jan 1994 0042 % 0043 0044 % Copyright (C) Mike Brookes 1998 0045 % Version: $Id: erb2frq.m 713 2011-10-16 14:45:43Z dmb $ 0046 % 0047 % VOICEBOX is a MATLAB toolbox for speech processing. 0048 % Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html 0049 % 0050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0051 % This program is free software; you can redistribute it and/or modify 0052 % it under the terms of the GNU General Public License as published by 0053 % the Free Software Foundation; either version 2 of the License, or 0054 % (at your option) any later version. 0055 % 0056 % This program is distributed in the hope that it will be useful, 0057 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0058 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0059 % GNU General Public License for more details. 0060 % 0061 % You can obtain a copy of the GNU General Public License from 0062 % http://www.gnu.org/copyleft/gpl.html or by writing to 0063 % Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA. 0064 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0065 0066 frq = sign(erb).*(676170.4*(47.06538-exp(0.08950404*abs(erb))).^(-1) - 14678.49); 0067 bnd=6.23e-6*frq.^2 + 93.39e-3*abs(frq) + 28.52; 0068 if ~nargout 0069 plot(erb,frq,'-x'); 0070 xlabel(['Frequency (' xticksi 'Erb-rate)']); 0071 ylabel(['Frequency (' yticksi 'Hz)']); 0072 end