Mercurial > hg > aimc
annotate include/CAR.h @ 577:e4285e69a73d carfac_cpp
(none)
author | Ulf.Hammarqvist@gmail.com |
---|---|
date | Wed, 10 Oct 2012 19:30:59 +0000 |
parents | 83cd5bbf2a3e |
children | 71e3794ececa |
rev | line source |
---|---|
Ulf@503 | 1 #ifndef CAR_H_ |
Ulf@503 | 2 #define CAR_H_ |
Ulf@503 | 3 |
Ulf@503 | 4 #include "CARFAC_common.h" |
Ulf@503 | 5 #include <cmath> |
Ulf@503 | 6 |
Ulf@503 | 7 const double kDefaultErbBreakFreq = 165.3; |
Ulf@503 | 8 const double kDefaultErbQ = 1000/(24.7*4.37); |
Ulf@503 | 9 |
Ulf@503 | 10 class CAR_parameters{ |
Ulf@503 | 11 public: |
Ulf@503 | 12 CAR_parameters(): |
Ulf@503 | 13 velocity_scale_(0.2), |
Ulf@503 | 14 v_offset_(0.01), |
Ulf@503 | 15 v2_corner_(0.2), |
Ulf@503 | 16 v_damp_max_(0.01), |
Ulf@503 | 17 min_zeta_(0.10), |
Ulf@503 | 18 first_pole_theta_(0.085*kPi), |
Ulf@503 | 19 zero_ratio_(sqrt(2)), |
Ulf@503 | 20 high_f_damping_compression_(0.5), |
Ulf@503 | 21 erb_per_step_(0.5), |
Ulf@503 | 22 min_pole_hz_(30), |
Ulf@503 | 23 erb_break_freq_(kDefaultErbBreakFreq), |
Ulf@503 | 24 erb_q_(kDefaultErbQ) |
Ulf@503 | 25 { |
Ulf@503 | 26 // do nothing more |
Ulf@503 | 27 } |
Ulf@503 | 28 |
Ulf@503 | 29 virtual ~CAR_parameters(){ |
Ulf@503 | 30 // do nothing |
Ulf@503 | 31 } |
Ulf@503 | 32 |
Ulf@503 | 33 float velocity_scale_; |
Ulf@503 | 34 float v_offset_; |
Ulf@503 | 35 float v2_corner_; |
Ulf@503 | 36 float v_damp_max_; |
Ulf@503 | 37 float min_zeta_; |
Ulf@503 | 38 float first_pole_theta_; |
Ulf@503 | 39 float zero_ratio_; |
Ulf@503 | 40 float high_f_damping_compression_; |
Ulf@503 | 41 float erb_per_step_; |
Ulf@503 | 42 float min_pole_hz_; |
Ulf@503 | 43 float erb_break_freq_; |
Ulf@503 | 44 float erb_q_; |
Ulf@503 | 45 }; |
Ulf@503 | 46 |
Ulf@503 | 47 class CAR_coefficients{ |
Ulf@503 | 48 public: |
Ulf@503 | 49 CAR_coefficients(CAR_parameters*, float, FloatArray); |
Ulf@503 | 50 virtual ~CAR_coefficients(); |
Ulf@503 | 51 |
Ulf@503 | 52 FloatArray r1_coeffs_; |
Ulf@503 | 53 FloatArray a0_coeffs_; |
Ulf@503 | 54 FloatArray c0_coeffs_; |
Ulf@503 | 55 FloatArray h_coeffs_; |
Ulf@503 | 56 FloatArray g0_coeffs_; |
Ulf@503 | 57 FloatArray zr_coeffs_; |
Ulf@503 | 58 |
Ulf@503 | 59 private: |
Ulf@503 | 60 CAR_coefficients(); |
Ulf@503 | 61 }; |
Ulf@503 | 62 |
Ulf@503 | 63 #endif /* CAR_H_ */ |