[PD] average Signal block by block
Charles Henry
czhenry at gmail.com
Wed Dec 13 06:30:53 CET 2006
wait a second....
what are these signal blocks like that you want to average over? Is
it in fact a continuous signal, or are they actually independent
measurements of the same (phase-locked) data?
(If it's continuous data, you probably do not want this kind of approach)
Chuck
On 12/12/06, Andreas <B-Andreas at web.de> wrote:
> > How about something like this
> >
> > [inlet~] [delread whatever]
> > |/ /
> > /[+~]
> > |/ [bang~]
> > /[/~ 1] [1 ] [+ 1] (the object 1 is a float with default value 1)
> > |/
> > /[tabwrite~ result] [delwrite whatever block_size_in_ms]
> >
> > This is meant to be a recursive way of adding them up. You'll just
> > have to be able to start and stop it at the right time. you might be
> > able to use [tabplay~ result] instead of delwrite and delread
> > good luck!
> > Chuck
> thx for that, i'll try it and see if i can use it this way
> non recursive i found a way to do it but its pretty cpu intense with like 100 z~ objects
> here a short example with average over 5 Blocks
>
> Andreas
>
> --- average_example.pd ---
>
> #N canvas 119 470 670 424 10;
> #X obj 29 17 samplerate~;
> #X obj 29 -14 loadbang;
> #X obj 137 30 block~;
> #X msg 137 3 set 1024 1;
> #X obj 29 45 / 1024;
> #N canvas 0 0 450 300 graph1 0;
> #X array averageme 1024 float 1;
> #X coords 0 1 1023 -1 200 140 1;
> #X restore 27 257 graph;
> #X obj 29 221 tabwrite~ averageme;
> #X obj 39 195 bang~;
> #X obj 65 68 noise~;
> #X obj 29 106 +~;
> #N canvas 0 0 450 300 graph3 0;
> #X array averaged 1024 float 3;
> #X coords 0 1 1023 -1 200 140 1;
> #X restore 286 258 graph;
> #X obj 288 222 tabwrite~ averaged;
> #X obj 308 197 bang~;
> #X obj 301 64 z~ 1024;
> #X obj 309 90 z~ 2048;
> #X obj 322 113 z~ 3072;
> #X obj 328 136 z~ 4096;
> #X obj 288 167 /~ 5;
> #X obj 65 87 *~ 0.1;
> #X obj 29 68 osc~;
> #X connect 0 0 4 0;
> #X connect 1 0 0 0;
> #X connect 1 0 3 0;
> #X connect 3 0 2 0;
> #X connect 4 0 19 0;
> #X connect 7 0 6 0;
> #X connect 8 0 18 0;
> #X connect 9 0 6 0;
> #X connect 9 0 17 0;
> #X connect 9 0 13 0;
> #X connect 9 0 14 0;
> #X connect 9 0 15 0;
> #X connect 9 0 16 0;
> #X connect 12 0 11 0;
> #X connect 13 0 17 0;
> #X connect 14 0 17 0;
> #X connect 15 0 17 0;
> #X connect 16 0 17 0;
> #X connect 17 0 11 0;
> #X connect 18 0 9 0;
> #X connect 19 0 9 0;
>
>
>
>
>
More information about the Pd-list
mailing list