shithub: leaf

Download patch

ref: ab484c753c21984df48a58a68f684f4c2016b19a
parent: 3152c9f2d0d1dd1de3c1025ce7f924242ff2ca82
author: Matthew Wang <mjw7@princeton.edu>
date: Thu Aug 13 06:01:09 EDT 2020

correct dualpd exp moving average

--- a/leaf/Src/leaf-analysis.c
+++ b/leaf/Src/leaf-analysis.c
@@ -2165,7 +2165,7 @@
             else if (within_octave(detector, i.frequency))
             {
                 p->_current = i;
-                p->_mean = p->_current.frequency;//(0.222222f * p->_current.frequency) + (0.888888f * p->_mean);
+                p->_mean = (0.222222f * p->_current.frequency) + (0.777778f * p->_mean);
                 p->_predicted_frequency = 0.0f;
             }
         }