SyntheticTest » History » Version 8

Chris Cannam, 2013-11-18 04:05 PM

1 1 Chris Cannam
h1. Synthetic test material
2 1 Chris Cannam
3 6 Chris Cannam
{{>toc}}
4 6 Chris Cannam
5 1 Chris Cannam
h2. Sinusoid at fs/4
6 1 Chris Cannam
7 1 Chris Cannam
In Yeti terms:
8 1 Chris Cannam
9 1 Chris Cannam
<pre>
10 1 Chris Cannam
testStream = manipulate.withDuration 64 (syn.sinusoid 8 2);
11 1 Chris Cannam
cq = cqt { maxFreq = testStream.sampleRate/2, minFreq = 1, binsPerOctave = 4 } testStream;
12 1 Chris Cannam
</pre>
13 2 Chris Cannam
14 2 Chris Cannam
Or to put it another way (in MATLAB this time):
15 2 Chris Cannam
16 2 Chris Cannam
<pre>
17 2 Chris Cannam
test = [0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1 ];
18 2 Chris Cannam
out = cqt(test,1,4,4,8)
19 2 Chris Cannam
</pre>
20 2 Chris Cannam
21 2 Chris Cannam
That is, a 64-sample input of 8Hz sample rate containing a sinusoid at fs/4, transformed using CQ parameters fmin = 1, fmax = 4 (or fs/2), and bpo = 4.
22 3 Chris Cannam
23 3 Chris Cannam
h3. Data from MATLAB implementation
24 3 Chris Cannam
25 3 Chris Cannam
<pre>
26 3 Chris Cannam
actual fmin = 1.1892
27 3 Chris Cannam
octaves = 2
28 3 Chris Cannam
weight = 16.3452
29 3 Chris Cannam
drop = 3
30 3 Chris Cannam
kernel size = 32x20
31 3 Chris Cannam
output size = 8x59
32 3 Chris Cannam
</pre>
33 4 Chris Cannam
34 5 Chris Cannam
and the output (magnitudes only):
35 4 Chris Cannam
36 4 Chris Cannam
<pre>
37 4 Chris Cannam
  Columns 1 through 8
38 4 Chris Cannam
39 4 Chris Cannam
    0.0001         0    0.0002         0    0.0001         0    0.0002         0
40 4 Chris Cannam
    0.0001         0    0.0001         0    0.0002         0    0.0004         0
41 4 Chris Cannam
    0.0001         0    0.0001         0    0.0003         0    0.0011         0
42 4 Chris Cannam
    0.0002         0    0.0000         0    0.0003         0    0.0013         0
43 4 Chris Cannam
         0         0         0         0         0         0         0         0
44 4 Chris Cannam
         0         0         0         0         0         0         0         0
45 4 Chris Cannam
         0         0         0         0         0         0         0         0
46 4 Chris Cannam
         0         0         0         0         0         0         0         0
47 4 Chris Cannam
48 4 Chris Cannam
  Columns 9 through 16
49 4 Chris Cannam
50 4 Chris Cannam
    0.0011         0    0.0044         0    0.0980         0    0.3084         0
51 4 Chris Cannam
    0.0018         0    0.0082         0    0.0468         0    0.3858         0
52 4 Chris Cannam
    0.0050         0    0.0243         0    0.1211         0    0.6447         0
53 4 Chris Cannam
    0.0065         0    0.0309         0    0.1543         0    0.8114         0
54 4 Chris Cannam
         0         0         0         0    0.0002    0.0086    0.2742    1.1185
55 4 Chris Cannam
         0         0         0         0    0.0011    0.0010    0.0711    0.7025
56 4 Chris Cannam
         0         0         0         0    0.0001    0.0002    0.0099    0.5388
57 4 Chris Cannam
         0         0         0         0    0.0001    0.0019    0.0006    0.4688
58 4 Chris Cannam
59 4 Chris Cannam
  Columns 17 through 24
