hi all
i have a little envelope to share. it should be click-free when it gets re-triggered before the envelope finished. maybe this has already been done?
when it gets triggered it measures the actual value with snapshot~ and starts from the current value. this way it does not automatically begin with 0.
comments welcome.
cheers eni
#N canvas 346 22 766 505 10; #X obj 216 455 switch~; #X obj 27 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 27 211 metro 1451.25; #X floatatom 281 190 5 0 0 0 attack - -; #X floatatom 331 220 5 0 0 0 decay - -; #X floatatom 381 250 5 0 0 0 sustain - -; #X floatatom 431 280 5 0 0 0 release - -; #X obj 93 455 tabwrite~ vadsr; #N canvas 0 22 450 300 (subpatch) 0; #X array vadsr 11000 float 0; #X coords 0 1 10999 0 500 100 1; #X restore 176 25 graph; #X obj 265 436 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1; #X obj 393 164 loadbang; #X msg 431 249 261; #X floatatom 511 346 5 0 0 0 - - -; #X msg 511 316 set 11025; #X msg 511 376 ; vadsr resize $1; #X obj 123 375 pack 51 87 31 261; #X obj 123 345 f 51; #X obj 102 179 * 64; #X obj 102 149 / 44.1; #X msg 102 119 1000; #X floatatom 110 244 5 0 0 0 - - -; #X msg 281 159 31; #X obj 77 264 del 80; #X msg 331 187 35; #X msg 381 219 65; #X obj 123 425 vadsr2 3 4 90 16; #X text 47 12 a) start triggering; #X text 71 101 blockligned; #X text 425 193 b) play with the adsr parameter; #X text 462 410 c) adjust tablesize to adsr duration for better visualization ; #X text 267 454 optional switch to save cpu; #X text 90 280 retriggering is clickfree; #X text 130 402 attack(ms) decay(ms) sustain(%) release(ms); #X connect 1 0 2 0; #X connect 2 0 7 0; #X connect 2 0 16 0; #X connect 2 0 22 0; #X connect 3 0 16 1; #X connect 4 0 15 1; #X connect 5 0 15 2; #X connect 6 0 15 3; #X connect 10 0 21 0; #X connect 10 0 23 0; #X connect 10 0 24 0; #X connect 10 0 11 0; #X connect 10 0 13 0; #X connect 10 0 19 0; #X connect 11 0 6 0; #X connect 12 0 14 0; #X connect 13 0 12 0; #X connect 15 0 25 0; #X connect 16 0 15 0; #X connect 17 0 2 1; #X connect 18 0 17 0; #X connect 19 0 18 0; #X connect 20 0 22 1; #X connect 21 0 3 0; #X connect 23 0 4 0; #X connect 24 0 5 0; #X connect 25 0 7 0; #X connect 25 1 0 0; #X connect 25 1 9 0;
#N canvas 18 22 535 739 10; #X obj 147 545 vline~; #X obj 29 485 vline~; #X obj 147 575 dbtorms~; #X obj 29 515 dbtorms~; #X obj 13 575 -~; #X obj 13 545 sig~ 1; #X obj 152 232 rmstodb; #X obj 86 172 max 0.1; #X obj 333 186 max 0.1; #X obj 145 279 t b f; #X obj 29 22 inlet; #X obj 84 697 outlet~; #X obj 375 622 outlet; #X obj 375 562 f 1; #X obj 415 562 f 0; #X obj 415 532 del 500; #X msg 415 502 stop; #X obj 376 472 t b b b; #X text 39 379 attack decay sustain hold release; #X obj 29 405 t a a b; #X obj 152 202 * 0.01; #X obj 152 172 clip 0 100; #X obj 464 443 t b f; #X obj 454 472 + 16; #X obj 125 309 + 4; #X obj 29 112 unpack f f f f; #X obj 29 202 t a a; #X text 79 22 attack(ms) decay(ms) sustain(%) release(ms); #X obj 29 355 pack f f f f f; #X obj 49 82 list append $1 $2 $3 $4; #X obj 49 52 loadbang; #X obj 375 592 change 0; #X obj 29 172 max 0; #X msg 29 455 60 $1 0 , 100 0 $1; #X obj 147 485 t a b; #X msg 147 515 0 , 100 0 $1 , $3 $2 $1 , 0 $5 $4; #X obj 214 613 snapshot~; #X obj 214 673 -; #X obj 214 703 rmstodb; #X msg 214 643 1 $1; #X msg 397 22 version 2.0.0; #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 2 0 11 0; #X connect 2 0 36 0; #X connect 3 0 4 1; #X connect 4 0 11 0; #X connect 4 0 36 0; #X connect 5 0 4 0; #X connect 6 0 28 2; #X connect 7 0 9 0; #X connect 7 0 28 1; #X connect 8 0 22 0; #X connect 8 0 28 4; #X connect 9 0 24 0; #X connect 9 1 24 1; #X connect 10 0 25 0; #X connect 13 0 31 0; #X connect 14 0 31 0; #X connect 15 0 14 0; #X connect 16 0 15 0; #X connect 17 0 15 0; #X connect 17 1 13 0; #X connect 17 2 16 0; #X connect 19 0 33 0; #X connect 19 1 34 0; #X connect 19 2 17 0; #X connect 20 0 6 0; #X connect 21 0 20 0; #X connect 22 0 23 0; #X connect 22 1 23 1; #X connect 23 0 15 1; #X connect 24 0 23 0; #X connect 24 0 28 3; #X connect 25 0 32 0; #X connect 25 1 7 0; #X connect 25 2 21 0; #X connect 25 3 8 0; #X connect 26 0 28 0; #X connect 26 1 24 0; #X connect 28 0 19 0; #X connect 29 0 25 0; #X connect 30 0 29 0; #X connect 31 0 12 0; #X connect 32 0 26 0; #X connect 33 0 1 0; #X connect 34 0 35 0; #X connect 34 1 36 0; #X connect 35 0 0 0; #X connect 36 0 39 0; #X connect 37 0 38 0; #X connect 38 0 1 0; #X connect 39 0 37 0;