aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/3.audio.examples/16.table.spectrum.pd
blob: 65ccccdea37d81c2ab06034e451516aea8c300ae (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
#N canvas 227 120 801 403 12;
#X graph graph3 0 0 126 50 496 276 796 136;
#X array spectrum-tab 127 float 1;
#A 0 42.8571 42.5 43.2143 43.2143 43.2143 43.2143 43.2143 42.8571 42.8571
42.8571 42.8571 42.8571 42.8571 42.5 42.5 42.5 42.5 42.5 42.5 42.5
42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5
42.5 42.5 42.1429 42.1429 41.7857 41.0714 40.3571 39.6429 39.2857 38.2143
37.5 37.1429 36.0714 35.3571 33.9286 33.2143 32.8571 31.4286 31.0714
30.3571 28.9286 28.2143 27.5 26.4286 25.7143 23.9286 23.2143 21.7857
21.0714 20.7143 20 19.6429 19.6429 23.2143 28.2143 31.4286 33.5714
36.4286 37.8571 38.9286 43.9286 45.7143 47.8571 47.8571 47.8571 47.8571
47.5 47.1429 43.2143 40.3571 36.4286 33.9286 32.1429 29.2857 18.2143
16.7857 16.7857 17.5 19.6429 22.1429 28.2143 33.9286 33.9286 33.9286
33.5714 22.5 18.5714 16.7857 4.64286 4.64286 18.2143 17.1429 8.92857
4.28571 11.4286 10 7.5 6.42857 5.71429 5.35714 5 4.64286 4.28571 3.92857
3.92857 3.57143 3.57143 2.85714 2.5 2.14286 1.78571 0.714286 0.357143
;
#X pop;
#X floatatom 57 351 0 0 0;
#N canvas 159 26 526 286 output 0;
#X obj 345 163 t b;
#X obj 345 112 f;
#X obj 345 61 inlet;
#X text 351 30 mute;
#X obj 345 189 f;
#X msg 434 182 0;
#X msg 345 87 bang;
#X obj 345 138 moses 1;
#X obj 405 119 moses 1;
#X obj 85 151 dbtorms;
#X obj 405 94 r master-lvl;
#X obj 85 43 r master-lvl;
#X obj 345 214 s master-lvl;
#X obj 22 185 inlet~;
#X obj 203 42 inlet;
#X text 203 18 level;
#X obj 203 102 s master-lvl;
#X msg 98 67 set \$1;
#X obj 98 91 outlet;
#X msg 218 65 \; pd dsp 1;
#X obj 85 198 line~;
#X obj 22 216 *~;
#X obj 22 246 dac~;
#X obj 85 175 pack 0 50;
#X text 20 162 audio;
#X obj 434 155 t b;
#X connect 0 0 4 0;
#X connect 1 0 7 0;
#X connect 2 0 6 0;
#X connect 4 0 12 0;
#X connect 5 0 12 0;
#X connect 6 0 1 0;
#X connect 7 0 0 0;
#X connect 7 1 25 0;
#X connect 8 1 4 1;
#X connect 9 0 23 0;
#X connect 10 0 1 1;
#X connect 10 0 8 0;
#X connect 11 0 9 0;
#X connect 11 0 17 0;
#X connect 13 0 21 0;
#X connect 14 0 16 0;
#X connect 14 0 19 0;
#X connect 17 0 18 0;
#X connect 20 0 21 1;
#X connect 21 0 22 0;
#X connect 21 0 22 1;
#X connect 23 0 20 0;
#X connect 25 0 5 0;
#X restore 19 376 pd output;
#X msg 95 350 MUTE;
#N canvas 98 16 694 474 oscbank 0;
#X obj 36 53 spectrum-partial 1;
#X obj 36 79 spectrum-partial 2;
#X obj 36 105 spectrum-partial 3;
#X obj 36 131 spectrum-partial 4;
#X obj 36 157 spectrum-partial 5;
#X obj 36 183 spectrum-partial 6;
#X obj 36 209 spectrum-partial 7;
#X obj 36 235 spectrum-partial 8;
#X obj 36 261 spectrum-partial 9;
#X obj 36 287 spectrum-partial 10;
#X obj 216 53 spectrum-partial 11;
#X obj 122 382 loadbang;
#X obj 122 407 metro 30;
#X obj 122 433 s poll-table;
#X text 107 21 This is the bank of oscillators--open one to see:;
#X text 72 345 And here we send bangs to "poll-table" needed by the
abstraction.;
#X obj 216 79 spectrum-partial 12;
#X obj 216 105 spectrum-partial 13;
#X obj 216 131 spectrum-partial 14;
#X obj 216 157 spectrum-partial 15;
#X obj 216 183 spectrum-partial 16;
#X obj 216 209 spectrum-partial 17;
#X obj 216 235 spectrum-partial 18;
#X obj 215 261 spectrum-partial 19;
#X obj 215 287 spectrum-partial 20;
#X obj 395 53 spectrum-partial 21;
#X obj 395 78 spectrum-partial 22;
#X obj 395 104 spectrum-partial 23;
#X obj 395 130 spectrum-partial 24;
#X obj 395 156 spectrum-partial 25;
#X obj 395 182 spectrum-partial 26;
#X obj 395 207 spectrum-partial 27;
#X obj 396 234 spectrum-partial 28;
#X obj 395 260 spectrum-partial 29;
#X obj 395 287 spectrum-partial 30;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X restore 17 251 pd oscbank;
#X obj 19 321 catch~ sum-bus;
#X obj 16 153 s pitch;
#X floatatom 16 125 4 0 0;
#X text 43 18 DRAWABLE SPECTRA;
#X floatatom 14 183 4 0 0;
#X obj 14 211 s whammybar;
#N canvas 0 0 650 341 table-setup 0;
#X obj 39 227 loadbang;
#X msg 39 261 \; spectrum-tab xlabel -5 0 12 24 36 48 60 72 84 96 108
120;
#X text 82 60 comment;
#X connect 0 0 1 0;
#X restore 17 283 pd table-setup;
#X msg 596 65 \; spectrum-tab const 0;
#X text 555 381 Updated for Pd version 0.34;
#X text 26 42 In this array \, you can draw a spectral envelope that
will be synthesized by an oscillator bank. Each oscillator in the bank
computes its own frequency and uses it to look up amplitude from the
array.;
#X text 113 254 <-- the oscillator bank;
#X text 71 128 <-- pitch;
#X text 61 185 <-- left or right shift (normally 0);
#X text 157 318 <-- here we just collect the sum of all the partials
which are computed in "oscbank".;
#X text 662 44 CLEAR;
#X text 148 283 <-- make the number labels;
#X connect 1 0 2 1;
#X connect 2 0 1 0;
#X connect 3 0 2 2;
#X connect 5 0 2 0;
#X connect 7 0 6 0;
#X connect 9 0 10 0;