blob: 8efe6390ef8f4a22f45eb69dba394fa0dc0d315f (
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
|
#N canvas 15 126 821 582 12;
#X obj 285 163 line~;
#X floatatom 66 64 0 0 0;
#X obj 43 315 cos~;
#X graph graph1 0 -1.02 882 1.02 599 472 799 342;
#X array pulse-output 882 float 0;
#X pop;
#X floatatom 72 407 0 0 0;
#N canvas 159 26 495 266 output 0;
#X obj 338 160 t b;
#X obj 338 110 f;
#X obj 338 60 inlet;
#X text 344 29 mute;
#X obj 338 185 f;
#X msg 425 178 0;
#X msg 338 85 bang;
#X obj 338 135 moses 1;
#X obj 425 153 t b f;
#X obj 397 117 moses 1;
#X obj 83 148 dbtorms;
#X obj 397 92 r master-lvl;
#X obj 83 42 r master-lvl;
#X obj 338 210 s master-lvl;
#X obj 22 181 inlet~;
#X obj 199 41 inlet;
#X text 199 18 level;
#X obj 199 100 s master-lvl;
#X msg 96 65 set \$1;
#X obj 96 89 outlet;
#X msg 214 64 \; pd dsp 1;
#X obj 83 194 line~;
#X obj 22 212 *~;
#X obj 22 241 dac~;
#X obj 83 171 pack 0 50;
#X text 20 158 audio;
#X text 93 110 show level;
#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 24 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 22 0 23 0;
#X connect 22 0 23 1;
#X connect 24 0 21 0;
#X restore 43 435 pd output;
#X msg 111 405 MUTE;
#X text 158 406 <-- output amplitude;
#X obj 66 91 phasor~ 0;
#X obj 285 139 pack 0 50;
#X floatatom 285 54 0 0 0;
#X text 63 43 frequency;
#X obj 66 115 -~ 0.5;
#X obj 66 207 *~;
#X obj 285 78 / 10;
#X obj 43 265 clip~ -0.5 0.5;
#X obj 43 371 hip~ 5;
#X graph graph1 0 -1.02 882 1.02 599 168 799 108;
#X array phase-output 882 float 0;
#X pop;
#X graph graph1 0 -1.02 882 1.02 599 335 799 205;
#X array clip-output 882 float 0;
#X pop;
#X text 280 34 bandwidth;
#X text 130 114 phase -1/2 to 1/2;
#X text 152 91 phase 0 to 1;
#X text 132 5 PULSE GENERATOR;
#X obj 32 234 tabwrite~ phase-output;
#X obj 32 346 tabwrite~ pulse-output;
#X text 116 372 high pass filter to cut DC;
#X msg 32 147 bang;
#X text 332 79 fix range;
#X text 337 100 force;
#X text 337 117 nonnegative;
#X text 339 164 smooth it;
#X text 327 187 add 1;
#X text 78 148 <-- click to graph;
#X text 96 209 increase amplitude;
#X text 177 264 clip back to range -1/2 to 1/2;
#X text 103 316 cosine wave lookup (-1/2 and 1/2 give -1);
#X text 24 470 This patch computes a pulse train \, with a "bandwidth"
control that essentually squeezes the pulses. If "bandwidth" is zero
you get a pure cosine wave \, and for larger values of the bandwidth
\, the cosine wave is squeezed to fill smaller portions of the waveform.
;
#X obj 285 188 +~ 1;
#X obj 32 292 tabwrite~ clip-output;
#X text 601 478 ---- 0.02 seconds ----;
#X obj 285 102 max 0;
#X text 544 551 updated for Pd version 0.34;
#X connect 0 0 37 0;
#X connect 1 0 8 0;
#X connect 2 0 16 0;
#X connect 2 0 24 0;
#X connect 4 0 5 1;
#X connect 5 0 4 0;
#X connect 6 0 5 2;
#X connect 8 0 12 0;
#X connect 9 0 0 0;
#X connect 10 0 14 0;
#X connect 12 0 13 0;
#X connect 13 0 15 0;
#X connect 13 0 23 0;
#X connect 14 0 40 0;
#X connect 15 0 2 0;
#X connect 15 0 38 0;
#X connect 16 0 5 0;
#X connect 26 0 23 0;
#X connect 26 0 24 0;
#X connect 26 0 38 0;
#X connect 37 0 13 1;
#X connect 40 0 9 0;
|