#N canvas 402 55 896 697 12;
#X obj 264 151 line~;
#X floatatom 170 105 0 0 0 0 - - -;
#X obj 246 344 cos~;
#N canvas 0 0 450 300 (subpatch) 0;
#X array pulse-output 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 600 357 graph;
#X obj 170 132 phasor~ 0;
#X obj 264 127 pack 0 50;
#X floatatom 264 78 0 0 100 0 - - -;
#X text 167 84 frequency;
#X obj 170 156 -~ 0.5;
#X obj 246 219 *~;
#X obj 264 102 / 10;
#X obj 246 288 clip~ -0.5 0.5;
#X obj 246 445 hip~ 5;
#N canvas 0 0 450 300 (subpatch) 0;
#X array phase-output 882 float 0;
#X coords 0 1.02 882 -1.02 200 60 1;
#X restore 600 82 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array clip-output 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 600 203 graph;
#X text 43 156 phase -1/2 to 1/2;
#X text 78 131 phase 0 to 1;
#X text 92 24 PULSE GENERATOR;
#X obj 390 277 tabwrite~ phase-output;
#X obj 366 440 tabwrite~ pulse-output;
#X text 55 446 high pass filter to cut DC;
#X text 311 103 fix range;
#X text 318 152 smooth it;
#X text 306 177 add 1;
#X text 110 221 increase amplitude;
#X text 29 285 clip back to range -1/2 to 1/2;
#X text 87 330 cosine wave lookup (-1/2 and 1/2 give -1), f 22;
#X obj 264 178 +~ 1;
#X obj 387 352 tabwrite~ clip-output;
#X text 623 499 ---- 0.02 seconds ----;
#X obj 365 209 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 246 486 output~;
#X obj 246 367 +~ 1;
#X obj 246 390 *~ 0.5;
#X text 612 598 updated for Pd version 0.37;
#X text 19 367 add one (range now from 0 to 2);
#X text 82 389 ...and now from 0 to 1;
#X text 67 578 This patch computes a pulse train \, with an "index"
control that essentially 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 text 261 59 index;
#X text 807 77 0.5;
#X text 807 131 -0.5;
#X text 802 202 1;
#X text 804 321 -1;
#X text 804 361 1;
#X text 803 481 -1;
#X text 389 209 <= click to graph;
#X connect 0 0 27 0;
#X connect 1 0 4 0;
#X connect 2 0 32 0;
#X connect 4 0 8 0;
#X connect 5 0 0 0;
#X connect 6 0 10 0;
#X connect 8 0 9 0;
#X connect 9 0 11 0;
#X connect 9 0 18 0;
#X connect 10 0 5 0;
#X connect 11 0 2 0;
#X connect 11 0 28 0;
#X connect 12 0 31 0;
#X connect 12 0 31 1;
#X connect 27 0 9 1;
#X connect 30 0 18 0;
#X connect 30 0 28 0;
#X connect 30 0 19 0;
#X connect 32 0 33 0;
#X connect 33 0 19 0;
#X connect 33 0 12 0;
