SyntheticTest » History » Version 13
Chris Cannam, 2013-11-19 12:21 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 | 9 | Chris Cannam | !/attachments/download/868/Screenshot%20-%20181113%20-%2016_05_56.png! |
26 | 9 | Chris Cannam | |
27 | 3 | Chris Cannam | <pre> |
28 | 3 | Chris Cannam | actual fmin = 1.1892 |
29 | 3 | Chris Cannam | octaves = 2 |
30 | 3 | Chris Cannam | weight = 16.3452 |
31 | 3 | Chris Cannam | drop = 3 |
32 | 3 | Chris Cannam | kernel size = 32x20 |
33 | 3 | Chris Cannam | output size = 8x59 |
34 | 3 | Chris Cannam | </pre> |
35 | 4 | Chris Cannam | |
36 | 5 | Chris Cannam | and the output (magnitudes only): |
37 | 4 | Chris Cannam | |
38 | 4 | Chris Cannam | <pre> |
39 | 4 | Chris Cannam | Columns 1 through 8 |
40 | 4 | Chris Cannam | |
41 | 4 | Chris Cannam | 0.0001 0 0.0002 0 0.0001 0 0.0002 0 |
42 | 4 | Chris Cannam | 0.0001 0 0.0001 0 0.0002 0 0.0004 0 |
43 | 4 | Chris Cannam | 0.0001 0 0.0001 0 0.0003 0 0.0011 0 |
44 | 4 | Chris Cannam | 0.0002 0 0.0000 0 0.0003 0 0.0013 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 | 0 0 0 0 0 0 0 0 |
48 | 4 | Chris Cannam | 0 0 0 0 0 0 0 0 |
49 | 4 | Chris Cannam | |
50 | 4 | Chris Cannam | Columns 9 through 16 |
51 | 4 | Chris Cannam | |
52 | 4 | Chris Cannam | 0.0011 0 0.0044 0 0.0980 0 0.3084 0 |
53 | 4 | Chris Cannam | 0.0018 0 0.0082 0 0.0468 0 0.3858 0 |
54 | 4 | Chris Cannam | 0.0050 0 0.0243 0 0.1211 0 0.6447 0 |
55 | 4 | Chris Cannam | 0.0065 0 0.0309 0 0.1543 0 0.8114 0 |
56 | 4 | Chris Cannam | 0 0 0 0 0.0002 0.0086 0.2742 1.1185 |
57 | 4 | Chris Cannam | 0 0 0 0 0.0011 0.0010 0.0711 0.7025 |
58 | 4 | Chris Cannam | 0 0 0 0 0.0001 0.0002 0.0099 0.5388 |
59 | 4 | Chris Cannam | 0 0 0 0 0.0001 0.0019 0.0006 0.4688 |
60 | 4 | Chris Cannam | |
61 | 4 | Chris Cannam | Columns 17 through 24 |
62 | 4 | Chris Cannam | |
63 | 4 | Chris Cannam | 0.3962 0 0.2374 0 0.0484 0 0.0032 0 |
64 | 4 | Chris Cannam | 0.6804 0 0.3858 0 0.0468 0 0.0082 0 |
65 | 4 | Chris Cannam | 1.1968 0 0.6447 0 0.1211 0 0.0243 0 |
66 | 4 | Chris Cannam | 1.6297 0 0.8114 0 0.1544 0 0.0309 0 |
67 | 4 | Chris Cannam | 2.1085 2.4893 2.4383 2.4312 2.4314 2.4307 2.4311 2.4311 |
68 | 4 | Chris Cannam | 1.3506 0.9697 0.7693 0.7692 0.7688 0.7693 0.7691 0.7691 |
69 | 4 | Chris Cannam | 0.8193 0.0813 0.0491 0.0649 0.0499 0.0643 0.0493 0.0646 |
70 | 4 | Chris Cannam | 0.7188 0.0108 0.0492 0.0010 0.0493 0.0001 0.0488 0.0000 |
71 | 4 | Chris Cannam | |
72 | 4 | Chris Cannam | Columns 25 through 32 |
73 | 4 | Chris Cannam | |
74 | 4 | Chris Cannam | 0.0007 0 0.0003 0 0.0006 0 0.0019 0 |
75 | 4 | Chris Cannam | 0.0019 0 0.0005 0 0.0004 0 0.0032 0 |
76 | 4 | Chris Cannam | 0.0051 0 0.0012 0 0.0019 0 0.0086 0 |
77 | 4 | Chris Cannam | 0.0062 0 0.0008 0 0.0021 0 0.0111 0 |
78 | 4 | Chris Cannam | 2.4311 2.4311 2.4311 2.4311 2.4311 2.4311 2.4311 2.4311 |
79 | 4 | Chris Cannam | 0.7691 0.7691 0.7691 0.7691 0.7691 0.7691 0.7691 0.7691 |
80 | 4 | Chris Cannam | 0.0493 0.0646 0.0493 0.0646 0.0493 0.0646 0.0493 0.0646 |
81 | 4 | Chris Cannam | 0.0488 0.0000 0.0488 0.0000 0.0488 0.0000 0.0488 0.0000 |
82 | 4 | Chris Cannam | |
83 | 4 | Chris Cannam | Columns 33 through 40 |
84 | 4 | Chris Cannam | |
85 | 4 | Chris Cannam | 0.0168 0 0.1633 0 0.3646 0 0.3646 0 |
86 | 4 | Chris Cannam | 0.0143 0 0.1184 0 0.5325 0 0.6406 0 |
87 | 4 | Chris Cannam | 0.0414 0 0.2181 0 0.9118 0 1.1190 0 |
88 | 4 | Chris Cannam | 0.0532 0 0.2679 0 1.1926 0 1.5069 0 |
89 | 4 | Chris Cannam | 2.4311 2.4309 2.4305 2.4835 2.3188 1.4767 0.4927 0.0454 |
90 | 4 | Chris Cannam | 0.7692 0.7695 0.7692 0.7707 1.1679 1.2359 0.4175 0.0087 |
91 | 4 | Chris Cannam | 0.0494 0.0639 0.0494 0.0651 0.3139 0.8970 0.2914 0.0008 |
92 | 4 | Chris Cannam | 0.0490 0.0000 0.0490 0.0024 0.2044 0.8567 0.1557 0.0024 |
93 | 4 | Chris Cannam | |
94 | 4 | Chris Cannam | Columns 41 through 48 |
95 | 4 | Chris Cannam | |
96 | 4 | Chris Cannam | 0.1633 0 0.0168 0 0.0019 0 0.0003 0 |
97 | 4 | Chris Cannam | 0.2373 0 0.0229 0 0.0052 0 0.0012 0 |
98 | 4 | Chris Cannam | 0.3956 0 0.0706 0 0.0144 0 0.0029 0 |
99 | 4 | Chris Cannam | 0.4838 0 0.0905 0 0.0184 0 0.0037 0 |
100 | 4 | Chris Cannam | 0.0000 0.0002 0 0 0 0 0 0 |
101 | 4 | Chris Cannam | 0.0012 0.0004 0 0 0 0 0 0 |
102 | 4 | Chris Cannam | 0.0002 0.0007 0 0 0 0 0 0 |
103 | 4 | Chris Cannam | 0.0002 0.0000 0 0 0 0 0 0 |
104 | 4 | Chris Cannam | |
105 | 4 | Chris Cannam | Columns 49 through 56 |
106 | 4 | Chris Cannam | |
107 | 4 | Chris Cannam | 0.0003 0 0.0000 0 0.0000 0 0.0000 0 |
108 | 4 | Chris Cannam | 0.0003 0 0.0000 0 0.0000 0 0.0000 0 |
109 | 4 | Chris Cannam | 0.0006 0 0.0001 0 0.0000 0 0.0000 0 |
110 | 4 | Chris Cannam | 0.0009 0 0.0002 0 0.0000 0 0.0000 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 | 0 0 0 0 0 0 0 0 |
114 | 4 | Chris Cannam | 0 0 0 0 0 0 0 0 |
115 | 4 | Chris Cannam | |
116 | 4 | Chris Cannam | Columns 57 through 59 |
117 | 4 | Chris Cannam | |
118 | 4 | Chris Cannam | 0.0000 0 0.0000 |
119 | 4 | Chris Cannam | 0.0000 0 0.0000 |
120 | 4 | Chris Cannam | 0.0000 0 0.0000 |
121 | 4 | Chris Cannam | 0.0000 0 0.0000 |
122 | 4 | Chris Cannam | 0 0 0 |
123 | 4 | Chris Cannam | 0 0 0 |
124 | 4 | Chris Cannam | 0 0 0 |
125 | 4 | Chris Cannam | 0 0 0 |
126 | 6 | Chris Cannam | </pre> |
127 | 6 | Chris Cannam | |
128 | 8 | Chris Cannam | h3. Data from Yeti implementation |
129 | 1 | Chris Cannam | |
130 | 8 | Chris Cannam | h4. Process data |
131 | 8 | Chris Cannam | |
132 | 8 | Chris Cannam | <pre> |
133 | 8 | Chris Cannam | sampleRate = 8 |
134 | 8 | Chris Cannam | maxFreq = 4 |
135 | 8 | Chris Cannam | minFreq = 1 |
136 | 8 | Chris Cannam | actualMinFreq = 1.189207115002721 |
137 | 8 | Chris Cannam | octaves = 2 |
138 | 8 | Chris Cannam | binsPerOctave = 4 |
139 | 10 | Chris Cannam | |
140 | 10 | Chris Cannam | overall output size = {columns=40, rows=8} |
141 | 8 | Chris Cannam | </pre> |
142 | 8 | Chris Cannam | |
143 | 8 | Chris Cannam | h4. Kernel data |
144 | 8 | Chris Cannam | |
145 | 6 | Chris Cannam | That is, |
146 | 6 | Chris Cannam | |
147 | 6 | Chris Cannam | <pre> |
148 | 7 | Chris Cannam | > (load cqtkernel).makeKernel { binsPerOctave = 4, maxFreq = 4, sampleRate = 8 } |
149 | 7 | Chris Cannam | </pre> |
150 | 7 | Chris Cannam | |
151 | 7 | Chris Cannam | gives |
152 | 7 | Chris Cannam | |
153 | 6 | Chris Cannam | <pre> |
154 | 6 | Chris Cannam | minFreq = 2.378414230005442, bigQ = 5.285213507883246, maxNK = 18, minNK = 11, atomHop = 3, firstCentre = 9, fftSize = 32 |
155 | 6 | Chris Cannam | winNr = 5, lastCentre = 21, fftHop = 15 |
156 | 6 | Chris Cannam | density = 0.6953125 (445 of 640) |
157 | 6 | Chris Cannam | weight = 16.34515230237943 |
158 | 6 | Chris Cannam | { |
159 | 6 | Chris Cannam | atomSpacing = 3, |
160 | 6 | Chris Cannam | atomsPerFrame = 5, |
161 | 6 | Chris Cannam | bigQ = 5.285213507883246, |
162 | 6 | Chris Cannam | binsPerOctave = 4, |
163 | 6 | Chris Cannam | fftHop = 15, |
164 | 1 | Chris Cannam | fftSize = 32, |
165 | 6 | Chris Cannam | firstCentre = 9, |
166 | 8 | Chris Cannam | kernel = { ... , size = { columns = 32, rows = 20 } }, |
167 | 6 | Chris Cannam | maxFreq = 4, |
168 | 6 | Chris Cannam | minFreq = 2.378414230005442 |
169 | 6 | Chris Cannam | } |
170 | 4 | Chris Cannam | </pre> |
171 | 11 | Chris Cannam | |
172 | 13 | Chris Cannam | <pre> |
173 | 13 | Chris Cannam | bin frequencies: |
174 | 13 | Chris Cannam | [3.9999999999999996,3.3635856610148585,2.82842712474619,2.378414230005442, |
175 | 13 | Chris Cannam | 1.9999999999999998,1.6817928305074292,1.414213562373095,1.189207115002721] |
176 | 13 | Chris Cannam | </pre> |
177 | 13 | Chris Cannam | |
178 | 11 | Chris Cannam | h4. Output |
179 | 11 | Chris Cannam | |
180 | 12 | Chris Cannam | Notes on this: |
181 | 12 | Chris Cannam | |
182 | 12 | Chris Cannam | * We should expect the top octave (which is the bottom half of the matrix, in this printout and the MATLAB one above) to be identical in both versions. It isn't quite. |
183 | 12 | Chris Cannam | * The bottom octave can be expected to vary because the two implementations have different decimators. |
184 | 12 | Chris Cannam | * Alignment is clearly not done correctly, but we expect different alignment requirements for each octave anyway |
185 | 12 | Chris Cannam | * The repeating patterns in the Yeti output, in the top octave from roughly column 7 (counting from 1) to column 22 are comparable with those in the MATLAB from column 19 to column 36 |
186 | 12 | Chris Cannam | * I can't see any such obvious alignment in the other octave |
187 | 12 | Chris Cannam | |
188 | 12 | Chris Cannam | |
189 | 11 | Chris Cannam | <pre> |
190 | 11 | Chris Cannam | Columns 1 to 8 |
191 | 11 | Chris Cannam | |
192 | 11 | Chris Cannam | 0.0062 0 0.1939 0 0.5393 0 0.6454 0 |
193 | 11 | Chris Cannam | 2.0E-4 0 0.0579 0 0.5993 0 1.0286 0 |
194 | 11 | Chris Cannam | 1.0E-4 0 0.0075 0 0.6026 0 1.757 0 |
195 | 11 | Chris Cannam | 6.0E-4 0 1.0E-4 0 0.4464 0 2.2625 0 |
196 | 11 | Chris Cannam | 8.0E-4 0.1289 0.7799 1.8196 2.4423 2.4596 2.4313 2.4312 |
197 | 11 | Chris Cannam | 4.0E-4 0.0086 0.4173 1.2368 1.1677 0.7713 0.7694 0.7692 |
198 | 11 | Chris Cannam | 0 3.0E-4 0.2913 0.8965 0.314 0.0646 0.0491 0.0646 |
199 | 11 | Chris Cannam | 0 0.0023 0.1558 0.8546 0.2042 3.0E-4 0.0487 0 |
200 | 11 | Chris Cannam | |
201 | 11 | Chris Cannam | Columns 9 to 16 |
202 | 11 | Chris Cannam | |
203 | 11 | Chris Cannam | 0.357 0 0.0622 0 0.005 0 0.0036 0 |
204 | 11 | Chris Cannam | 0.5072 0 0.0268 0 0.035 0 0.0297 0 |
205 | 11 | Chris Cannam | 1.4134 0 0.7419 0 0.4654 0 0.2754 0 |
206 | 11 | Chris Cannam | 2.2998 0 1.3286 0 0.8006 0 0.422 0 |
207 | 11 | Chris Cannam | 2.4311 2.4304 2.4311 2.4311 2.4311 2.4311 2.4311 2.4311 |
208 | 11 | Chris Cannam | 0.7688 0.7692 0.7691 0.7691 0.7691 0.7691 0.7691 0.7691 |
209 | 11 | Chris Cannam | 0.0494 0.0646 0.0493 0.0645 0.0493 0.0645 0.0493 0.0645 |
210 | 11 | Chris Cannam | 0.0492 0 0.0487 0 0.0487 0 0.0487 0 |
211 | 11 | Chris Cannam | |
212 | 11 | Chris Cannam | Columns 17 to 24 |
213 | 11 | Chris Cannam | |
214 | 11 | Chris Cannam | 0.0028 0 0.0032 0 0.0042 0 0.0356 0 |
215 | 11 | Chris Cannam | 0.0276 0 0.0281 0 0.0311 0 0.0364 0 |
216 | 11 | Chris Cannam | 0.1564 0 0.1849 0 0.3315 0 0.5455 0 |
217 | 11 | Chris Cannam | 0.1018 0 0.2055 0 0.5387 0 0.9529 0 |
218 | 11 | Chris Cannam | 2.4311 2.4311 2.4311 2.4311 2.4311 2.4311 2.459 2.442 |
219 | 11 | Chris Cannam | 0.7691 0.7691 0.7691 0.7691 0.7691 0.7694 0.7691 0.969 |
220 | 11 | Chris Cannam | 0.0493 0.0645 0.0493 0.0645 0.0497 0.0642 0.0492 0.0816 |
221 | 11 | Chris Cannam | 0.0487 0 0.0487 0 0.049 9.0E-4 0.0494 0.0087 |
222 | 11 | Chris Cannam | |
223 | 11 | Chris Cannam | Columns 25 to 32 |
224 | 11 | Chris Cannam | |
225 | 11 | Chris Cannam | 0.2089 0 0.3834 0 0.3231 0 0.1176 0 |
226 | 11 | Chris Cannam | 0.1912 0 0.6183 0 0.5288 0 0.1079 0 |
227 | 11 | Chris Cannam | 0.9105 0 1.3187 0 0.6723 0 0.0493 0 |
228 | 11 | Chris Cannam | 1.572 0 1.856 0 0.6379 0 0.0053 0 |
229 | 11 | Chris Cannam | 1.8192 0.7802 0.1289 8.0E-4 3.0E-4 3.0E-4 0 0 |
230 | 11 | Chris Cannam | 1.3506 0.7023 0.0712 0.001 1.0E-4 2.0E-4 0 0 |
231 | 11 | Chris Cannam | 0.819 0.5381 0.0101 6.0E-4 2.0E-4 7.0E-4 0 0 |
232 | 11 | Chris Cannam | 0.7186 0.4668 4.0E-4 0.002 1.0E-4 0 0 0 |
233 | 11 | Chris Cannam | |
234 | 11 | Chris Cannam | Columns 33 to 40 |
235 | 11 | Chris Cannam | |
236 | 11 | Chris Cannam | 0.0037 0 3.0E-4 0 4.0E-4 0 4.0E-4 0 |
237 | 11 | Chris Cannam | 5.0E-4 0 2.0E-4 0 1.0E-4 0 2.0E-4 0 |
238 | 11 | Chris Cannam | 0 0 1.0E-4 0 0 0 1.0E-4 0 |
239 | 11 | Chris Cannam | 0 0 2.0E-4 0 0 0 2.0E-4 0 |
240 | 11 | Chris Cannam | 0 0 0 0 0 0 0 0 |
241 | 11 | Chris Cannam | 0 0 0 0 0 0 0 0 |
242 | 11 | Chris Cannam | 0 0 0 0 0 0 0 0 |
243 | 11 | Chris Cannam | 0 0 0 0 0 0 0 0 |
244 | 11 | Chris Cannam | </pre> |