1
#N canvas 15 126 835 625 12;
3
#X floatatom 53 64 0 0 0 0 - - -;
5
#N canvas 0 0 450 300 graph1 0;
6
#X array pulse-output 882 float 0;
7
#X coords 0 1.02 882 -1.02 200 130 1;
8
#X restore 583 409 graph;
9
#X obj 53 91 phasor~ 0;
10
#X obj 272 139 pack 0 50;
11
#X floatatom 272 90 0 0 100 0 - - -;
12
#X text 50 43 frequency;
16
#X obj 30 265 clip~ -0.5 0.5;
18
#N canvas 0 0 450 300 graph1 0;
19
#X array phase-output 882 float 0;
20
#X coords 0 1.02 882 -1.02 200 60 1;
21
#X restore 583 150 graph;
22
#N canvas 0 0 450 300 graph1 0;
23
#X array clip-output 882 float 0;
24
#X coords 0 1.02 882 -1.02 200 130 1;
25
#X restore 583 272 graph;
26
#X text 113 114 phase -1/2 to 1/2;
27
#X text 139 91 phase 0 to 1;
28
#X text 119 5 PULSE GENERATOR;
29
#X obj 19 234 tabwrite~ phase-output;
30
#X obj 19 393 tabwrite~ pulse-output;
31
#X text 103 419 high pass filter to cut DC;
32
#X text 319 115 fix range;
33
#X text 326 164 smooth it;
34
#X text 314 187 add 1;
35
#X text 41 148 <-- click to graph;
36
#X text 83 209 increase amplitude;
37
#X text 164 264 clip back to range -1/2 to 1/2;
38
#X text 90 316 cosine wave lookup (-1/2 and 1/2 give -1);
40
#X obj 19 292 tabwrite~ clip-output;
41
#X text 585 539 ---- 0.02 seconds ----;
42
#X obj 19 148 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
44
#X obj 30 446 output~;
47
#X text 574 589 updated for Pd version 0.37;
48
#X text 88 337 add one (range now from 0 to 2);
49
#X text 96 360 ...and now from 0 to 1;
50
#X text 20 531 This patch computes a pulse train \, with an "index"
51
control that essentually squeezes the pulses. If "bandwidth" is zero
52
you get a pure cosine wave \, and for larger values of the bandwidth
53
\, the cosine wave is squeezed to fill smaller portions of the waveform.