[PD] smallest number from a stream of numbers

Hans-Christoph Steiner hans at eds.org
Wed Jul 9 23:26:21 CEST 2008


Oops, I forgot to add, the min/trigger and track_min/max examples  
give the min/max for all of the past values.  Cyrille's example with  
[last_n] gives you the min and max for the past thirty values.

There is also [local_min] and [local_max] for tracking trends.

.hc

On Jul 9, 2008, at 11:00 AM, Hans Roels wrote:

> 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<maximum-minimum.pd>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
> listinfo/pd-list



------------------------------------------------------------------------ 
----

As we enjoy great advantages from inventions of others, we should be  
glad of an opportunity to serve others by any invention of ours; and  
this we should do freely and generously.         - Benjamin Franklin






More information about the Pd-list mailing list