[PD] smallest number from a stream of numbers

Hans Roels hans.roels at versateladsl.be
Wed Jul 9 17:00:16 CEST 2008


I don't think you need lists for this, just 2 
objects [min] [trigger] and an initial value. in 
attach is an example with a random stream of numbers.
hans r

At 21:47 8/07/2008, you wrote:
>Frank Barknecht wrote:
> > Hallo,
> > cyrille henry hat gesagt: // cyrille henry wrote:
> >
> >> Ben Carney a écrit :
> >>> Hello there list!
> >>>
> >>> pretty simple question I think, but I'm a bit stumped.
> >>>
> >>> I have a stream of numbers coming in from a flex sensor and I would love
> >>> to be able to grab the lowest number from x amount of numbers, every 30
> >>> numbers or so.
> >>>
> >>> I looked through the [list minmax] example, but could not figure out how
> >>> to make it do it "live".
> >>>
> >>  |
> >> [mapping/last_n 30]
> >>  |
> >> [list minmax]
> >>  |
> >
> > Or
> >
> >  [list-lastx 30]
> >  |
> >  [list-minmax]
> >
>
>Or how about
>
>         /\
>[moses]  \
>|         \
>[trigger a a]
>
>with a handmade counter that resets moses every n'th time.
>
>eni
>
>_______________________________________________
>Pd-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> 
>http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
#N canvas 449 139 607 439 12;
#X msg 363 208 -10000;
#X obj 373 292 max;
#X obj 200 163 loadbang;
#X obj 414 319 t f f;
#X floatatom 314 374 5 0 0 0 - - -;
#X obj 203 120 bng 15 250 50 0 empty empty reset 17 7 0 10 -262144
-1 -1;
#X text 385 226 very small initial value;
#X obj 74 296 t f f;
#X floatatom 184 369 5 0 0 0 - - -;
#X msg 102 213 100000;
#X obj 46 264 min;
#X text 95 234 very high initial value;
#X text 184 396 minimum;
#X text 314 398 maximum;
#X obj 209 53 random 1000;
#X obj 205 6 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 207 27 metro 100;
#X text 234 4 on/off stream of random numbers;
#X connect 0 0 1 1;
#X connect 1 0 3 0;
#X connect 2 0 0 0;
#X connect 2 0 9 0;
#X connect 3 0 4 0;
#X connect 3 1 1 1;
#X connect 5 0 0 0;
#X connect 5 0 9 0;
#X connect 7 0 8 0;
#X connect 7 1 10 1;
#X connect 9 0 10 1;
#X connect 10 0 7 0;
#X connect 14 0 10 0;
#X connect 14 0 1 0;
#X connect 15 0 16 0;
#X connect 16 0 14 0;


More information about the Pd-list mailing list