annotate toolboxes/MIRtoolbox1.3.2/AuditoryToolbox/ERBSpace.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function cfArray = ERBSpace(lowFreq, highFreq, N)
wolffd@0 2 % function cfArray = ERBSpace(lowFreq, highFreq, N)
wolffd@0 3 % This function computes an array of N frequencies uniformly spaced between
wolffd@0 4 % highFreq and lowFreq on an ERB scale. N is set to 100 if not specified.
wolffd@0 5 %
wolffd@0 6 % See also linspace, logspace, MakeERBCoeffs, MakeERBFilters.
wolffd@0 7 %
wolffd@0 8 % For a definition of ERB, see Moore, B. C. J., and Glasberg, B. R. (1983).
wolffd@0 9 % "Suggested formulae for calculating auditory-filter bandwidths and
wolffd@0 10 % excitation patterns," J. Acoust. Soc. Am. 74, 750-753.
wolffd@0 11
wolffd@0 12 if nargin < 1
wolffd@0 13 lowFreq = 100;
wolffd@0 14 end
wolffd@0 15
wolffd@0 16 if nargin < 2
wolffd@0 17 highFreq = 44100/4;
wolffd@0 18 end
wolffd@0 19
wolffd@0 20 if nargin < 3
wolffd@0 21 N = 100;
wolffd@0 22 end
wolffd@0 23
wolffd@0 24 % Change the following three parameters if you wish to use a different
wolffd@0 25 % ERB scale. Must change in MakeERBCoeffs too.
wolffd@0 26 EarQ = 9.26449; % Glasberg and Moore Parameters
wolffd@0 27 minBW = 24.7;
wolffd@0 28 order = 1;
wolffd@0 29
wolffd@0 30 % All of the followFreqing expressions are derived in Apple TR #35, "An
wolffd@0 31 % Efficient Implementation of the Patterson-Holdsworth Cochlear
wolffd@0 32 % Filter Bank." See pages 33-34.
wolffd@0 33 cfArray = -(EarQ*minBW) + exp((1:N)'*(-log(highFreq + EarQ*minBW) + ...
wolffd@0 34 log(lowFreq + EarQ*minBW))/N) * (highFreq + EarQ*minBW);
wolffd@0 35