annotate 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
rev   line source
tomwalters@0 1 /*
tomwalters@0 2 Copyright (c) Applied Psychology Unit, Medical Research Council. 1988, 1989
tomwalters@0 3 ===========================================================================
tomwalters@0 4
tomwalters@0 5 Permission to use, copy, modify, and distribute this software without fee
tomwalters@0 6 is hereby granted for research purposes, provided that this copyright
tomwalters@0 7 notice appears in all copies and in all supporting documentation, and that
tomwalters@0 8 the software is not redistributed for any fee (except for a nominal shipping
tomwalters@0 9 charge). Anyone wanting to incorporate all or part of this software in a
tomwalters@0 10 commercial product must obtain a license from the Medical Research Council.
tomwalters@0 11
tomwalters@0 12 The MRC makes no representations about the suitability of this
tomwalters@0 13 software for any purpose. It is provided "as is" without express or implied
tomwalters@0 14 warranty.
tomwalters@0 15
tomwalters@0 16 THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
tomwalters@0 17 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE
tomwalters@0 18 A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
tomwalters@0 19 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
tomwalters@0 20 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
tomwalters@0 21 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
tomwalters@0 22 */
tomwalters@0 23
tomwalters@0 24 /*
tomwalters@0 25
tomwalters@0 26 ==============================================================
tomwalters@0 27 gamma_tone.h - portable recursive auditory filter bank code.
tomwalters@0 28 ==============================================================
tomwalters@0 29
tomwalters@0 30 J. Holdsworth - 23rd February 1988.
tomwalters@0 31
tomwalters@0 32
tomwalters@0 33 Copywright (c) Applied Psychology Unit, Medical Research Council. 1988.
tomwalters@0 34 =======================================================================
tomwalters@0 35
tomwalters@0 36
tomwalters@0 37 Release 2: 5th July 1988.
tomwalters@0 38 Release 3: 20th September 1988.
tomwalters@0 39 Rewrite : 21st January 1988.
tomwalters@0 40
tomwalters@0 41 */
tomwalters@0 42
tomwalters@0 43 #define _GAMMA_TONE_H_
tomwalters@0 44
tomwalters@0 45 #define GT_IDENT_STRING "@(#)gamma_tone.h 1.5 J. Holdsworth (MRC-APU) 1/30/90\n"
tomwalters@0 46
tomwalters@0 47
tomwalters@0 48 /* number of bits significant in input data */
tomwalters@0 49
tomwalters@0 50 #define bits_significant 12
tomwalters@0 51
tomwalters@0 52
tomwalters@0 53 /* structure storing information common to all channels in filter */
tomwalters@0 54
tomwalters@0 55 typedef struct _bank_info FilterBankInfo, *FilterBankInfoPtr ;
tomwalters@0 56
tomwalters@0 57 struct _bank_info { double samplerate, b_scalar, max_desired_advance_time ;
tomwalters@0 58 int order, phase_comp ; } ;
tomwalters@0 59
tomwalters@0 60
tomwalters@0 61 /* structure storing information specific to state of particualr channel's filter */
tomwalters@0 62
tomwalters@0 63 typedef char FilterChannelInfo, *FilterChannelInfoPtr ;
tomwalters@0 64
tomwalters@0 65
tomwalters@0 66 extern double *GenerateCenterFrequencies(
tomwalters@0 67 #ifdef vaxc
tomwalters@0 68 double min_cf, double max_cf, double erb_density
tomwalters@0 69 #endif
tomwalters@0 70 ) ;
tomwalters@0 71
tomwalters@0 72 extern int NumberCenterFrequencies(
tomwalters@0 73 #ifdef vaxc
tomwalters@0 74 int min_cf, double max_cf, double erb_density
tomwalters@0 75 #endif
tomwalters@0 76 ) ;
tomwalters@0 77
tomwalters@0 78 extern double *NumberedCenterFrequencies(
tomwalters@0 79 #ifdef vaxc
tomwalters@0 80 double min_cf, double max_cf, int channels
tomwalters@0 81 #endif
tomwalters@0 82 ) ;
tomwalters@0 83
tomwalters@0 84 extern double bandwidth_normalisation() ;
tomwalters@0 85
tomwalters@0 86
tomwalters@0 87 extern FilterBankInfo *InitGammaToneFilterBank() ;
tomwalters@0 88 extern FilterChannelInfo *InitGammaToneFilterChannel() ;
tomwalters@0 89 extern void EndChannel() ;
tomwalters@0 90 extern void EndFilter() ;
tomwalters@0 91
tomwalters@0 92 extern int FilterShortDataArray() ;
tomwalters@0 93 extern int RealFilterShortDataArray() ;
tomwalters@0 94 extern int FilterIntDataArray() ;
tomwalters@0 95 extern int RealFilterIntDataArray() ;
tomwalters@0 96 extern int RealFilterDoubleDataArray() ;
tomwalters@0 97
tomwalters@0 98 /* envelope functions */
tomwalters@0 99
tomwalters@0 100 extern int EnvelopeShortDataArray() ;
tomwalters@0 101 extern int RealEnvelopeShortDataArray() ;
tomwalters@0 102
tomwalters@0 103
tomwalters@0 104 /* for compatability with release 1 */
tomwalters@0 105
tomwalters@0 106 #define InitGammaToneFilter InitGammaToneFilterBank
tomwalters@0 107 #define FilterDataArray FilterShortDataArray
tomwalters@0 108 #define erb( _f ) Erb( _f )
tomwalters@0 109 #define erb_rate( _f ) ErbRate( _f )
tomwalters@0 110 #define f_of_erb_rate( _E ) FofErbRate( _E )
tomwalters@0 111 #define bandwidth_divisor bandwidth_normalisation
tomwalters@0 112
tomwalters@0 113 /* missing parameters availiable as globl variables */
tomwalters@0 114
tomwalters@0 115 extern double filterDefaultGain ;
tomwalters@0 116 extern int filterDefaultInputBits ;