diff options
Diffstat (limited to 's-varenv.pd')
-rw-r--r-- | s-varenv.pd | 344 |
1 files changed, 344 insertions, 0 deletions
diff --git a/s-varenv.pd b/s-varenv.pd new file mode 100644 index 0000000..7323f93 --- /dev/null +++ b/s-varenv.pd @@ -0,0 +1,344 @@ +#N canvas 239 16 721 668 10; +#N canvas 0 16 999 675 1078data 0; +#X coords 0 0 140 80 140 80 1; +#X restore 5 19 pd \$0data; +#N canvas 287 289 599 314 1078template 0; +#X obj 15 61 struct \$0template float x float y array \$0arrayvals +\$0arraytemplate; +#X obj 15 96 outlet; +#X obj 15 38 plot \$0arrayvals 0 2 0 0 20; +#X connect 0 0 1 0; +#X restore 411 36 pd \$0template; +#N canvas 435 201 450 300 1078arraytemplate 0; +#X obj 24 43 struct \$0arraytemplate float x float y; +#X obj 24 72 filledpolygon 0 0 0 -3 0 0 3 3 0 0 -3; +#X restore 411 13 pd \$0arraytemplate; +#N canvas 175 111 650 504 initarray 0; +#X obj 163 219 pointer; +#X msg 133 47 bang; +#X text 186 35 click here to re-initialize; +#X msg 310 196 \; \$1 clear; +#X obj 163 96 \$0; +#X msg 163 196 traverse \$1 \, bang; +#X obj 163 119 makefilename pd-%ddata; +#X obj 35 259 append \$0template x; +#X msg 35 227 0; +#X obj 133 12 loadbang; +#X obj 133 72 t b b b; +#X obj 41 98 s \$0-init; +#X obj 163 140 t s s; +#X connect 0 0 7 1; +#X connect 1 0 10 0; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X connect 6 0 12 0; +#X connect 8 0 7 0; +#X connect 9 0 1 0; +#X connect 10 0 11 0; +#X connect 10 1 8 0; +#X connect 10 2 4 0; +#X connect 12 0 5 0; +#X connect 12 1 3 0; +#X restore 558 12 pd initarray; +#X obj 411 58 print; +#N canvas 0 16 999 675 processpoints 0; +#X obj 229 153 pointer; +#X msg 229 130 traverse \$1 \, next; +#X obj 229 86 \$0; +#X obj 229 109 makefilename pd-%ddata; +#X msg 229 24 bang; +#X obj 12 548 set \$0arraytemplate x y; +#X obj 90 336 element \$0template \$0arrayvals; +#X obj 46 259 until; +#X obj 76 218 > 0; +#X obj 46 197 t f f; +#X obj 46 239 spigot; +#X obj 46 284 f; +#X obj 74 284 + 1; +#X msg 157 254 0; +#X obj 160 212 t b b p p; +#X obj 229 65 metro 100; +#X obj 250 428 get \$0arraytemplate x y; +#X obj 208 532 select 1; +#X obj 272 532 select 1; +#X obj 272 511 < 0; +#X msg 272 552 0; +#X obj 375 508 select 1; +#X obj 439 506 select 1; +#X obj 394 615 pack f f; +#X obj 250 452 t f f f; +#X obj 394 639 s \$0xy; +#X obj 406 448 t f f f; +#X obj 12 515 unpack f f; +#X obj 12 484 r \$0xy; +#X obj 105 367 t p p; +#X obj 59 312 t f f; +#X msg 4 455 0; +#X obj 17 395 select 0; +#X obj 62 130 r \$0-points; +#X obj 62 151 - 1; +#X obj 161 357 r \$0-points; +#X obj 161 378 - 1; +#X obj 46 172 1; +#X obj 229 4 r \$0-init; +#X obj 80 395 select 1; +#X obj 264 230 setsize \$0template \$0arrayvals; +#X obj 305 173 r \$0-points; +#X obj 264 202 2; +#X obj 229 173 t p b p; +#X obj 439 483 < 0; +#X msg 439 526 0; +#X text 533 28 every 100 milliseconds this loops through the entire +array and makes sure the points are in range. this is a kludge because +[struct] doesn't tell us when things have been clicked and because +you can't restrict where array values go to.; +#X obj 287 23 random 5; +#X obj 287 44 + 98; +#X msg 88 470 140; +#X obj 375 487 > 80; +#X msg 375 528 80; +#X obj 208 511 > 140; +#X msg 208 552 140; +#X connect 0 0 43 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 4 0 15 0; +#X connect 4 0 47 0; +#X connect 6 0 29 0; +#X connect 7 0 11 0; +#X connect 8 0 10 1; +#X connect 9 0 10 0; +#X connect 9 1 8 0; +#X connect 10 0 7 0; +#X connect 11 0 12 0; +#X connect 11 0 30 0; +#X connect 12 0 11 1; +#X connect 13 0 11 0; +#X connect 14 0 37 0; +#X connect 14 1 13 0; +#X connect 14 2 6 1; +#X connect 15 0 2 0; +#X connect 16 0 24 0; +#X connect 16 1 26 0; +#X connect 17 0 53 0; +#X connect 18 0 20 0; +#X connect 19 0 18 0; +#X connect 20 0 23 0; +#X connect 21 0 51 0; +#X connect 22 0 45 0; +#X connect 23 0 25 0; +#X connect 24 0 52 0; +#X connect 24 1 19 0; +#X connect 24 2 23 0; +#X connect 26 0 50 0; +#X connect 26 1 44 0; +#X connect 26 2 23 1; +#X connect 27 0 5 0; +#X connect 27 1 5 1; +#X connect 28 0 27 0; +#X connect 29 0 16 0; +#X connect 29 1 5 2; +#X connect 30 0 32 0; +#X connect 30 0 39 0; +#X connect 30 1 6 0; +#X connect 31 0 5 0; +#X connect 32 0 31 0; +#X connect 33 0 34 0; +#X connect 34 0 37 1; +#X connect 35 0 36 0; +#X connect 36 0 39 1; +#X connect 37 0 9 0; +#X connect 38 0 4 0; +#X connect 39 0 49 0; +#X connect 41 0 42 1; +#X connect 42 0 40 0; +#X connect 43 0 14 0; +#X connect 43 1 42 0; +#X connect 43 2 40 1; +#X connect 44 0 22 0; +#X connect 45 0 23 1; +#X connect 47 0 48 0; +#X connect 48 0 15 1; +#X connect 49 0 5 0; +#X connect 50 0 21 0; +#X connect 51 0 23 1; +#X connect 52 0 17 0; +#X connect 53 0 23 0; +#X restore 558 32 pd processpoints; +#X obj 467 244 pointer; +#X obj 489 325 setsize \$0template \$0arrayvals; +#X obj 467 268 t p b p; +#X msg 467 221 traverse \$1 \, next; +#X obj 467 177 \$0; +#X obj 467 200 makefilename pd-%ddata; +#X msg 467 152 bang; +#X obj 530 268 r \$0-points; +#X obj 467 125 r \$0-points; +#X obj 489 297 2; +#X obj 388 350 outlet; +#X obj 396 125 r \$0-init; +#N canvas 0 0 618 440 linepairs 0; +#X obj 234 34 inlet; +#X obj 303 343 outlet; +#X obj 389 58 inlet; +#X obj 234 139 element \$0template \$0arrayvals; +#X obj 234 163 get \$0arraytemplate x y; +#X obj 303 196 / 180; +#X obj 390 188 expr 95 - $f1; +#X obj 390 211 / 75; +#X obj 303 299 f; +#X obj 303 261 t b f; +#X obj 303 321 pack f f; +#X obj 303 241 -; +#X obj 16 139 element \$0template \$0arrayvals; +#X obj 16 163 get \$0arraytemplate x y; +#X obj 234 60 t f f; +#X obj 208 93 - 1; +#X obj 146 114 select -1; +#X msg 194 163 0; +#X obj 130 209 / 180; +#X obj 387 312 delay; +#X obj 387 333 s \$0-loop; +#X connect 0 0 14 0; +#X connect 2 0 3 1; +#X connect 2 0 12 1; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 4 1 6 0; +#X connect 5 0 11 0; +#X connect 6 0 7 0; +#X connect 7 0 8 1; +#X connect 8 0 10 0; +#X connect 9 0 8 0; +#X connect 9 0 19 0; +#X connect 9 1 10 1; +#X connect 9 1 19 1; +#X connect 10 0 1 0; +#X connect 11 0 9 0; +#X connect 12 0 13 0; +#X connect 13 0 18 0; +#X connect 14 0 3 0; +#X connect 14 1 15 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 16 1 12 0; +#X connect 17 0 11 1; +#X connect 18 0 11 1; +#X connect 19 0 20 0; +#X restore 388 327 pd linepairs; +#N canvas 0 0 670 643 signal 0; +#X obj 161 185 element \$0template \$0arrayvals; +#X obj 161 209 get \$0arraytemplate x y; +#X obj 230 407 line~; +#X obj 119 28 t b f; +#X obj 230 264 *; +#X obj 119 89 f; +#X obj 147 89 + 1; +#X obj 230 428 outlet~; +#X msg 119 60 0; +#X obj 230 363 f; +#X obj 230 333 t b f; +#X obj 230 385 pack f f; +#X obj 301 385 delay; +#X obj 301 406 s \$0-loop; +#X obj 24 44 r \$0-loop; +#X obj 149 138 < 4; +#X obj 119 113 t f f; +#X obj 119 160 spigot; +#X obj 230 309 -; +#X obj 230 286 t f f; +#X obj 119 5 inlet; +#X obj 207 89 r \$0-points; +#X obj 366 5 inlet; +#X obj 230 242 / 290; +#X obj 317 234 expr 174 - $f1; +#X obj 317 258 / 174; +#X connect 0 0 1 0; +#X connect 1 0 23 0; +#X connect 1 1 24 0; +#X connect 2 0 7 0; +#X connect 3 0 8 0; +#X connect 3 1 4 1; +#X connect 4 0 19 0; +#X connect 5 0 6 0; +#X connect 5 0 16 0; +#X connect 6 0 5 1; +#X connect 8 0 5 0; +#X connect 9 0 11 0; +#X connect 10 0 9 0; +#X connect 10 0 12 0; +#X connect 10 1 11 1; +#X connect 10 1 12 1; +#X connect 11 0 2 0; +#X connect 12 0 13 0; +#X connect 14 0 5 0; +#X connect 15 0 17 1; +#X connect 16 0 17 0; +#X connect 16 1 15 0; +#X connect 17 0 0 0; +#X connect 18 0 10 0; +#X connect 19 0 18 1; +#X connect 19 1 18 0; +#X connect 20 0 3 0; +#X connect 21 0 15 1; +#X connect 22 0 0 1; +#X connect 23 0 4 0; +#X connect 24 0 25 0; +#X connect 25 0 9 1; +#X restore 283 304 pd signal; +#X obj 283 282 inlet; +#X obj 283 327 outlet~; +#X obj 113 3 bng 13 250 50 0 \$0-add empty add 18 8 0 8 -260818 -1 +-1; +#X obj 73 3 bng 13 250 50 0 \$0-clear empty clr 18 8 0 8 -260818 -1 +-1; +#X text 47 259 this is how long (ms) you want the envelope to take. +; +#X obj 103 376 r \$0-add; +#X obj 176 376 r \$0-clear; +#X obj 103 463 2; +#X obj 142 463 + 1; +#X obj 103 489 s \$0-points; +#X msg 176 403 2; +#X obj 33 376 r \$0-init; +#X obj 388 304 r \$0-pair; +#X obj 559 75 inlet; +#X obj 559 98 route pair; +#X obj 559 120 f; +#X obj 559 142 s \$0-pair; +#X obj 6 20 cnv 15 138 78 empty empty empty 20 12 0 14 -262144 -66577 +0; +#X obj 7 21 cnv 15 137 77 empty empty empty 20 12 0 14 -195568 -66577 +0; +#X obj 7 21 cnv 15 136 76 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X connect 1 0 4 0; +#X connect 6 0 8 0; +#X connect 8 0 18 1; +#X connect 8 0 19 1; +#X connect 8 1 15 0; +#X connect 8 2 7 1; +#X connect 9 0 6 0; +#X connect 10 0 11 0; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 13 0 15 1; +#X connect 14 0 12 0; +#X connect 15 0 7 0; +#X connect 17 0 12 0; +#X connect 18 0 16 0; +#X connect 19 0 21 0; +#X connect 20 0 19 0; +#X connect 25 0 27 0; +#X connect 26 0 30 0; +#X connect 27 0 28 0; +#X connect 27 0 29 0; +#X connect 28 0 27 1; +#X connect 30 0 27 0; +#X connect 31 0 27 0; +#X connect 32 0 18 0; +#X connect 33 0 34 0; +#X connect 34 0 35 0; +#X connect 35 0 36 0; +#X coords 0 -1 1 1 150 104 1 0 0; |