aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/3.audio.examples/C01.nyquist.pd
blob: 256da0e31e56b520ad1fafc7debee70fec6194cc (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
#N canvas 601 188 580 659 12;
#N canvas 0 0 450 300 graph1 0;
#X array table24 259 float 1;
#A 0 -0.294693 0 0.294693 0.4 0.28948 0.10749 0.022875 0.0789655 0.181673
0.218249 0.171348 0.115564 0.119192 0.169863 0.201356 0.178657 0.137857
0.138353 0.188891 0.23571 0.22487 0.164534 0.115848 0.125265 0.176634
0.214361 0.205655 0.169043 0.14204 0.134157 0.124033 0.0997798 0.0859507
0.118173 0.195202 0.270956 0.301868 0.293569 0.285908 0.289835 0.256276
0.128881 -0.0684912 -0.215994 -0.195335 -0.0145421 0.174701 0.203986
0.0451069 -0.159794 -0.231026 -0.119011 0.0575033 0.135323 0.0628509
-0.0665307 -0.124779 -0.0776696 0.000279083 0.0247376 -0.00546273 -0.0222151
0.017933 0.0755681 0.0749102 4.97367e-06 -0.0729564 -0.0490464 0.0834901
0.232853 0.286943 0.213202 0.0759584 -0.0357248 -0.0863297 -0.101697
-0.115455 -0.125625 -0.107127 -0.0530433 0.012152 0.0608637 0.0902219
0.111597 0.119683 0.0910146 0.0236817 -0.0326555 -0.0100379 0.100844
0.216022 0.223032 0.094995 -0.0649958 -0.110291 0.00678482 0.180334
0.247439 0.144699 -0.0319975 -0.124321 -0.0648335 0.0680811 0.141409
0.100343 0.00354248 -0.0636733 -0.0891566 -0.131987 -0.227286 -0.316392
-0.293048 -0.12222 0.100475 0.222686 0.173879 0.0281889 -0.0714016
-0.0482686 0.0482418 0.108884 0.0773858 -0.00559103 -0.0590099 -0.0454391
0.00509731 0.0411467 0.0421476 0.0225557 2.40108e-06 -0.0225508 -0.0421448
-0.0411506 -0.00510821 0.0454302 0.0590142 0.0056084 -0.0773706 -0.108887
-0.0482625 0.048252 0.0714103 -0.0281575 -0.173853 -0.222693 -0.100517
0.122172 0.293026 0.316402 0.22731 0.132002 0.0891614 0.063682 -0.00352253
-0.100324 -0.141412 -0.0681076 0.0648079 0.124324 0.0320316 -0.144663
-0.247435 -0.180365 -0.00682225 0.110282 0.0650224 -0.0949583 -0.223017
-0.216038 -0.100873 0.010022 0.0326611 -0.0236657 -0.0910033 -0.119682
-0.111601 -0.0902271 -0.0608718 -0.0121649 0.0530291 0.107119 0.125625
0.115458 0.101699 0.0863353 0.0357423 -0.0759289 -0.213176 -0.28694
-0.232878 -0.0835252 0.0490278 0.0729642 1.4921e-05 -0.0749008 -0.0755765
-0.0179463 0.0222127 0.00547055 -0.0247352 -0.000292052 0.0776522 0.12478
0.0665546 -0.062824 -0.135322 -0.0575355 0.118973 0.23102 0.159828
-0.0450604 -0.203969 -0.174729 0.014495 0.195309 0.21601 0.0685338
-0.128843 -0.25626 -0.289835 -0.285909 -0.293565 -0.30187 -0.270969
-0.195221 -0.118186 -0.0859518 -0.0997742 -0.124029 -0.134156 -0.142036
-0.169035 -0.205649 -0.214364 -0.176646 -0.125273 -0.115843 -0.16452
-0.22486 -0.235715 -0.188904 -0.13836 -0.137851 -0.178647 -0.201357
-0.169874 -0.1192 -0.115557 -0.171333 -0.218246 -0.181691 -0.0789875
-0.0228734 -0.107456 -0.289441 -0.399997 -0.294741 -7.20325e-05 0.294645
;
#X coords 0 1.02 258 -1.02 258 130 1;
#X restore 93 408 graph;
#X obj 33 288 line~;
#X msg 33 237 500 \, 1423 4000;
#X floatatom 41 262 5 0 0 0 - - -;
#X text 24 556 Synthesis techniques vary in their tendency to make
foldover. For higher pitched sounds you'll want to try out relatively
folvover-resistant ones.;
#X obj 33 342 output~;
#X obj 201 281 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#N canvas 0 0 618 384 make-tab 0;
#X obj 13 28 inlet;
#X obj 99 28 inlet;
#X obj 183 28 inlet;
#X obj 255 29 inlet;
#X msg 38 176 \; table24 sinesum 256 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 \, normalize
0.4;
#X msg 14 277 \; table24 sinesum 256 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 \, normalize
0.2;
#X msg 183 101 \; table24 const 0 \, 0 1 1 1 1 1;
#X msg 255 58 \; table24 const 0;
#X connect 0 0 5 0;
#X connect 1 0 4 0;
#X connect 2 0 6 0;
#X connect 3 0 7 0;
#X restore 201 355 pd make-tab;
#X obj 232 300 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 263 317 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 295 334 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X text 222 276 sine;
#X text 252 297 complex;
#X text 284 314 rectangle;
#X text 313 332 clear;
#X obj 33 315 tabosc4~ table24;
#X text 56 2 THE NYQUIST THEOREM AND FOLDOVER;
#X text 30 33 WARNING: PLAY THIS QUIETLY TO AVOID UNPLEASANTNESS AND
POSSIBLE EAR DAMAGE.;
#X text 29 77 Foldover occurs when you synthesize frequencies greater
than the Nyquist frequency (half the sample rate). In this example
\, the fundamental only reaches 1423 \, but the tables contain high
partials. As the partials sweep upward you hear them reflect off the
Nyquist frequency. Also \, partials can come into contact with each
other causing beating. The value of 1423 was chosen to make the beating
effect especially strong if you're running at a sample rate of 44100
(the usual one.);
#X text 330 616 updated for Pd version 0.37;
#X text 219 245 waveforms:;
#X connect 1 0 15 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 6 0 7 0;
#X connect 8 0 7 1;
#X connect 9 0 7 2;
#X connect 10 0 7 3;
#X connect 15 0 5 0;
#X connect 15 0 5 1;