aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/3.audio.examples/E08.even.odd.pd
blob: bfa950a9855a24f74323a86ae721e2ba80c179e5 (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
#N canvas 213 27 840 639 12;
#X floatatom 45 74 0 0 0;
#X obj 99 164 wrap~;
#X graph graph1 0 -1.02 882 1.02 624 153 824 23;
#X array phasor-output 882 float 0;
#X pop;
#X obj 45 102 phasor~ 0;
#X text 81 73 frequency;
#X obj 45 130 -~ 0.5;
#X obj 99 192 -~ 0.5;
#X obj 36 244 -~;
#X obj 98 244 +~;
#X graph graph1 0 -1.02 882 1.02 625 288 825 158;
#X array wrap-output 882 float 0;
#X pop;
#X graph graph1 0 -1.02 882 1.02 626 423 826 293;
#X array sum 882 float 0;
#X pop;
#X graph graph1 0 -1.02 882 1.02 626 563 826 433;
#X array difference 882 float 0;
#X pop;
#X obj 172 166 tabwrite~ phasor-output;
#X obj 172 218 tabwrite~ wrap-output;
#X obj 172 282 tabwrite~ sum;
#X obj 172 327 tabwrite~ difference;
#X msg 172 120 bang;
#X text 106 13 BUCHLA'S METHOD;
#X floatatom 119 369 0 0 0;
#N canvas 159 26 618 383 output 0;
#X obj 393 156 t b;
#X obj 393 106 f;
#X obj 393 56 inlet;
#X text 399 25 mute;
#X obj 393 181 f;
#X msg 480 174 0;
#X msg 393 81 bang;
#X obj 393 131 moses 1;
#X obj 480 149 t b f;
#X obj 452 113 moses 1;
#X obj 138 144 dbtorms;
#X obj 452 88 r master-lvl;
#X obj 138 38 r master-lvl;
#X obj 393 206 s master-lvl;
#X obj 22 181 inlet~;
#X obj 254 37 inlet;
#X text 254 14 level;
#X obj 254 96 s master-lvl;
#X msg 151 61 set \$1;
#X obj 151 85 outlet;
#X msg 269 60 \; pd dsp 1;
#X obj 138 190 line~;
#X obj 22 212 *~;
#X obj 138 167 pack 0 50;
#X text 34 159 audio;
#X text 148 106 show level;
#X obj 73 182 inlet~;
#X obj 73 213 *~;
#X obj 22 241 dac~ 1;
#X obj 73 241 dac~ 2;
#X connect 0 0 4 0;
#X connect 1 0 7 0;
#X connect 2 0 6 0;
#X connect 4 0 13 0;
#X connect 5 0 13 0;
#X connect 6 0 1 0;
#X connect 7 0 0 0;
#X connect 7 1 8 0;
#X connect 8 0 5 0;
#X connect 9 1 4 1;
#X connect 10 0 23 0;
#X connect 11 0 1 1;
#X connect 11 0 9 0;
#X connect 12 0 10 0;
#X connect 12 0 18 0;
#X connect 14 0 22 0;
#X connect 15 0 17 0;
#X connect 15 0 20 0;
#X connect 18 0 19 0;
#X connect 21 0 22 1;
#X connect 21 0 27 1;
#X connect 22 0 28 0;
#X connect 23 0 21 0;
#X connect 26 0 27 0;
#X connect 27 0 29 0;
#X restore 81 392 pd output;
#X msg 156 369 MUTE;
#X text 13 430 A patch to split a sawtooth into even and odd harmonics
ala Buchla. The wrap~ object folds its input into the interval [0 \,
1) so taht \, for instance \, subtracting 1/5 from a phasor and wrapping
it gives another phasor a half cycle out of phase frmo the original.
Adding and subtracting the two give the results shown and heard. (Listen
to the two outputs separately \, then together.);
#X text 631 567 ---- 0.02 seconds ----;
#X text 577 613 updated for Pd version 0.34;
#X text 193 369 <-- output;
#X connect 0 0 3 0;
#X connect 1 0 6 0;
#X connect 3 0 5 0;
#X connect 5 0 1 0;
#X connect 5 0 12 0;
#X connect 5 0 8 0;
#X connect 5 0 7 0;
#X connect 6 0 13 0;
#X connect 6 0 8 1;
#X connect 6 0 7 1;
#X connect 7 0 15 0;
#X connect 7 0 19 0;
#X connect 8 0 14 0;
#X connect 8 0 19 1;
#X connect 16 0 13 0;
#X connect 16 0 14 0;
#X connect 16 0 15 0;
#X connect 16 0 12 0;
#X connect 18 0 19 2;
#X connect 19 0 18 0;
#X connect 20 0 19 3;