60 4 Chris Cannam
61 4 Chris Cannam
    0.3962         0    0.2374         0    0.0484         0    0.0032         0
62 4 Chris Cannam
    0.6804         0    0.3858         0    0.0468         0    0.0082         0
63 4 Chris Cannam
    1.1968         0    0.6447         0    0.1211         0    0.0243         0
64 4 Chris Cannam
    1.6297         0    0.8114         0    0.1544         0    0.0309         0
65 4 Chris Cannam
    2.1085    2.4893    2.4383    2.4312    2.4314    2.4307    2.4311    2.4311
66 4 Chris Cannam
    1.3506    0.9697    0.7693    0.7692    0.7688    0.7693    0.7691    0.7691
67 4 Chris Cannam
    0.8193    0.0813    0.0491    0.0649    0.0499    0.0643    0.0493    0.0646
68 4 Chris Cannam
    0.7188    0.0108    0.0492    0.0010    0.0493    0.0001    0.0488    0.0000
69 4 Chris Cannam
70 4 Chris Cannam
  Columns 25 through 32
71 4 Chris Cannam
72 4 Chris Cannam
    0.0007         0    0.0003         0    0.0006         0    0.0019         0
73 4 Chris Cannam
    0.0019         0    0.0005         0    0.0004         0    0.0032         0
74 4 Chris Cannam
    0.0051         0    0.0012         0    0.0019         0    0.0086         0
75 4 Chris Cannam
    0.0062         0    0.0008         0    0.0021         0    0.0111         0
76 4 Chris Cannam
    2.4311    2.4311    2.4311    2.4311    2.4311    2.4311    2.4311    2.4311
77 4 Chris Cannam
    0.7691    0.7691    0.7691    0.7691    0.7691    0.7691    0.7691    0.7691
78 4 Chris Cannam
    0.0493    0.0646    0.0493    0.0646    0.0493    0.0646    0.0493    0.0646
79 4 Chris Cannam
    0.0488    0.0000    0.0488    0.0000    0.0488    0.0000    0.0488    0.0000
80 4 Chris Cannam
81 4 Chris Cannam
  Columns 33 through 40
82 4 Chris Cannam
83 4 Chris Cannam
    0.0168         0    0.1633         0    0.3646         0    0.3646         0
84 4 Chris Cannam
    0.0143         0    0.1184         0    0.5325         0    0.6406         0
85 4 Chris Cannam
    0.0414         0    0.2181         0    0.9118         0    1.1190         0
86 4 Chris Cannam
    0.0532         0    0.2679         0    1.1926         0    1.5069         0
87 4 Chris Cannam
    2.4311    2.4309    2.4305    2.4835    2.3188    1.4767    0.4927    0.0454
88 4 Chris Cannam
    0.7692    0.7695    0.7692    0.7707    1.1679    1.2359    0.4175    0.0087
89 4 Chris Cannam
    0.0494    0.0639    0.0494    0.0651    0.3139    0.8970    0.2914    0.0008
90 4 Chris Cannam
    0.0490    0.0000    0.0490    0.0024    0.2044    0.8567    0.1557    0.0024
91 4 Chris Cannam
92 4 Chris Cannam
  Columns 41 through 48
93 4 Chris Cannam
94 4 Chris Cannam
    0.1633         0    0.0168         0    0.0019         0    0.0003         0
95 4 Chris Cannam
    0.2373         0    0.0229         0    0.0052         0    0.0012         0
96 4 Chris Cannam
    0.3956         0    0.0706         0    0.0144         0    0.0029         0
97 4 Chris Cannam
    0.4838         0    0.0905         0    0.0184         0    0.0037         0
98 4 Chris Cannam
    0.0000    0.0002         0         0         0         0         0         0
99 4 Chris Cannam
    0.0012    0.0004         0         0         0         0         0         0
100 4 Chris Cannam
    0.0002    0.0007         0         0         0         0         0         0
