comparison branches/carfac_cpp/include/CAR.h @ 564:9c4c3675c3f8

* Added class Ear, and moved the CARFAC members AGC CAR IHC into Ear. CARFAC now holds an array of Ear. TBD what is best. * Moved the files around, and introduced a makefile that builds unittests using GTest. (Note, GTest path is configured in makefile atm.). - two moronic tests implemented. :)
author Ulf.Hammarqvist@gmail.com
date Sun, 20 May 2012 22:36:47 +0000
parents
children f3dde307f4b8
comparison
equal deleted inserted replaced
563:fb602edc2d55 564:9c4c3675c3f8
1 #ifndef CAR_H_
2 #define CAR_H_
3
4 #include "CARFAC_common.h"
5 #include <cmath>
6
7 const double kDefaultErbBreakFreq = 165.3;
8 const double kDefaultErbQ = 1000/(24.7*4.37);
9
10 class CAR_parameters{
11 public:
12 CAR_parameters():
13 velocity_scale_(0.2),
14 v_offset_(0.01),
15 v2_corner_(0.2),
16 v_damp_max_(0.01),
17 min_zeta_(0.10),
18 first_pole_theta_(0.085*kPi),
19 zero_ratio_(sqrt(2)),
20 high_f_damping_compression_(0.5),
21 erb_per_step_(0.5),
22 min_pole_hz_(30),
23 erb_break_freq_(kDefaultErbBreakFreq),
24 erb_q_(kDefaultErbQ)
25 {
26 // do nothing more
27 }
28
29 virtual ~CAR_parameters(){
30 // do nothing
31 }
32
33 float velocity_scale_;
34 float v_offset_;
35 float v2_corner_;
36 float v_damp_max_;
37 float min_zeta_;
38 float first_pole_theta_;
39 float zero_ratio_;
40 float high_f_damping_compression_;
41 float erb_per_step_;
42 float min_pole_hz_;
43 float erb_break_freq_;
44 float erb_q_;
45 };
46
47 class CAR_coefficients{
48 public:
49 CAR_coefficients(CAR_parameters*, float, FloatArray);
50 virtual ~CAR_coefficients();
51
52 FloatArray r1_coeffs_;
53 FloatArray a0_coeffs_;
54 FloatArray c0_coeffs_;
55 FloatArray h_coeffs_;
56 FloatArray g0_coeffs_;
57 FloatArray zr_coeffs_;
58
59 private:
60 CAR_coefficients();
61 };
62
63 #endif /* CAR_H_ */