hi all,
(first a little background, feel free to skip)
I am making a pd patch which is controlled by accelerometer data from a hand held motion sensor (one of these: http://nodesensors.com/node-sensor-platform/).
As accelerometer data is affected by gravity, part of my patch is a calibrator; hold the sensor still for ~2secs and the calibrator takes the average values of these 2secs and uses that as a 'neutral' value which it subtracts from future readings.
I've made up a patch that does this! But... this project will finally exist as an iPhone app using libpd, and my current patch uses pd-extended bits: [tabdump] [list-stddev] [list-mean]
(stop skipping here)
i have a stream of float values, i wish to get a standard deviation and mean values from the last 100 data points.
currently i pour the float values into a table, then [tabdump] and [list-stddev] [list-mean]
how could i do this in pd-vanilla?
see attached for current calibrator patch.
thanks in advance,
alex kent.