• ### Determine largest number in a stream of numbers?

greets all. i have a (possibly) simple question...

how do i determine the largest number that has occured in a stream of numbers? i want to measure numbers in a fluctuating stream of numbers, but i want the highest number that has occured within a given time frame, to be shown or saved. i would be very surprised if there isnt a super simple way to do this that illudes me.

Onyx

• Posts 4 | Views 2436
• hey, surprise surprise. Actually there is...
Give this a try..

In
|
[max] X [f ]
|
Out

You just have to go through all the numbers in that stream..
It can be resetted (..with a clocksignal..) by setting [max]s right inlet to the smalles number you expect to occur ( eg. to "0", or something negative..)

• thank you! this should work perfectly.

the goal is to derive relative distance, per axis, from an accelerometer and use the resultant position as a gestural parameter location. should allow for an more dynamic gesture "cloud". this was the last piece! yaaay!

cheers!

onyx

• Is it gauche for me to reply to this ancient post? At least that rhymes (sort of)!

I want to do nearly the same thing, but I don't like the inelegance of resetting the [max] with a clock. I would like to be able to see the highest of, say, the previous 100 numbers... and so it would continuously change, rather than at clock-based jumps.

I'm using something similar (actually, with [min]) to easily monitor some number streams with a VU. The basic output works fine, but I'm trying to use the peak-level-input to hover around the low end. When I reset [min] with a clock, it jumps up higher than I'd like.

[average] is cool, in the way that it keeps track of a stream of numbers... that's the sorta thing I'm after. Anyone have any ideas?

(see, if my number-stream glided up from, say, (0 - 100) to (50 - 1000), I'd like to see the Peak-Level drift up from 0 to 50. With a clock-based reset, it might jump to 75 while the stream is still in the 0 - 100 range.)

Posts 4 | Views 2436
Internal error.

Oops! Looks like something went wrong!