annotate 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 |
rev |
line source |
c@1
|
1
|
c@1
|
2 module cqtkernel;
|
c@1
|
3
|
c@1
|
4 { pow, round, nextPowerOfTwo } = load may.mathmisc;
|
c@1
|
5
|
c@1
|
6 fs = 48000;
|
c@1
|
7
|
c@1
|
8 fmax = fs/2;
|
c@1
|
9
|
c@1
|
10 bins = 24;
|
c@1
|
11
|
c@1
|
12 q = 1;
|
c@1
|
13
|
c@1
|
14 atomHopFactor = 0.25;
|
c@1
|
15
|
c@1
|
16 thresh = 0.0005;
|
c@1
|
17
|
c@1
|
18 fmin = (fmax/2) * (pow 2 (1/bins));
|
c@1
|
19
|
c@1
|
20 bigQ = q / ((pow 2 (1/bins)) - 1);
|
c@1
|
21
|
c@1
|
22 nk_max = round(bigQ * fs / fmin);
|
c@1
|
23
|
c@1
|
24 nk_min = round(bigQ * fs / (fmin * (pow 2 ((bins-1)/bins))));
|
c@1
|
25
|
c@1
|
26 atomHop = round(nk_min * atomHopFactor);
|
c@1
|
27
|
c@1
|
28 first_center = atomHop * Math#ceil(Math#ceil(nk_max/2) / atomHop);
|
c@1
|
29
|
c@1
|
30 fftLen = nextPowerOfTwo (first_center + Math#ceil(nk_max/2));
|
c@1
|
31
|
c@1
|
32 println "fs = \(fs), fmax = \(fmax), bins = \(bins), q = \(q), atomHopFactor = \(atomHopFactor), thresh = \(thresh)";
|
c@1
|
33
|
c@1
|
34 println "fmin = \(fmin), bigQ = \(bigQ), nk_max = \(nk_max), nk_min = \(nk_min), atomHop = \(atomHop), first_center = \(first_center), fftLen = \(fftLen)";
|
c@1
|
35
|
c@1
|
36 ();
|
c@1
|
37
|