Mercurial > hg > constant-q-cpp
changeset 2:0106107cb972
Another minor few sums...
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 24 Oct 2013 11:18:18 +0100 |
parents | f5379a70fc37 |
children | 53711c07ae3f |
files | yeti/cqtkernel.yeti |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/yeti/cqtkernel.yeti Wed Oct 23 17:31:04 2013 +0100 +++ b/yeti/cqtkernel.yeti Thu Oct 24 11:18:18 2013 +0100 @@ -1,7 +1,7 @@ module cqtkernel; -{ pow, round, nextPowerOfTwo } = load may.mathmisc; +{ pow, round, floor, ceil, nextPowerOfTwo } = load may.mathmisc; fs = 48000; @@ -33,5 +33,18 @@ println "fmin = \(fmin), bigQ = \(bigQ), nk_max = \(nk_max), nk_min = \(nk_min), atomHop = \(atomHop), first_center = \(first_center), fftLen = \(fftLen)"; +winNr = floor((fftLen - ceil(nk_max/2) - first_center) / atomHop) + 1; + +last_center = first_center + (winNr - 1) * atomHop; + +fftHop = (last_center + atomHop) - first_center; + +fftOverlap = ((fftLen - fftHop) / fftLen) * 100; // as % -- why? just for diagnostics? + +println "winNr = \(winNr), last_center = \(last_center), fftHop = \(fftHop), fftOverlap = \(fftOverlap)%"; + + + + ();