view examples/puredata/xtract/a_output~.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 757 675 12;
#X obj 516 522 t b;
#X obj 516 469 f;
#X obj 516 547 f;
#X msg 630 546 0;
#X obj 516 499 moses 1;
#X obj 630 518 t b f;
#X obj 596 479 moses 1;
#X obj 29 97 dbtorms;
#X obj 85 170 inlet~;
#X msg 278 300 \; pd dsp 1;
#X obj 29 170 line~;
#X obj 64 242 *~;
#X obj 64 272 dac~;
#X obj 29 127 pack 0 50;
#X text 121 146 audio in;
#X text 301 496 test if less than 1 -->;
#X text 267 523 if true convert to bang -->;
#X text 100 96 <-- convert from dB to linear units;
#X floatatom 31 13 3 0 100 0 dB - -;
#X obj 44 37 bng 15 250 50 0 empty empty mute -38 7 0 10 -262144 -1
-1;
#X text 118 126 <-- make a ramp to avoid clicks or zipper noise;
#X obj 148 170 inlet~;
#X obj 154 241 *~;
#X text 502 399 MUTE logic:;
#X obj 293 247 s \$0-master-out;
#X obj 29 71 r \$0-master-out;
#X obj 596 450 r \$0-master-out;
#X text 182 8 Level control abstraction \, used in many of the Pd example
patches. The level and mute controls show up on the parent \, calling
patch.;
#X text 229 549 previous nonzero master-lvl -->;
#X text 301 453 recall previous;
#X text 301 471 value of master-lvl -->;
#X text 16 310 automatically start DSP -->;
#X obj 85 192 hip~ 3;
#X obj 147 192 hip~ 3;
#X text 26 608 NOTE: This abstraction was written by Miller Puckette
\, and is include with the PD examples as part of the 'standard' PD
documentation. JB 23/05/05;
#X obj 278 193 r \$0-master-lvl-stereo;
#X obj 516 573 s \$0-master-lvl-stereo;
#X obj 623 215 inlet;
#X connect 0 0 2 0;
#X connect 1 0 4 0;
#X connect 2 0 36 0;
#X connect 3 0 36 0;
#X connect 4 0 0 0;
#X connect 4 1 5 0;
#X connect 5 0 3 0;
#X connect 6 1 2 1;
#X connect 7 0 13 0;
#X connect 8 0 32 0;
#X connect 10 0 22 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 13 0 10 0;
#X connect 18 0 9 0;
#X connect 18 0 24 0;
#X connect 19 0 1 0;
#X connect 21 0 33 0;
#X connect 22 0 12 1;
#X connect 25 0 7 0;
#X connect 26 0 1 1;
#X connect 26 0 6 0;
#X connect 32 0 11 1;
#X connect 33 0 22 1;
#X connect 35 0 18 0;
#X connect 37 0 18 0;
#X coords 0 0 1 1 65 55 1 0 0;