changeset 4:e026003433e5

Minor fixes
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 24 Oct 2013 15:09:38 +0100
parents 53711c07ae3f
children 6b59109469c4
files yeti/cqtkernel.yeti
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/yeti/cqtkernel.yeti	Thu Oct 24 14:43:36 2013 +0100
+++ b/yeti/cqtkernel.yeti	Thu Oct 24 15:09:38 2013 +0100
@@ -6,6 +6,7 @@
 complex = load may.complex;
 window = load may.signal.window;
 fft = load may.transform.fft;
+pl = load may.plot;
 
 { pow, round, floor, ceil, nextPowerOfTwo } = load may.mathmisc;
 
@@ -78,20 +79,22 @@
 
         shift = atomOffset + ((i-1) * atomHop);
 
+        println "shift = \(shift)";
+
         specKernel = fftFunc
            (complex.complexArray
                (vec.concat [vec.zeros shift, reals])
                (vec.concat [vec.zeros shift, imags]));
 
         map do c:
-            if complex.magnitude c < thresh then complex.zero else c fi
+            if complex.magnitude c < thresh then complex.zero
+            else complex.scale (1/fftLen) c fi
             done specKernel;
-        
+
     done [1..winNr];
 
 done [1..bins];
 
-println "kernels = \(kernels)";
+array (map array (concat kernels));
 
-();