Forums > MaxMSP

Avg or sum all in a COLL

Sep 09 2013 | 6:27 pm

so I have a Coll set up to take in indexs up to 50 and then delete index 1, move all indexes down, and add to 50 essentially giving me a constantly changing 50 indexed list. This is for a computer vision project and I am looking to smooth out the blob x/y coord so this was a way I thought to implement it. Basically is there an efficient way to sum all values in a coll and bang that to the output? Is Coll the right tool to be using here?

Sep 09 2013 | 7:39 pm

I don’t know that taking the average of the last 50 values is the best formula for a smoothing filter :), but if you do want to do that, the table object might be your best bet.

-- Pasted Max Patch, click to expand. --


Sep 12 2013 | 12:16 am

Alternatively, use 50 to create a running list.

Vexpr does math on lists if you need anything fancy, though you can calculate the mean with the mean object, or the median with zl.median.

Sep 12 2013 | 12:31 am

yeah, [zl stream 50], [zl sum], [zl median].

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP