aboutsummaryrefslogtreecommitdiff
path: root/abs/mtx_window-help.pd
blob: 73d4c9014eb4d316726fb8135c505a362866cb12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
#N canvas 439 163 841 379 10;
#X text 483 27 part of iemmatrix;
#N canvas 0 0 450 300 convert2tablemsg 0;
#X obj 130 35 inlet;
#X obj 169 216 outlet;
#X obj 130 60 t a a;
#X obj 160 82 mtx_size;
#X obj 130 107 list split 3;
#X obj 220 107 change;
#X msg 220 129 resize \$1;
#X obj 169 154 list prepend 0;
#X connect 0 0 2 0;
#X connect 2 0 4 0;
#X connect 2 1 3 0;
#X connect 3 1 5 0;
#X connect 4 1 7 0;
#X connect 5 0 6 0;
#X connect 6 0 1 0;
#X connect 7 0 1 0;
#X restore 33 284 pd convert2tablemsg;
#N canvas 0 0 450 300 (subpatch) 0;
#X array view_window 101 float 1;
#A 0 6.04683e-05 0.00152308 0.00493353 0.0102785 0.0175371 0.0266809
0.0376743 0.0504743 0.0650308 0.081287 0.0991793 0.118638 0.139587
0.161944 0.185622 0.210528 0.236566 0.263633 0.291624 0.320429 0.349935
0.380029 0.41059 0.441502 0.472641 0.503888 0.535119 0.566214 0.597049
0.627506 0.657464 0.686807 0.715419 0.74319 0.770011 0.795777 0.820387
0.843745 0.865759 0.886345 0.905421 0.922912 0.938751 0.952876 0.965231
0.975768 0.984446 0.991231 0.996096 0.999023 1 0.999023 0.996096 0.991231
0.984446 0.975768 0.965231 0.952876 0.938751 0.922912 0.905421 0.886345
0.865759 0.843745 0.820387 0.795777 0.770011 0.74319 0.715419 0.686807
0.657464 0.627506 0.597049 0.566214 0.53512 0.503888 0.472641 0.441502
0.410591 0.380029 0.349935 0.320429 0.291624 0.263633 0.236566 0.210529
0.185622 0.161944 0.139587 0.118638 0.0991794 0.081287 0.0650308 0.0504743
0.0376743 0.026681 0.0175371 0.0102785 0.00493356 0.00152309 6.0472e-05
;
#X coords 0 1.1 100 0 101 80 1;
#X restore 326 212 graph;
#X text 43 34 [mtx_window];
#X text 166 69 creates a row vector with windows of different specifications.
;
#X text 268 157 outletB: window vector;
#X obj 33 242 mtx_window;
#X obj 33 306 s view_window;
#X text 268 138 inletA: <window type> <length>;
#X msg 33 68 rectangular 101;
#X msg 42 87 bartlett 101;
#X msg 50 106 sine 101;
#X msg 54 126 hamming 101;
#X msg 60 147 hanning 101;
#X msg 63 169 blackman 101;
#X msg 71 189 gauss 101 -77;
#X text 227 315 note: the third parameter for gaussian windows describes
the attenuation at the borders;
#N canvas 201 191 842 574 fft_analysis 0;
#X msg 477 0 sine 64;
#X msg 477 42 hanning 64;
#X msg 475 -41 rectangular 64;
#X obj 461 160 s array1;
#N canvas 0 0 450 300 mtx2arraysend 0;
#X obj 150 16 inlet;
#X obj 148 254 outlet;
#X obj 170 64 t a a;
#X obj 204 85 mtx_size;
#X msg 205 129 resize \$1;
#X obj 205 108 change;
#X obj 172 149 list split 3;
#X obj 170 169 list prepend 0;
#X connect 0 0 2 0;
#X connect 2 0 6 0;
#X connect 2 1 3 0;
#X connect 3 1 5 0;
#X connect 4 0 1 0;
#X connect 5 0 4 0;
#X connect 6 1 7 0;
#X connect 7 0 1 0;
#X restore 461 137 pd mtx2arraysend;
#X obj 385 250 mtx_.*;
#X obj 385 276 mtx_rowrfft;
#X obj 385 298 mtx_.^ 2;
#X obj 457 299 mtx_.^ 2;
#X obj 385 320 mtx_+;
#X obj 385 383 mtx_powtodb;
#N canvas 0 0 450 300 mtx2arraysend 0;
#X obj 150 16 inlet;
#X obj 148 254 outlet;
#X obj 170 64 t a a;
#X obj 204 85 mtx_size;
#X msg 205 129 resize \$1;
#X obj 205 108 change;
#X obj 172 149 list split 3;
#X obj 170 169 list prepend 0;
#X connect 0 0 2 0;
#X connect 2 0 6 0;
#X connect 2 1 3 0;
#X connect 3 1 5 0;
#X connect 4 0 1 0;
#X connect 5 0 4 0;
#X connect 6 1 7 0;
#X connect 7 0 1 0;
#X restore 385 404 pd mtx2arraysend;
#N canvas 51 277 450 396 normalize 0;
#X obj 107 27 inlet;
#X obj 104 360 outlet;
#X obj 227 117 mtx_sum;
#X obj 227 96 mtx_transpose;
#X obj 129 97 mtx_transpose;
#X obj 129 118 mtx_.^ 2;
#X obj 128 139 mtx_sum;
#X obj 128 160 sqrt;
#X obj 340 20 inlet;
#X obj 238 227 f;
#X obj 129 226 f;
#X obj 129 295 mux 0 1;
#X obj 107 66 t a a a;
#X obj 104 295 mtx;
#X obj 104 328 mtx_./ 1;
#X obj 109 199 t b b b f;
#X connect 0 0 12 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 10 0;
#X connect 8 0 15 0;
#X connect 9 0 11 1;
#X connect 10 0 11 0;
#X connect 11 0 14 1;
#X connect 12 0 13 0;
#X connect 12 1 4 0;
#X connect 12 2 3 0;
#X connect 13 0 14 0;
#X connect 14 0 1 0;
#X connect 15 0 13 0;
#X connect 15 1 10 0;
#X connect 15 2 9 0;
#X connect 15 3 11 2;
#X restore 394 230 pd normalize;
#X msg 476 -20 bartlett 64;
#X msg 477 21 hamming 64;
#X msg 477 63 blackman 64;
#X obj 385 362 mtx_+;
#X obj 474 210 tgl 15 1 empty empty broad/narrow 0 -6 0 8 -262144 -1
-1 0 1;
#X obj 37 353 dbtorms;
#X obj 41 317 hsl 128 15 0 127 0 1 empty empty ampl -2 -6 0 12 -262144
-1 -1 2700 1;
#X floatatom 38 336 5 0 0 0 - - -;
#X obj 79 197 dbtorms;
#X obj 83 161 hsl 128 15 0 127 0 1 empty empty ampl -2 -6 0 10 -262144
-1 -1 8500 1;
#X floatatom 80 180 5 0 0 0 - - -;
#N canvas 0 0 450 300 (subpatch) 0;
#X array spectrum 33 float 1;
#A 0 38.8997 40.9673 44.5099 103.061 42.2724 36.1278 32.8119 30.9618
29.4879 27.9126 28.5928 27.8325 29.063 27.9504 26.035 24.9683 26.7623
27.919 26.0393 25.3933 28.6392 28.0565 27.9295 28.0921 27.2243 26.9047
26.9266 26.7948 25.7899 26.8739 26.8707 27.2482 27.7987;
#X array sineamp 33 float 1;
#A 0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
85 85 85 85 85 85 85 85 85 85 85 85;
#X array noiseamp 33 float 1;
#A 0 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27
27 27 27 27 27 27 27 27 27 27 27 27;
#X coords 0 100 32 0 200 140 1;
#X restore 51 -51 graph;
#X obj 133 198 s sineamp;
#X msg 133 178 const \$1;
#X msg 91 333 const \$1;
#X obj 91 353 s noiseamp;
#X obj 385 342 mtx_* 0.1;
#X obj 462 341 mtx_* 0.9;
#X obj 502 381 loadbang;
#X msg 502 403 ylabel -2 0 20 40 60 80 100 \, yticks 0 10 2;
#X msg 532 342 xlabel -10 narrowband_dB;
#X msg 596 319 xlabel -10 broadband_dB;
#X obj 532 319 sel 1 0;
#X text -5 133 1 choose sine/frequency+amplitude;
#N canvas 61 0 443 338 mtx_oscillator 0;
#X obj 84 12 inlet;
#X obj 68 308 outlet;
#X obj 68 131 f;
#X obj 14 29 bang~;
#X obj 183 27 loadbang;
#X obj 183 69 mtx_:;
#X obj 298 6 loadbang;
#X msg 298 26 1;
#X obj 297 46 atan;
#X obj 68 245 mtx_* 1;
#X obj 68 266 mtx_cos;
#X obj 297 67 * 8;
#X msg 183 49 0 63;
#X obj 120 69 /;
#X obj 68 201 mtx_* 1;
#X obj 68 179 mtx;
#N canvas 576 37 450 300 accumulate_modulo 0;
#X obj 148 33 inlet;
#X obj 148 232 outlet;
#X obj 148 107 mtx_mod 1;
#X obj 148 129 t a a;
#X obj 249 33 inlet df;
#X obj 188 129 mtx_slice 1 end 1 end;
#X msg 339 129 \$3;
#X obj 192 65 +;
#X obj 148 86 mtx_+ 0;
#X connect 0 0 8 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X connect 3 1 5 0;
#X connect 4 0 7 1;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 8 1;
#X connect 8 0 2 0;
#X restore 68 223 pd accumulate_modulo;
#X obj 68 155 t b f f;
#X msg 121 50 1 64;
#X obj 121 31 loadbang;
#X obj 84 108 *;
#X obj 68 288 mtx_* 2;
#X connect 0 0 20 0;
#X connect 2 0 17 0;
#X connect 3 0 2 0;
#X connect 4 0 12 0;
#X connect 5 0 15 1;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 11 0;
#X connect 9 0 10 0;
#X connect 10 0 21 0;
#X connect 11 0 9 1;
#X connect 12 0 5 0;
#X connect 13 0 20 1;
#X connect 14 0 16 0;
#X connect 15 0 14 0;
#X connect 16 0 9 0;
#X connect 17 0 15 0;
#X connect 17 1 14 1;
#X connect 17 2 16 1;
#X connect 18 0 13 0;
#X connect 19 0 18 0;
#X connect 20 0 2 1;
#X connect 21 0 1 0;
#X restore -8 219 pd mtx_oscillator;
#X obj -8 239 mtx_* 0;
#X obj 385 203 mtx_+;
#X text -7 268 2 choose sine/frequency+amplitude;
#X obj -7 376 mtx_* 0;
#N canvas 0 0 450 300 mtx_noise~ 0;
#X obj 180 137 mtx_* 2;
#X obj 180 158 mtx_- 1;
#X obj 323 116 loadbang;
#X msg 323 140 3;
#X obj 323 162 sqrt;
#X obj 180 204 mtx_* 1;
#X obj 180 235 outlet;
#X obj 180 85 bang~;
#X obj 180 106 mtx_rand 1 64;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 5 0 6 0;
#X connect 7 0 8 0;
#X connect 8 0 0 0;
#X restore -7 286 pd mtx_noise~;
#X obj 339 63 dsp;
#X obj 339 45 tgl 15 0 empty dsp_tgl empty 0 -6 0 8 -262144 -1 -1 1
1;
#X text 343 -39 3 choose window;
#X text 343 180 4 choose broadband/narrow band normalization;
#X floatatom 347 93 5 0 0 0 - - -;
#X floatatom 306 94 5 0 0 0 - - -;
#N canvas 0 0 450 300 mtx2arraysend 0;
#X obj 150 16 inlet;
#X obj 148 254 outlet;
#X obj 170 64 t a a;
#X obj 204 85 mtx_size;
#X msg 205 129 resize \$1;
#X obj 205 108 change;
#X obj 172 149 list split 3;
#X obj 170 169 list prepend 0;
#X connect 0 0 2 0;
#X connect 2 0 6 0;
#X connect 2 1 3 0;
#X connect 3 1 5 0;
#X connect 4 0 1 0;
#X connect 5 0 4 0;
#X connect 6 1 7 0;
#X connect 7 0 1 0;
#X restore 469 255 pd mtx2arraysend;
#X floatatom 29 163 6 0 0 0 freq - -;
#N canvas 0 0 450 300 (subpatch) 0;
#X array signal 64 float 1;
#A 0 0.350809 0.352529 0.323749 0.267889 0.188056 0.0924733 -0.0115446
-0.114268 -0.207012 -0.282098 -0.332474 -0.354627 -0.346684 -0.308276
-0.243687 -0.157757 -0.058738 0.0452786 0.146309 0.234006 0.301564
0.343327 0.355167 0.337243 0.289477 0.217643 0.126626 0.0241541 -0.0796336
-0.176431 -0.25886 -0.318325 -0.350513 -0.352816 -0.324453 -0.267944
-0.188785 -0.0933459 0.0104961 0.112465 0.206113 0.281239 0.332285
0.354519 0.346625 0.308685 0.244169 0.158802 0.0600548 -0.0446618 -0.144633
-0.233125 -0.300845 -0.343326 -0.355903 -0.337678 -0.290366 -0.218386
-0.127163 -0.0258419 0.0781731 0.176044 0.257996 0.31818;
#X coords 0 2 63 -2 200 140 1;
#X restore 589 -66 graph;
#X obj 385 427 s spectrum;
#X obj 469 278 s signal;
#X msg 532 278 ylabel -2 0 -2 -1 0 1 2 \, yticks 0 0.5 2;
#X obj 588 254 loadbang;
#X obj 116 237 loadbang;
#X obj 404 47 loadbang;
#X msg 117 218 2.999;
#X obj 461 113 mtx_window;
#X msg 472 87 gauss 64 -85;
#X connect 0 0 59 0;
#X connect 1 0 59 0;
#X connect 2 0 59 0;
#X connect 4 0 3 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 6 1 8 0;
#X connect 7 0 9 0;
#X connect 8 0 9 1;
#X connect 9 0 29 0;
#X connect 10 0 11 0;
#X connect 11 0 52 0;
#X connect 12 0 5 1;
#X connect 13 0 59 0;
#X connect 14 0 59 0;
#X connect 15 0 59 0;
#X connect 16 0 10 0;
#X connect 16 0 30 0;
#X connect 17 0 12 1;
#X connect 17 0 35 0;
#X connect 18 0 41 1;
#X connect 19 0 20 0;
#X connect 20 0 18 0;
#X connect 20 0 27 0;
#X connect 21 0 38 1;
#X connect 22 0 23 0;
#X connect 23 0 21 0;
#X connect 23 0 26 0;
#X connect 26 0 25 0;
#X connect 27 0 28 0;
#X connect 29 0 16 0;
#X connect 30 0 16 1;
#X connect 31 0 32 0;
#X connect 32 0 52 0;
#X connect 33 0 52 0;
#X connect 34 0 52 0;
#X connect 35 0 33 0;
#X connect 35 1 34 0;
#X connect 37 0 38 0;
#X connect 38 0 39 0;
#X connect 39 0 5 0;
#X connect 39 0 49 0;
#X connect 41 0 39 1;
#X connect 42 0 41 0;
#X connect 43 0 48 0;
#X connect 43 1 47 0;
#X connect 44 0 43 0;
#X connect 49 0 53 0;
#X connect 50 0 37 0;
#X connect 54 0 53 0;
#X connect 55 0 54 0;
#X connect 56 0 58 0;
#X connect 57 0 2 0;
#X connect 58 0 50 0;
#X connect 59 0 4 0;
#X connect 59 0 12 0;
#X connect 60 0 59 0;
#X restore 616 242 pd fft_analysis;
#X text 480 241 use this e.g. for:;
#X connect 1 0 7 0;
#X connect 6 0 1 0;
#X connect 9 0 6 0;
#X connect 10 0 6 0;
#X connect 11 0 6 0;
#X connect 12 0 6 0;
#X connect 13 0 6 0;
#X connect 14 0 6 0;
#X connect 15 0 6 0;