Mercurial > hg > constant-q-cpp
diff yeti/cqt.yeti @ 41:ae7d2e558ed1
More debug testing
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 19 Nov 2013 19:27:45 +0000 |
parents | 031386846e3c |
children | 53d1e0d59ac5 |
line wrap: on
line diff
--- a/yeti/cqt.yeti Tue Nov 19 14:37:23 2013 +0000 +++ b/yeti/cqt.yeti Tue Nov 19 19:27:45 2013 +0000 @@ -17,13 +17,13 @@ octaves = ceil (log2 (maxFreq / minFreq)); actualMinFreq = (maxFreq / (pow 2 octaves)) * (pow 2 (1/binsPerOctave)); - eprintln "sampleRate = \(sampleRate), maxFreq = \(maxFreq), minFreq = \(minFreq), actualMinFreq = \(actualMinFreq), octaves = \(octaves), binsPerOctave = \(binsPerOctave)"; + kdata = cqtkernel.makeKernel { sampleRate, maxFreq, binsPerOctave }; - kdata = cqtkernel.makeKernel { sampleRate, maxFreq, binsPerOctave }; + eprintln "sampleRate = \(sampleRate), maxFreq = \(maxFreq), minFreq = \(minFreq), actualMinFreq = \(actualMinFreq), octaves = \(octaves), binsPerOctave = \(binsPerOctave), fftSize = \(kdata.fftSize), hop = \(kdata.fftHop)"; eprintln "atomsPerFrame = \(kdata.atomsPerFrame)"; - padding = (kdata.fftSize / 2) * (pow 2 (octaves-1)); + padding = (kdata.fftSize * (pow 2 (octaves-1))); eprintln "padding = \(padding)"; @@ -45,6 +45,8 @@ (resample.decimated (pow 2 octave) streams[octave]); map do frame: freq = fftFunc (cplx.complexArray frame (vec.zeros kdata.fftSize)); + println "octave = \(octave), frame = \(vec.list frame)"; + println "octave = \(octave), freq = \(freq)"; cm.product kernel (cm.newComplexColumnVector freq); done frames; done [0..octaves-1]; @@ -104,7 +106,7 @@ cqblocks = array (map2 do octlist octave: d = emptyHops * (pow 2 (octaves-octave)) - emptyHops; - d = 0; //!!! +// d = 0; //!!! eprintln "dropping \(d)"; drop d octlist;