dicklyon@517
|
1 % Copyright 2012, Google, Inc.
|
dicklyon@517
|
2 % Author: Richard F. Lyon
|
dicklyon@517
|
3 %
|
dicklyon@517
|
4 % This Matlab file is part of an implementation of Lyon's cochlear model:
|
dicklyon@517
|
5 % "Cascade of Asymmetric Resonators with Fast-Acting Compression"
|
dicklyon@517
|
6 % to supplement Lyon's upcoming book "Human and Machine Hearing"
|
dicklyon@517
|
7 %
|
dicklyon@517
|
8 % Licensed under the Apache License, Version 2.0 (the "License");
|
dicklyon@517
|
9 % you may not use this file except in compliance with the License.
|
dicklyon@517
|
10 % You may obtain a copy of the License at
|
dicklyon@517
|
11 %
|
dicklyon@517
|
12 % http://www.apache.org/licenses/LICENSE-2.0
|
dicklyon@517
|
13 %
|
dicklyon@517
|
14 % Unless required by applicable law or agreed to in writing, software
|
dicklyon@517
|
15 % distributed under the License is distributed on an "AS IS" BASIS,
|
dicklyon@517
|
16 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
dicklyon@517
|
17 % See the License for the specific language governing permissions and
|
dicklyon@517
|
18 % limitations under the License.
|
dicklyon@517
|
19
|
tom@516
|
20 function ERB = ERB_Hz(CF_Hz, ERB_break_freq, ERB_Q)
|
tom@516
|
21 % function ERB = ERB_Hz(CF_Hz, ERB_break_freq, ERB_Q)
|
tom@516
|
22 %
|
tom@516
|
23 % Auditory filter nominal Equivalent Rectangular Bandwidth
|
tom@516
|
24 % Ref: Glasberg and Moore: Hearing Research, 47 (1990), 103-138
|
tom@516
|
25 % ERB = 24.7 * (1 + 4.37 * CF_Hz / 1000);
|
tom@516
|
26
|
tom@516
|
27 if nargin < 3
|
tom@516
|
28 ERB_Q = 1000/(24.7*4.37); % 9.2645
|
tom@516
|
29 if nargin < 2
|
tom@516
|
30 ERB_break_freq = 1000/4.37; % 228.833
|
tom@516
|
31 end
|
tom@516
|
32 end
|
tom@516
|
33
|
tom@516
|
34 ERB = (ERB_break_freq + CF_Hz) / ERB_Q;
|