view examples/puredata/xtract/a_bavg.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 82c7b834a055
children
line wrap: on
line source
#N canvas 0 0 450 300 10;
#X obj 140 183 +;
#X obj 243 216 f;
#X obj 242 124 f;
#X obj 275 124 + 1;
#X msg 244 193 0;
#X obj 175 223 f;
#X obj 175 245 / \$1;
#X obj 242 147 % \$1;
#X obj 319 172 f \$1;
#X obj 319 192 - 1;
#X obj 243 170 sel;
#X obj 319 146 loadbang;
#X obj 161 60 inlet;
#X obj 165 84 t b f;
#X obj 175 271 outlet;
#X text 28 12 Averages a series of N numbers where N is given by the
first arument (works in blocks);
#X connect 0 0 1 0;
#X connect 0 0 5 1;
#X connect 1 0 0 1;
#X connect 2 0 3 0;
#X connect 2 0 7 0;
#X connect 3 0 2 1;
#X connect 4 0 1 0;
#X connect 5 0 6 0;
#X connect 6 0 14 0;
#X connect 7 0 10 0;
#X connect 8 0 9 0;
#X connect 9 0 10 1;
#X connect 10 0 4 0;
#X connect 10 0 5 0;
#X connect 11 0 8 0;
#X connect 12 0 13 0;
#X connect 13 0 2 0;
#X connect 13 1 0 0;