Is there an object in max that can find the variance of data in a list?
I have typed in variance and list in the search box on the max object database website, but didn’t get any desirable results … only ‘old’ non UB version max objects.
Can’t give you an exact object name I’m afraid, but something from Peter Elsea’s Lobjects or Peter Castine’s Litter pro/power might do what you want. An alternative would be to split up the list into a stream of data using
[zl iter], calculate the variance (text missing) and then pack it all back into a list using [zl group].
lp.stacey from Litter Power gives you: min, max, mean, standard deviation (= square root of variance), skew, and kurtosis. So, stacey’s 5th outlet connected to both inlets of a [* 0.0] object will give you variance.
lp.stacey is available in the Litter Starter Pack, which is free although the current version of that is happier under Max 4.x
The version of stacey in Litter Pro is Max 5-savvy, as is the entire Pro Bundle.
There is also, btw, a version of stacey in the Classic Litter package, where everything was done as abstractions. You might want to look at that to see how to roll your own variance computation.
C74 RSS Feed | © Copyright Cycling '74