tomwalters@0: /* tomwalters@0: Copyright (c) Applied Psychology Unit, Medical Research Council. 1988, 1989 tomwalters@0: =========================================================================== tomwalters@0: tomwalters@0: Permission to use, copy, modify, and distribute this software without fee tomwalters@0: is hereby granted for research purposes, provided that this copyright tomwalters@0: notice appears in all copies and in all supporting documentation, and that tomwalters@0: the software is not redistributed for any fee (except for a nominal shipping tomwalters@0: charge). Anyone wanting to incorporate all or part of this software in a tomwalters@0: commercial product must obtain a license from the Medical Research Council. tomwalters@0: tomwalters@0: The MRC makes no representations about the suitability of this tomwalters@0: software for any purpose. It is provided "as is" without express or implied tomwalters@0: warranty. tomwalters@0: tomwalters@0: THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING tomwalters@0: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE tomwalters@0: A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY tomwalters@0: DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN tomwalters@0: AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF tomwalters@0: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. tomwalters@0: */ tomwalters@0: tomwalters@0: /* tomwalters@0: Acknowledgment: tomwalters@0: ============== tomwalters@0: tomwalters@0: The source code provided in this file was originally developed by tomwalters@0: Christian Giguere as part of a Ph.D degree at the Department of tomwalters@0: Engineering of the University of Cambridge from April 1990 to tomwalters@0: November 1993. The code was subsequently adapted under a grant tomwalters@0: from the Hearing Research Trust for full compatibility with tomwalters@0: AIM Release 6.15. tomwalters@0: tomwalters@0: Christian Giguere 25/03/94 tomwalters@0: tomwalters@0: */ tomwalters@0: tomwalters@0: /* tomwalters@0: =========================================================== tomwalters@0: formulae_tl.c tomwalters@0: =========================================================== tomwalters@0: tomwalters@0: Supplements "formulae.c" tomwalters@0: (for use with WDF-TLF cochlear filterbank) tomwalters@0: tomwalters@0: Author : Christian Giguere tomwalters@0: First written : 30th March, 1991 tomwalters@0: Last edited : 17th December, 1993 tomwalters@0: tomwalters@0: References: tomwalters@0: (1) B.R.Glasberg and B.C.J.Moore (1990). Hear Res 47: 103-138. tomwalters@0: (2) D.D.Greenwood (1990). JASA 87(6): 2592-2605. tomwalters@0: =========================================================== tomwalters@0: */ tomwalters@0: tomwalters@0: tomwalters@0: /***** includes *****/ tomwalters@0: tomwalters@0: #include tomwalters@0: #include "formulae_tl.h" tomwalters@0: tomwalters@0: /***** functions *****/ tomwalters@0: tomwalters@0: /**************************************************************************** tomwalters@0: * name: comments: tomwalters@0: * tomwalters@0: * SetERBscaling() Stores a new value for the length of one critical-band tomwalters@0: * unit, i.e. the distance along the basilar membrane tomwalters@0: * corresponding to one critical band. tomwalters@0: * tomwalters@0: * Use: tomwalters@0: * 0.89 mm for ERB function of Glasberg and Moore (1990) tomwalters@0: * 1.00 mm for frequency-position function of Greenwood (1990) tomwalters@0: * tomwalters@0: * GetERBscaling() Returns the length of one critical-band unit. tomwalters@0: ****************************************************************************/ tomwalters@0: tomwalters@0: static double mmperERB = 0.89 ; /* millimeters per critical band */ tomwalters@0: /* Default = 0.89 (ERB) */ tomwalters@0: tomwalters@0: void SetERBscaling( new_mmperERB ) tomwalters@0: double new_mmperERB ; tomwalters@0: { tomwalters@0: mmperERB = new_mmperERB ; tomwalters@0: tomwalters@0: return ; tomwalters@0: } tomwalters@0: tomwalters@0: tomwalters@0: double GetERBscaling( ) tomwalters@0: { tomwalters@0: return ( mmperERB ) ; tomwalters@0: } tomwalters@0: