-
Notifications
You must be signed in to change notification settings - Fork 0
/
magSpec~-help.pd
78 lines (78 loc) · 2.83 KB
/
magSpec~-help.pd
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
#N canvas 301 132 918 631 10;
#X obj 87 107 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 171 226 window 2048;
#N canvas 0 22 450 300 (subpatch) 0;
#X array magSpec-graph 513 float 0;
#X coords 0 1 512 0 200 140 1;
#X restore 480 323 graph;
#X text 169 208 Change analysis window size.;
#X text 84 90 Bang to output magSpec as a list.;
#X obj 54 32 adc~;
#X text 158 153 Bang repeatedly...;
#X obj 134 154 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 134 173 metro 20;
#X obj 655 517 timbreID;
#X text 477 503 See timbreID helpfile:;
#X obj 1 -13 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 1 -13 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
0;
#N canvas 505 194 609 497 other-settings 0;
#X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
-1 0;
#X msg 54 106 window_function \$1;
#X obj 110 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 110 166 normalize \$1;
#X msg 175 247 power_spectrum \$1;
#X obj 175 229 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 54 415 outlet;
#X text 216 166 Normalize spectrum (default: ON);
#X text 52 49 Change windowing function. Rectangular (0) \, Blackman
(1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Hann);
#X text 316 247 Use power spectrum. (default: magnitude);
#X connect 0 0 1 0;
#X connect 1 0 6 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 4 0 6 0;
#X connect 5 0 4 0;
#X restore 214 283 pd other-settings;
#X text 478 124 This list can be sent to the timbreID external in order
to identify percussive timbres in real time.;
#X text 477 488 Send magSpec lists to the classification external.
;
#X obj 54 370 magSpec~ 1024;
#X text 478 164 Audio buffering and windowing are taken care of by
the external \, so there is no need for tabreceive~ or block~. You
can set the window size with a creation argument \, or change it with
the "window" message. The length of the magnitude spectrum list will
be one half of the specified window size plus one. magSpec~'s output
is normalized to be between 0 and 1 by default.;
#X text 478 34 Magnitude spectrum can be measured with a combination
of basic Pd objects like fft~ \, *~ \, and sqrt~. However \, those
objects compute continuously \, and the final output is a signal vector.
magSpec~ does nothing until it receives a bang \, then it spits out
the magnitude spectrum for the most recent analysis window as a list.
;
#X obj 199 431 list length;
#X obj 199 453 change;
#X obj 54 392 t l l;
#X obj 54 436 list prepend 0;
#X obj 54 458 s magSpec-graph;
#X msg 199 476 \; magSpec-graph resize \$1 \;;
#X connect 0 0 16 0;
#X connect 1 0 16 0;
#X connect 5 0 16 0;
#X connect 7 0 8 0;
#X connect 8 0 16 0;
#X connect 13 0 16 0;
#X connect 16 0 21 0;
#X connect 19 0 20 0;
#X connect 20 0 24 0;
#X connect 21 0 22 0;
#X connect 21 1 19 0;
#X connect 22 0 23 0;