diff filter/gamma_tone.h @ 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/filter/gamma_tone.h	Fri May 20 15:19:45 2011 +0100
@@ -0,0 +1,116 @@
+/*
+    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.
+*/
+
+/*
+
+	 ==============================================================
+	  gamma_tone.h - portable recursive auditory filter bank code.
+	 ==============================================================
+
+		   J. Holdsworth - 23rd February 1988.
+
+
+    Copywright (c) Applied Psychology Unit, Medical Research Council. 1988.
+    =======================================================================
+
+
+    Release 2: 5th July 1988.
+    Release 3: 20th September 1988.
+    Rewrite :  21st January 1988.
+
+*/
+
+#define   _GAMMA_TONE_H_
+
+#define   GT_IDENT_STRING    "@(#)gamma_tone.h	1.5 J. Holdsworth (MRC-APU) 1/30/90\n"
+
+
+/* number of bits significant in input data */
+
+#define   bits_significant   12
+
+
+/* structure storing information common to all channels in filter */
+
+typedef struct _bank_info FilterBankInfo, *FilterBankInfoPtr ;
+
+struct _bank_info { double samplerate, b_scalar, max_desired_advance_time ;
+	   int order, phase_comp ; } ;
+
+
+/* structure storing information specific to state of particualr channel's filter */
+
+typedef char FilterChannelInfo, *FilterChannelInfoPtr ;
+
+
+extern double *GenerateCenterFrequencies(
+#ifdef vaxc
+double min_cf, double max_cf, double erb_density
+#endif
+) ;
+
+extern int NumberCenterFrequencies(
+#ifdef vaxc
+int min_cf, double max_cf, double erb_density
+#endif
+) ;
+
+extern double *NumberedCenterFrequencies(
+#ifdef vaxc
+double min_cf, double max_cf, int channels
+#endif
+) ;
+
+extern  double bandwidth_normalisation() ;
+
+
+extern  FilterBankInfo    *InitGammaToneFilterBank() ;
+extern  FilterChannelInfo *InitGammaToneFilterChannel() ;
+extern  void EndChannel() ;
+extern  void EndFilter() ;
+
+extern  int FilterShortDataArray() ;
+extern  int RealFilterShortDataArray() ;
+extern  int FilterIntDataArray() ;
+extern  int RealFilterIntDataArray() ;
+extern  int RealFilterDoubleDataArray() ;
+
+/* envelope functions */
+
+extern  int EnvelopeShortDataArray() ;
+extern  int RealEnvelopeShortDataArray() ;
+
+
+/* for compatability with release 1 */
+
+#define  InitGammaToneFilter InitGammaToneFilterBank
+#define  FilterDataArray     FilterShortDataArray
+#define  erb( _f )           Erb( _f )
+#define  erb_rate( _f )      ErbRate( _f )
+#define  f_of_erb_rate( _E ) FofErbRate( _E )
+#define  bandwidth_divisor   bandwidth_normalisation
+
+/* missing parameters availiable as globl variables */
+
+extern double filterDefaultGain ;
+extern int filterDefaultInputBits ;