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