#N canvas 386 89 881 756 12;
#X declare -stdpath ./;
#X obj 264 188 line~;
#X floatatom 170 135 4 0 0 0 - - - 0;
#X obj 246 394 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 624 504 graph;
#X obj 264 164 pack 0 50;
#X floatatom 264 115 4 0 90 0 - - - 0;
#X text 97 134 frequency;
#X obj 170 186 -~ 0.5;
#X obj 246 249 *~;
#X obj 264 139 / 10;
#X obj 246 338 clip~ -0.5 0.5;
#X obj 246 535 hip~ 5;
#N canvas 0 0 450 300 (subpatch) 0;
#X array phase-output 882 float 0;
#X coords 0 5 881 -5 200 175 1 0 0;
#X restore 624 127 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 624 350 graph;
#X text 43 186 phase -1/2 to 1/2;
#X text 78 161 phase 0 to 1;
#X obj 410 347 tabwrite~ phase-output;
#X obj 386 530 tabwrite~ pulse-output;
#X text 55 536 high pass filter to cut DC;
#X text 309 189 smooth it;
#X text 108 331 clip back to range -1/2 to 1/2, f 18;
#X text 87 380 cosine wave lookup (-1/2 and 1/2 give -1), f 22;
#X obj 407 422 tabwrite~ clip-output;
#X text 647 646 ---- 0.02 seconds ----;
#X obj 385 289 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 246 576 output~;
#X obj 246 437 +~ 1;
#X obj 246 480 *~ 0.5;
#X text 121 430 add one (range now from 0 to 2), f 16;
#X text 147 471 ...and now from 0 to 1, f 12;
#X text 47 655 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., f 75;
#X text 299 113 index;
#X text 826 333 1;
#X text 828 458 -1;
#X text 828 498 1;
#X text 827 618 -1;
#X obj 650 40 declare -stdpath ./;
#X text 409 288 <-- click to graph;
#X obj 170 162 phasor~;
#X obj 170 78 loadbang;
#X text 829 119 5;
#X text 830 289 -5;
#X text 98 254 increase amplitude up to -5 and 5 range, f 20;
#X text 302 140 fix range (1 to 10);
#X msg 170 108 220;
#X obj 264 219 +~ 1;
#X obj 92 22 cnv 5 5 25 empty empty Pulse\ Generator 15 13 0 16 #dfdfdf #202020 0;
#X obj 385 227 tgl 19 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0 1;
#X obj 385 256 metro 500;
#X connect 0 0 45 0;
#X connect 1 0 38 0;
#X connect 2 0 26 0;
#X connect 4 0 0 0;
#X connect 5 0 9 0;
#X connect 7 0 8 0;
#X connect 8 0 10 0;
#X connect 8 0 16 0;
#X connect 9 0 4 0;
#X connect 10 0 2 0;
#X connect 10 0 22 0;
#X connect 11 0 25 0;
#X connect 24 0 16 0;
#X connect 24 0 22 0;
#X connect 24 0 17 0;
#X connect 26 0 27 0;
#X connect 27 0 11 0;
#X connect 27 0 17 0;
#X connect 38 0 7 0;
#X connect 39 0 44 0;
#X connect 44 0 1 0;
#X connect 45 0 8 1;
#X connect 47 0 48 0;
#X connect 48 0 24 0;
