-
Notifications
You must be signed in to change notification settings - Fork 0
/
specCentroid~-help.pd
53 lines (53 loc) · 2.04 KB
/
specCentroid~-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
#N canvas 160 135 905 503 10;
#X obj 116 145 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X floatatom 67 397 10 0 0 0 - - -;
#X text 130 198 Change window size.;
#X text 540 272 See timbreID helpfile:;
#X obj 542 292 timbreID;
#X msg 132 216 window 2048;
#X obj 67 94 +~;
#X obj 67 40 osc~ 400;
#X obj 85 63 osc~ 500;
#X obj 67 344 specCentroid~ 1024;
#X text 113 127 Bang to output centroid.;
#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;
#X text 422 27 Spectral Centroid is the center of mass of magnitude
spectrum \, and is a common low-level timbre feature. It is computed
as the ratio of the sum of spectral magnitude weighted by frequency
to the sum of spectral magnitude. Therefore \, it reports the frequency
associated with spectral center of mass. This is clearly demonstrated
at left \, where two perfect spikes in the spectrum at 400 Hz and 500
Hz produce a centroid near 450 Hz.;
#X text 422 147 This feature can be sent to the timbreID external in
order to identify percussive timbres in real time.;
#N canvas 679 226 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 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 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 4 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X restore 178 272 pd other-settings;
#X text 422 187 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.;
#X connect 0 0 9 0;
#X connect 5 0 9 0;
#X connect 6 0 9 0;
#X connect 7 0 6 0;
#X connect 8 0 6 1;
#X connect 9 0 1 0;
#X connect 15 0 9 0;