Mercurial > hg > libxtract
view examples/puredata/xtract/a_hann.pd @ 214:f28f66faa016
Add "stateful" feature type with initial feature "last n"
Stateful feature extraction functions are functions that require state to be maintained between successive calls. This is necessary, for example when an accumulation of values is required, or changes need to be measured over time.
The initial xtract_last_n() function accumulates the last N (single) values from *data and writes them to *result
author | Jamie Bullock <jamie@jamiebullock.com> |
---|---|
date | Tue, 03 Jun 2014 21:17:07 +0100 |
parents | 1222cd753029 |
children |
line wrap: on
line source
#N canvas 379 192 709 463 10; #X obj 381 119 samplerate~; #X obj 384 187 phasor~; #X msg 470 117 0; #X obj 384 216 expr~ 0.5 - cos($v1 * 6.28) * 0.5; #X obj 381 141 /~ \$1; #X text 43 20 Creation arg gives window size; #X obj 346 38 t b b b b; #X obj 504 92 float \$1; #X obj 346 10 inlet; #X msg 504 114 resize \$1; #X obj 504 139 s \$0-hann; #X obj 589 37 table \$0-hann; #X obj 318 296 tabwrite~ \$0-hann; #X obj 58 186 tabreceive~ \$0-hann; #X obj 59 229 outlet~; #X obj 589 11 block~ \$1; #X connect 0 0 4 0; #X connect 1 0 3 0; #X connect 2 0 1 1; #X connect 3 0 12 0; #X connect 4 0 1 0; #X connect 6 0 12 0; #X connect 6 1 2 0; #X connect 6 2 0 0; #X connect 6 3 7 0; #X connect 7 0 9 0; #X connect 8 0 6 0; #X connect 9 0 10 0; #X connect 13 0 14 0;