Update of /cvsroot/pure-data/externals/mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27076
Added Files: smooth.pd smooth_double.pd smooth_triple.pd Log Message:
- added single, double and triple exponential smoothing objects based on NIST alorgithms (the links are included in the patches). This was originally inspired by Fredrik Olofsson's f0.smooth and f0.smooth2, but I added triple exponential smoothing, and made them as Pd patches.
--- NEW FILE: smooth_double.pd --- #N canvas 860 490 765 388 10; #X obj 61 6 inlet; #X obj 300 6 inlet; #X obj 300 60 purepd/float_argument $1 0.15; #X obj 311 33 loadbang; #X obj 99 345 outlet; #X text 135 220 St = a*Yt1+(1-a)*St1; #X obj 61 51 trigger float bang; #X obj 166 147 float; #X text 202 147 St1; #X obj 300 96 clip 0 1; #X obj 257 312 pddp/pddplink http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc433.htm ; #X obj 215 345 outlet; #X obj 490 6 inlet; #X obj 501 33 loadbang; #X obj 490 96 clip 0 1; #X text 233 277 bt = y * (St - St1) + (1 - y) * bt1; #X text 549 96 y; #X text 359 96 a; #X obj 216 259 expr $f4 * ($f1 - $f2) + (1 - $f4) * $f3; #X obj 334 148 float; #X text 372 147 bt1; #X obj 490 60 purepd/float_argument $2 0.3; #X obj 99 201 expr $f4*$f1+(1-$f4) * ($f2 + $f3); #X connect 0 0 6 0; #X connect 1 0 2 0; #X connect 2 0 9 0; #X connect 3 0 2 0; #X connect 6 0 22 0; #X connect 6 1 7 0; #X connect 6 1 19 0; #X connect 7 0 18 1; #X connect 7 0 22 1; #X connect 9 0 22 3; #X connect 12 0 21 0; #X connect 13 0 21 0; #X connect 14 0 18 3; #X connect 18 0 19 1; #X connect 18 0 11 0; #X connect 19 0 18 2; #X connect 19 0 22 2; #X connect 21 0 14 0; #X connect 22 0 4 0; #X connect 22 0 7 1; #X connect 22 0 18 0;
--- NEW FILE: smooth_triple.pd --- #N canvas 122 353 991 458 10; #X obj 21 12 inlet; #X obj 260 12 inlet; #X obj 260 66 purepd/float_argument $1 0.15; #X obj 271 39 loadbang; #X obj 59 421 outlet; #X obj 21 57 trigger float bang; #X obj 126 153 float; #X text 162 153 St1; #X obj 260 102 clip 0 1; #X obj 175 421 outlet; #X obj 450 12 inlet; #X obj 461 39 loadbang; #X obj 450 102 clip 0 1; #X text 428 265 bt = y * (St - St1) + (1 - y) * bt1; #X text 509 102 y; #X text 319 102 a; #X obj 176 265 expr $f4 * ($f1 - $f2) + (1 - $f4) * $f3; #X obj 294 154 float; #X text 332 153 bt1; #X obj 450 66 purepd/float_argument $2 0.3; #X obj 59 207 expr $f4*$f1+(1-$f4) * ($f2 + $f3); #X obj 302 391 pddp/pddplink http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc435.htm ; #X obj 245 421 outlet; #X obj 630 12 inlet; #X obj 641 39 loadbang; #X obj 630 102 clip 0 1; #X text 689 102 B; #X text 274 208 St = a*(Yt / It1+(1-a)*St1; #X text 524 223 we are only using 2L as the "season"; #X obj 245 349 expr $f4 * ($f2/$f1) + (1 - $f4) * $f3; #X text 482 351 It = B * (Yt/St) + (1 - B) * It1; #X text 467 311 It; #X obj 630 66 purepd/float_argument $3 0.6; #X obj 810 12 inlet; #X obj 821 39 loadbang; #X obj 810 102 int; #X obj 810 127 min 1; #X text 857 99 how many periods; #X obj 810 66 purepd/float_argument $4 1; #N canvas 198 494 450 300 keep 0; #X obj 313 36 inlet; #X obj 214 255 outlet; #X obj 71 34 inlet; #X obj 71 92 list append; #X obj 186 165 list split; #X connect 0 0 4 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 3 1; #X connect 4 1 1 0; #X connect 4 2 3 1; #X restore 334 309 pd keep old It values; #X connect 0 0 5 0; #X connect 1 0 2 0; #X connect 2 0 8 0; #X connect 3 0 2 0; #X connect 5 0 20 0; #X connect 5 1 6 0; #X connect 5 1 17 0; #X connect 6 0 16 1; #X connect 6 0 20 1; #X connect 8 0 20 3; #X connect 10 0 19 0; #X connect 11 0 19 0; #X connect 12 0 16 3; #X connect 16 0 17 1; #X connect 16 0 9 0; #X connect 16 0 29 1; #X connect 17 0 16 2; #X connect 17 0 20 2; #X connect 19 0 12 0; #X connect 20 0 4 0; #X connect 20 0 6 1; #X connect 20 0 16 0; #X connect 20 0 29 0; #X connect 23 0 32 0; #X connect 24 0 32 0; #X connect 25 0 29 3; #X connect 29 0 22 0; #X connect 29 0 39 0; #X connect 32 0 25 0; #X connect 33 0 38 0; #X connect 34 0 38 0; #X connect 35 0 36 0; #X connect 36 0 39 1; #X connect 38 0 35 0; #X connect 39 0 29 2;
--- NEW FILE: smooth.pd --- #N canvas 595 579 651 338 10; #X obj 113 13 inlet; #X obj 363 13 inlet; #X obj 363 67 purepd/float_argument $1 0.15; #X obj 374 40 loadbang; #X obj 189 311 outlet; #X obj 189 116 float; #X text 325 251 St = a*Yt1+(1-a)*St1; #X obj 114 40 trigger float bang; #X text 166 117 Yt1; #X obj 262 116 float; #X text 295 115 St1; #X obj 189 170 expr $f3*$f1+(1-$f3)*$f2; #X obj 242 282 pddp/pddplink http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc431.htm ; #X obj 363 103 clip 0 1; #X connect 0 0 7 0; #X connect 1 0 2 0; #X connect 2 0 13 0; #X connect 3 0 2 0; #X connect 5 0 11 0; #X connect 7 0 5 1; #X connect 7 1 5 0; #X connect 7 1 9 0; #X connect 9 0 11 1; #X connect 11 0 4 0; #X connect 11 0 9 1; #X connect 13 0 11 2;