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

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