# HG changeset patch # User Chris Cannam # Date 1382545864 -3600 # Node ID f5379a70fc3786c52eb2484f3482d3273f84fdc2 # Parent 750529532e53509ed7ac9a8a38a97d769da5356c Initial kernel parameters diff -r 750529532e53 -r f5379a70fc37 yeti/cqtkernel.yeti --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/yeti/cqtkernel.yeti Wed Oct 23 17:31:04 2013 +0100 @@ -0,0 +1,37 @@ + +module cqtkernel; + +{ pow, round, nextPowerOfTwo } = load may.mathmisc; + +fs = 48000; + +fmax = fs/2; + +bins = 24; + +q = 1; + +atomHopFactor = 0.25; + +thresh = 0.0005; + +fmin = (fmax/2) * (pow 2 (1/bins)); + +bigQ = q / ((pow 2 (1/bins)) - 1); + +nk_max = round(bigQ * fs / fmin); + +nk_min = round(bigQ * fs / (fmin * (pow 2 ((bins-1)/bins)))); + +atomHop = round(nk_min * atomHopFactor); + +first_center = atomHop * Math#ceil(Math#ceil(nk_max/2) / atomHop); + +fftLen = nextPowerOfTwo (first_center + Math#ceil(nk_max/2)); + +println "fs = \(fs), fmax = \(fmax), bins = \(bins), q = \(q), atomHopFactor = \(atomHopFactor), thresh = \(thresh)"; + +println "fmin = \(fmin), bigQ = \(bigQ), nk_max = \(nk_max), nk_min = \(nk_min), atomHop = \(atomHop), first_center = \(first_center), fftLen = \(fftLen)"; + +(); +