annotate matlab/bmm/carfac/ERB_Hz.m @ 474:3a873d04a7fe

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