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