#N canvas 544 64 636 663 12;
#X declare -stdpath ./;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-sum 441 float 0;
#X coords 0 0.5 440 -0.5 200 130 1;
#X restore 344 144 graph;
#X text 365 282 ---- 0.02 seconds ----;
#X obj 162 392 output~;
#X obj 226 353 tabwrite~ \$0-sum;
#X obj 180 153 / 100;
#X floatatom 180 128 4 0 100 0 - up - 0;
#X obj 230 153 / 100;
#X floatatom 230 128 4 0 100 0 - down - 0;
#X obj 226 292 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X obj 103 147 phasor~;
#X floatatom 103 120 5 0 0 0 - freq - 0;
#X text 74 95 frequency;
#X text 167 87 SLOPES (percent);
#X obj 162 183 *~;
#X obj 103 185 *~ -1;
#X obj 103 210 +~ 1;
#X obj 187 258 *~;
#X obj 162 285 min~;
#X text 313 138 0.5;
#X text 307 262 -0.5;
#X text 183 108 up;
#X text 230 108 down;
#X text 90 481 Occasionally a second method for making corners is more convenient. Here we specify the slopes of the rising and falling segments (as always \, in units per cycle). We then make a triangle wave with a corner at (0 \, 0) and another one \, placed somewhere within the cycle. The slopes of the two lines determine the second point \, which will have an x value of t/(s+t) (if we let 's' denote the rising slope and 't' the falling one \, both as positive numbers). The y value is st/(s+t). If we wish instead to specify the corner location (x \, y) (with x in cycles \, 0<x<1) we set s = y/x and t = y/(1-x). The DC value is y/2., f 68;
#X obj 34 28 cnv 5 5 25 empty empty Making\ Waveforms\ With\ Corners\ via\ Line\ Segments\ Slopes 15 13 0 16 #dfdfdf #202020 0;
#X obj 226 318 metro 100;
#N canvas 923 196 368 277 init 0;
#X obj 118 220 declare -stdpath ./;
#X msg 146 130 \; freq 220 \; up 50 \; down 25;
#X obj 146 100 loadbang;
#X text 53 17 this subpatch initializes the patch and loads values in number boxes., f 29;
#X connect 2 0 1 0;
#X restore 407 365 pd init;
#X connect 4 0 13 1;
#X connect 5 0 4 0;
#X connect 6 0 16 1;
#X connect 7 0 6 0;
#X connect 8 0 24 0;
#X connect 9 0 13 0;
#X connect 9 0 14 0;
#X connect 10 0 9 0;
#X connect 13 0 17 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 17 1;
#X connect 17 0 2 0;
#X connect 17 0 3 0;
#X connect 24 0 3 0;
