From 3cf10b76a1322341856509569310681e4f4b81e9 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes Date: Mon, 3 Jan 2011 17:52:00 +0000 Subject: added META subpatch svn path=/trunk/externals/ekext/; revision=14688 --- weightonset-help.pd | 112 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 46 deletions(-) (limited to 'weightonset-help.pd') diff --git a/weightonset-help.pd b/weightonset-help.pd index 28c43f7..9d82162 100644 --- a/weightonset-help.pd +++ b/weightonset-help.pd @@ -1,4 +1,4 @@ -#N canvas 31 64 901 594 10; +#N canvas 0 31 901 629 10; #N canvas 1901 230 450 300 hasc 0; #X obj 65 62 inlet~; #X obj 196 184 block~ 1024; @@ -14,21 +14,21 @@ from the FFT; #X connect 2 1 3 1; #X connect 3 0 4 0; #X connect 5 0 3 2; -#X restore 44 446 pd hasc; -#X obj 128 374 bonk~; +#X restore 44 466 pd hasc; +#X obj 128 394 bonk~; #N canvas 0 0 450 300 (subpatch) 0; #X array \$0-input 106595 float 0; #X coords 0 1 106594 -1 200 51 1; -#X restore 287 337 graph; -#X obj 128 398 t b b; -#X obj 81 534 f; -#X floatatom 96 515 5 0 0 0 - - -; -#X floatatom 168 376 5 0 99 0 - - -; -#X obj 81 554 print end-value; -#X obj 43 352 tabplay~ \$0-input; -#X floatatom 75 382 5 0 100 0 - - -; -#X floatatom 75 424 5 0 0 0 - - -; -#X obj 75 402 * 0.1; +#X restore 287 357 graph; +#X obj 128 418 t b b; +#X obj 81 554 f; +#X floatatom 96 535 5 0 0 0 - - -; +#X floatatom 168 396 5 0 99 0 - - -; +#X obj 81 574 print end-value; +#X obj 43 372 tabplay~ \$0-input; +#X floatatom 75 402 5 0 100 0 - - -; +#X floatatom 75 444 5 0 0 0 - - -; +#X obj 75 422 * 0.1; #N canvas 0 0 450 300 tw 0; #X obj 274 70 inlet; #X msg 274 91 0; @@ -51,12 +51,15 @@ from the FFT; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 1 6 0; -#X restore 39 547 pd tw; +#X restore 39 567 pd tw; #N canvas 0 0 450 300 (subpatch) 0; -#X array \$0-hasc 1 float 3; -#A 0 0; -#X coords 0 511 1 -1 200 51 1; -#X restore 287 408 graph; +#X array \$0-hasc 104 float 3; +#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0; +#X coords 0 511 104 -1 200 51 1; +#X restore 287 428 graph; #N canvas 0 0 450 300 adapt 0; #X obj 128 44 inlet; #X obj 127 74 / 100; @@ -70,10 +73,10 @@ from the FFT; #X connect 2 1 4 1; #X connect 3 0 4 0; #X connect 4 0 5 0; -#X restore 168 395 pd adapt; -#X floatatom 168 429 5 0 0 1 influence - -; -#X obj 168 336 loadbang; -#X obj 88 304 bng 15 250 50 0 empty empty load 17 7 0 10 -262144 -1 +#X restore 168 415 pd adapt; +#X floatatom 168 449 5 0 0 1 influence - -; +#X obj 168 356 loadbang; +#X obj 88 324 bng 15 250 50 0 empty empty load 17 7 0 10 -262144 -1 -1; #N canvas 211 176 325 300 loadfile 0; #X obj 44 28 openpanel; @@ -106,16 +109,19 @@ from the FFT; #X connect 11 0 0 0; #X connect 13 0 14 0; #X connect 14 0 1 0; -#X restore 88 323 pd loadfile; -#X obj 43 304 bng 12 250 50 0 empty empty play 15 6 0 10 -262144 -1 +#X restore 88 343 pd loadfile; +#X obj 43 324 bng 12 250 50 0 empty empty play 15 6 0 10 -262144 -1 -1; -#X obj 43 319 t b b; +#X obj 43 339 t b b; #N canvas 0 0 450 300 (subpatch) 0; -#X array \$0-weightonset 1 float 3; -#A 0 0; -#X coords 0 511 1 -1 200 51 1; -#X restore 287 478 graph; -#X obj 116 435 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +#X array \$0-weightonset 104 float 3; +#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0; +#X coords 0 511 104 -1 200 51 1; +#X restore 287 498 graph; +#X obj 116 455 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -257985 -1; #X text 56 49 The second value is multipled by the value in the second inlet (range 0-1) and added to the first value. Then \, the divider @@ -124,11 +130,11 @@ by this value \, and added to it.; #X text 46 8 This object makes a moving average with successively less important values. The calculation initiates when the object is banged \, and the first value is the most influential.; -#X msg 65 472 1; -#X obj 130 473 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +#X msg 65 492 1; +#X obj 130 493 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; -#X obj 195 528 print data; -#X text 78 161 When the object is banged the right outlet sends a list +#X obj 195 548 print data; +#X text 78 171 When the object is banged the right outlet sends a list of all the values that influenced the result since the last bang \, up to a limit of 1024 values.; #X obj 477 73 weightonset; @@ -163,22 +169,22 @@ up to a limit of 1024 values.; #X text 538 119 V; #X text 531 132 data dump; #X text 537 143 on bang; -#X msg 49 382 5; -#X text 212 439 factor; -#X text 202 415 successive; +#X msg 49 402 5; +#X text 212 459 factor; +#X text 202 435 successive; #X text 64 101 The influence of successive values is lessened by the inverse of the factor on the right inlet. So \, a value of 0.2 in the second inlet means that the second value after the bang is 20% as influential as the first \, and the third value is 20% of 20% (4%) as influential as the first.; -#X floatatom 195 465 5 0 10 1 attack - -; +#X floatatom 195 485 5 0 10 1 attack - -; #X text 509 200 influence factor = 0 : 1st float output only; #X text 510 188 attack length = 0 \,; #X text 535 166 EXAMPLES:; #X text 520 226 attack length = 0 \,; #X text 519 238 influence factor = 1: successive values are; -#X text 232 475 phase; -#X text 232 489 0-100; +#X text 232 495 phase; +#X text 232 509 0-100; #X text 508 252 equally influential to the total \, but the list; #X text 492 31 successive influence factor (0-1); #X text 538 58 V; @@ -205,15 +211,15 @@ values are at the start of the series.; #X text 517 437 attack length = 3 \,; #X text 509 327 influence factor = 0.5: v1 w 1 \, v2 w 0.5 \, v3 w 0.25 \, v4 w 0.125; -#X text 86 200 If the attack phase is greater than 0 \, the values +#X text 86 210 If the attack phase is greater than 0 \, the values become successively more influential to the weighted average \, until the number of values is equal to the attack+1. The next value after the attack phase is the most influential \, then the influence factor kicks in and successive values become less influential.; #X text 557 71 creation args: influence factor \, attack; -#X obj 96 495 weightonset 0.8 0; -#X obj 10 381 dac~; -#X msg 168 356 80; +#X obj 96 515 weightonset 0.8 0; +#X obj 10 401 dac~; +#X msg 168 376 80; #X text 513 451 influence factor = 0.5: v1 w 0.125 \, v2 w 0.25 \, v3 w 0.5 \, v4 w 1 \, v5 w 0.5 \, v6 w 0.25...; #X text 525 43 attack phase (0-100+); @@ -224,9 +230,23 @@ v3 w 0.5 \, v4 w 1 \, v5 w 0.5 \, v6 w 0.25...; #X text 509 517 the output is onset-weighted e.g. the most influential values are at the start of the series \, after the attack phase in which the values become successively more influential.; -#X text 99 269 The weightings of values during the attack phase is +#X text 99 289 The weightings of values during the attack phase is the reverse of successive weightings after the attack:; -#X text 226 294 weighting = influence pow(attack - index); +#X text 226 314 weighting = influence pow(attack - index); +#N canvas 343 202 494 344 META 0; +#X text 12 195 HELP_PATCH_AUTHORS Ed Kelly. Revised by Jonathan Wilkes +for Pd-extended 0.42 to conform to the PDDP template.; +#X text 12 5 KEYWORDS control; +#X text 12 175 AUTHOR Ed Kelly ; +#X text 12 25 LICENSE GPL v3; +#X text 12 75 INLET_0 float; +#X text 12 95 INLET_1 float; +#X text 12 115 INLET_2 float; +#X text 12 135 OUTLET_0 float; +#X text 12 155 OUTLET_1 list; +#X text 12 45 DESCRIPTION makes a moving average with successively +less important values; +#X restore 841 597 pd META; #X connect 0 0 12 0; #X connect 0 0 98 0; #X connect 1 0 3 0; -- cgit v1.2.1