[PD] mapping variable-length lists to a fixed length one

tim vets timvets at gmail.com
Tue May 22 03:13:46 CEST 2012


I have lists of floats from measurements which vary in length
(they grow with the duration of the measurements)
What would be a good way to map those to a list of, say, 150 items?
In concreto:
-When variable list A has 15 elements and fixed list B is 150 long,
I can simply repeat each value of A 10 times to get a 150 elements list.
-When list A has 1500 elements, and B 150, I could take list A 10 elements
at a time,
and write the averages thereof to list B.
but how do I generalize this for _any_ length of list A?
and how do I patch this up in pd? :)
Thanks,
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120522/a712b1db/attachment.htm>


More information about the Pd-list mailing list