101 4 Chris Cannam
    0.0002    0.0000         0         0         0         0         0         0
102 4 Chris Cannam
103 4 Chris Cannam
  Columns 49 through 56
104 4 Chris Cannam
105 4 Chris Cannam
    0.0003         0    0.0000         0    0.0000         0    0.0000         0
106 4 Chris Cannam
    0.0003         0    0.0000         0    0.0000         0    0.0000         0
107 4 Chris Cannam
    0.0006         0    0.0001         0    0.0000         0    0.0000         0
108 4 Chris Cannam
    0.0009         0    0.0002         0    0.0000         0    0.0000         0
109 4 Chris Cannam
         0         0         0         0         0         0         0         0
110 4 Chris Cannam
         0         0         0         0         0         0         0         0
111 4 Chris Cannam
         0         0         0         0         0         0         0         0
112 4 Chris Cannam
         0         0         0         0         0         0         0         0
113 4 Chris Cannam
114 4 Chris Cannam
  Columns 57 through 59
115 4 Chris Cannam
116 4 Chris Cannam
    0.0000         0    0.0000
117 4 Chris Cannam
    0.0000         0    0.0000
118 4 Chris Cannam
    0.0000         0    0.0000
119 4 Chris Cannam
    0.0000         0    0.0000
120 4 Chris Cannam
         0         0         0
121 4 Chris Cannam
         0         0         0
122 4 Chris Cannam
         0         0         0
123 4 Chris Cannam
         0         0         0
124 6 Chris Cannam
</pre>
125 6 Chris Cannam
126 8 Chris Cannam
h3. Data from Yeti implementation
127 1 Chris Cannam
128 8 Chris Cannam
h4. Process data
129 8 Chris Cannam
130 8 Chris Cannam
<pre>
131 8 Chris Cannam
sampleRate = 8
132 8 Chris Cannam
maxFreq = 4
133 8 Chris Cannam
minFreq = 1
134 8 Chris Cannam
actualMinFreq = 1.189207115002721
135 8 Chris Cannam
octaves = 2
136 8 Chris Cannam
binsPerOctave = 4
137 8 Chris Cannam
</pre>
138 8 Chris Cannam
139 8 Chris Cannam
h4. Kernel data
140 8 Chris Cannam
141 6 Chris Cannam
That is,
142 6 Chris Cannam
143 6 Chris Cannam
<pre>
144 7 Chris Cannam
> (load cqtkernel).makeKernel { binsPerOctave = 4, maxFreq = 4, sampleRate = 8 }
145 7 Chris Cannam
</pre>
146 7 Chris Cannam
147 7 Chris Cannam
gives
148 7 Chris Cannam
149 6 Chris Cannam
<pre>
150 6 Chris Cannam
minFreq = 2.378414230005442, bigQ = 5.285213507883246, maxNK = 18, minNK = 11, atomHop = 3, firstCentre = 9, fftSize = 32
151 6 Chris Cannam
winNr = 5, lastCentre = 21, fftHop = 15
152 6 Chris Cannam
density = 0.6953125 (445 of 640)
153 6 Chris Cannam
weight = 16.34515230237943
154 6 Chris Cannam
{
155 6 Chris Cannam
   atomSpacing = 3,
156 6 Chris Cannam
   atomsPerFrame = 5,
157 6 Chris Cannam
   bigQ = 5.285213507883246,
158 6 Chris Cannam
   binsPerOctave = 4,
159 6 Chris Cannam
   fftHop = 15,
160 1 Chris Cannam
   fftSize = 32,
161 6 Chris Cannam
   firstCentre = 9,
162 8 Chris Cannam
   kernel = { ... , size = { columns = 32, rows = 20 } },
163 6 Chris Cannam
   maxFreq = 4,
164 6 Chris Cannam
   minFreq = 2.378414230005442
165 6 Chris Cannam
}
166 4 Chris Cannam
</pre>