Mercurial > hg > aimc
diff carfac/car_params.cc @ 626:586b0677aae8
Fourth revision of Alex Brandmeyer's C++ implementation. Fixed more style issues, changed AGC structures to vectors, replaced FloatArray2d with vector<FloatArray>, implemented first tests using GTest to verify coefficients and monaural output against Matlab values (stored in aimc/carfac/test_data/). To run tests, change the path stored in carfac_test.h in TEST_SRC_DIR. Added CARFAC_GenerateTestData to the Matlab branch, fixed stage indexing in CARFAC_Cross_Couple.m to reflect changes in AGCCoeffs and AGCState structs.
author | alexbrandmeyer |
---|---|
date | Wed, 22 May 2013 21:30:02 +0000 |
parents | 0fbaf443ec82 |
children |
line wrap: on
line diff
--- a/carfac/car_params.cc Tue May 21 21:48:34 2013 +0000 +++ b/carfac/car_params.cc Wed May 22 21:30:02 2013 +0000 @@ -28,28 +28,11 @@ min_zeta_ = 0.1; max_zeta_ = 0.35; first_pole_theta_ = 0.85 * PI; - zero_ratio_ = 1.4142; + zero_ratio_ = sqrt(2.0); high_f_damping_compression_ = 0.5; erb_per_step_ = 0.5; min_pole_hz_ = 30; - erb_break_freq_ = 165.3; + erb_break_freq_ = 165.3; // This is the Greenwood map's break frequency. + // This represents Glassberg and Moore's high-cf ratio. erb_q_ = 1000/(24.7*4.37); -}; - -CARParams::CARParams(FPType velocity_scale, FPType v_offset, FPType min_zeta, - FPType max_zeta, FPType first_pole_theta, - FPType zero_ratio, FPType high_f_damping_compression, - FPType erb_per_step, FPType min_pole_hz_, - FPType erb_break_freq, FPType erb_q_) { - velocity_scale_ = velocity_scale; - v_offset_ = v_offset; - min_zeta_ = min_zeta; - max_zeta_ = max_zeta; - first_pole_theta_ = first_pole_theta; - zero_ratio_ = zero_ratio; - high_f_damping_compression_ = high_f_damping_compression; - erb_per_step_ = erb_per_step; - min_pole_hz_ = min_pole_hz_; - erb_break_freq_ = erb_break_freq; - erb_q_ = erb_q_; }; \ No newline at end of file