comparison yeti/cqtkernel.yeti @ 1:f5379a70fc37

Initial kernel parameters
author Chris Cannam <c.cannam@qmul.ac.uk>
date Wed, 23 Oct 2013 17:31:04 +0100
parents
children 0106107cb972
comparison
equal deleted inserted replaced
0:750529532e53 1:f5379a70fc37
1
2 module cqtkernel;
3
4 { pow, round, nextPowerOfTwo } = load may.mathmisc;
5
6 fs = 48000;
7
8 fmax = fs/2;
9
10 bins = 24;
11
12 q = 1;
13
14 atomHopFactor = 0.25;
15
16 thresh = 0.0005;
17
18 fmin = (fmax/2) * (pow 2 (1/bins));
19
20 bigQ = q / ((pow 2 (1/bins)) - 1);
21
22 nk_max = round(bigQ * fs / fmin);
23
24 nk_min = round(bigQ * fs / (fmin * (pow 2 ((bins-1)/bins))));
25
26 atomHop = round(nk_min * atomHopFactor);
27
28 first_center = atomHop * Math#ceil(Math#ceil(nk_max/2) / atomHop);
29
30 fftLen = nextPowerOfTwo (first_center + Math#ceil(nk_max/2));
31
32 println "fs = \(fs), fmax = \(fmax), bins = \(bins), q = \(q), atomHopFactor = \(atomHopFactor), thresh = \(thresh)";
33
34 println "fmin = \(fmin), bigQ = \(bigQ), nk_max = \(nk_max), nk_min = \(nk_min), atomHop = \(atomHop), first_center = \(first_center), fftLen = \(fftLen)";
35
36 ();
37