aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/3.audio.examples/J09.up.downsampling.pd
blob: cf50f9b965976416f49961804ea2782cf663c433 (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
#N canvas 32 25 1089 690 10;
#X obj 57 567 osc~ 412;
#X floatatom 58 543 5 0 0;
#X obj 122 595 tabwrite~ scope;
#X msg 122 571 bang;
#X msg 205 43 bang;
#X obj 42 191 tabwrite~ scope;
#X msg 54 165 bang;
#N canvas 316 181 600 400 simple 0;
#X obj 185 46 inlet;
#X obj 185 102 tabwrite~ scope;
#X obj 78 38 inlet~;
#X obj 78 258 outlet~;
#X obj 317 103 block~ 64 1 0.25;
#X connect 0 0 1 0;
#X connect 2 0 1 0;
#X connect 2 0 3 0;
#X restore 42 64 pd simple downsampling 4;
#X msg 451 42 bang;
#X obj 275 190 tabwrite~ scope;
#X msg 287 164 bang;
#X graph graph2 0 -1 511 1 297 629 897 489;
#X array scope 512 float 0;
#X pop;
#X msg 683 45 bang;
#X obj 520 193 tabwrite~ scope;
#X msg 532 167 bang;
#X msg 929 44 bang;
#X obj 753 192 tabwrite~ scope;
#X msg 765 166 bang;
#N canvas 165 168 600 400 simple 0;
#X obj 185 74 inlet;
#X obj 185 102 tabwrite~ scope;
#X obj 78 38 inlet~;
#X obj 78 258 outlet~;
#X text 130 38 zero-padding upsampling;
#X obj 317 103 block~ 64 1 4;
#X connect 0 0 1 0;
#X connect 2 0 1 0;
#X connect 2 0 3 0;
#X restore 520 66 pd simple upsampling 4;
#X obj 42 38 r~ sine;
#X obj 275 39 r~ sine;
#X obj 57 595 s~ sine;
#X obj 520 41 r~ sine;
#X obj 753 41 r~ sine;
#X obj 41 415 tabwrite~ scope;
#X msg 47 369 bang;
#X msg 804 265 bang;
#X obj 711 415 tabwrite~ scope;
#X msg 723 389 bang;
#X obj 41 262 r~ sine;
#X obj 711 264 r~ sine;
#X obj 152 416 tabwrite~ scope;
#X msg 158 370 bang;
#X text 43 431 zero-padded;
#N canvas 290 149 600 400 downsampling 0;
#X obj 78 38 inlet~;
#X obj 78 258 outlet~;
#X obj 152 258 outlet~ hold;
#X obj 317 103 block~ 64 1 0.25;
#X connect 0 0 1 0;
#X connect 0 0 2 0;
#X restore 41 288 pd downsampling 4 (mixed);
#N canvas 261 147 600 400 bad 0;
#X obj 185 81 inlet;
#X obj 185 102 tabwrite~ scope;
#X text 172 257 "lin" is for linear upsampling;
#X text 160 39 "lin" has no meaning when downsampling;
#X obj 317 103 block~ 64 2;
#X obj 78 258 outlet~;
#X obj 78 38 inlet~;
#X connect 0 0 1 0;
#X connect 6 0 1 0;
#X connect 6 0 5 0;
#X restore 711 288 pd bad overlap;
#X msg 1018 263 bang;
#X obj 841 415 tabwrite~ scope;
#X msg 853 389 bang;
#X obj 841 264 r~ sine;
#N canvas 121 72 600 400 bad 0;
#X obj 185 81 inlet;
#X obj 185 102 tabwrite~ scope;
#X obj 78 258 outlet~ lin;
#X obj 78 38 inlet~ lin;
#X text 167 38 "lin" is for linear upsampling;
#X text 166 259 "lin" has no meaning when downsampling;
#X obj 317 103 block~ 64 2 2;
#X connect 0 0 1 0;
#X connect 3 0 1 0;
#X connect 3 0 2 0;
#X restore 841 288 pd bad overlap (upsampled);
#X msg 458 267 bang;
#X obj 323 417 tabwrite~ scope;
#X msg 335 391 bang;
#X obj 323 266 r~ sine;
#X text 155 433 sample&hold;
#X msg 653 265 bang;
#X obj 511 416 tabwrite~ scope;
#X msg 523 390 bang;
#X obj 511 265 r~ sine;
#N canvas 249 128 600 400 downsampled 0;
#X obj 185 81 inlet;
#X obj 185 102 tabwrite~ scope;
#X obj 78 258 outlet~ lin;
#X obj 78 230 *~ 0.5;
#X obj 78 38 inlet~;
#X obj 317 103 block~ 128 2 0.25;
#X connect 0 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 4 0 3 0;
#X restore 511 289 pd downsampled overlap;
#N canvas 175 94 600 400 upsampled 0;
#X obj 185 81 inlet;
#X obj 185 102 tabwrite~ scope;
#X obj 78 258 outlet~ lin;
#X obj 78 38 inlet~ lin;
#X obj 78 230 *~ 0.5;
#X obj 317 103 block~ 256 2 2;
#X connect 0 0 1 0;
#X connect 3 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X restore 323 290 pd upsampled overlap;
#N canvas 350 164 600 400 upsampling 0;
#X obj 185 81 inlet;
#X obj 185 102 tabwrite~ scope;
#X obj 78 38 inlet~ hold;
#X obj 78 258 outlet~;
#X text 160 39 "hold" is for sample&hold upsampling;
#X obj 317 103 block~ 64 1 16;
#X connect 0 0 1 0;
#X connect 2 0 1 0;
#X connect 2 0 3 0;
#X restore 753 65 pd upsampling 16 (sample&hold);
#N canvas 236 170 600 400 downsampling 0;
#X obj 185 81 inlet;
#X obj 185 102 tabwrite~ scope;
#X obj 78 258 outlet~ lin;
#X obj 78 38 inlet~ lin;
#X text 172 257 "lin" is for linear upsampling;
#X obj 320 102 block~ 64 1 0.125;
#X text 330 137 0.125 = 1/8 = 8*downsampling;
#X text 160 39 "lin" has (still !) no meaning when downsampling;
#X connect 0 0 1 0;
#X connect 3 0 1 0;
#X connect 3 0 2 0;
#X restore 275 63 pd downsampling 8 (linear);
#X text 718 314 a pd-bug !;
#X connect 0 0 2 0;
#X connect 0 0 21 0;
#X connect 1 0 0 0;
#X connect 3 0 2 0;
#X connect 4 0 7 1;
#X connect 6 0 5 0;
#X connect 7 0 5 0;
#X connect 8 0 53 1;
#X connect 10 0 9 0;
#X connect 12 0 18 1;
#X connect 14 0 13 0;
#X connect 15 0 52 1;
#X connect 17 0 16 0;
#X connect 18 0 13 0;
#X connect 19 0 7 0;
#X connect 20 0 53 0;
#X connect 22 0 18 0;
#X connect 23 0 52 0;
#X connect 25 0 24 0;
#X connect 26 0 35 1;
#X connect 28 0 27 0;
#X connect 29 0 34 0;
#X connect 30 0 35 0;
#X connect 32 0 31 0;
#X connect 34 0 24 0;
#X connect 34 1 31 0;
#X connect 35 0 27 0;
#X connect 36 0 40 1;
#X connect 38 0 37 0;
#X connect 39 0 40 0;
#X connect 40 0 37 0;
#X connect 41 0 51 1;
#X connect 43 0 42 0;
#X connect 44 0 51 0;
#X connect 46 0 50 1;
#X connect 48 0 47 0;
#X connect 49 0 50 0;
#X connect 50 0 47 0;
#X connect 51 0 42 0;
#X connect 52 0 16 0;
#X connect 53 0 9 0;