shithub: aubio

Download patch

ref: 88fee8f77333c129db4055b5da0f446586d5acfc
parent: 39a7b26d00a5898b87643043304c634b66d1e7ad
author: Paul Brossier <[email protected]>
date: Wed Nov 27 12:46:25 EST 2013

src/pitch/pitchyinfft.c: beautify frequency weighting coefficients

--- a/src/pitch/pitchyinfft.c
+++ b/src/pitch/pitchyinfft.c
@@ -40,16 +40,18 @@
   uint_t short_period; /** shortest period under which to check for octave error */
 };
 
-static const smpl_t freqs[] = { 0., 20., 25., 31.5, 40., 50., 63., 80., 100.,
-  125., 160., 200., 250., 315., 400., 500., 630., 800., 1000., 1250.,
-  1600., 2000., 2500., 3150., 4000., 5000., 6300., 8000., 9000., 10000.,
-  12500., 15000., 20000., 25100
+static const smpl_t freqs[] = {
+     0.,    20.,    25.,   31.5,    40.,    50.,    63.,    80.,   100.,   125.,
+   160.,   200.,   250.,   315.,   400.,   500.,   630.,   800.,  1000.,  1250.,
+  1600.,  2000.,  2500.,  3150.,  4000.,  5000.,  6300.,  8000.,  9000., 10000.,
+ 12500., 15000., 20000., 25100
 };
 
-static const smpl_t weight[] = { -75.8, -70.1, -60.8, -52.1, -44.2, -37.5,
-  -31.3, -25.6, -20.9, -16.5, -12.6, -9.6, -7.0, -4.7, -3.0, -1.8, -0.8,
-  -0.2, -0.0, 0.5, 1.6, 3.2, 5.4, 7.8, 8.1, 5.3, -2.4, -11.1, -12.8,
-  -12.2, -7.4, -17.8, -17.8, -17.8
+static const smpl_t weight[] = {
+  -75.8,  -70.1,  -60.8,  -52.1,  -44.2,  -37.5,  -31.3,  -25.6,  -20.9,  -16.5,
+  -12.6,  -9.60,  -7.00,  -4.70,  -3.00,  -1.80,  -0.80,  -0.20,  -0.00,   0.50,
+   1.60,   3.20,   5.40,   7.80,   8.10,   5.30,  -2.40,  -11.1,  -12.8,  -12.2,
+  -7.40,  -17.8,  -17.8,  -17.8
 };
 
 aubio_pitchyinfft_t *