[PD] list multiplication
Mathieu Bouchard
matju at sympatico.ca
Fri Feb 27 23:47:29 CET 2004
On Fri, 27 Feb 2004, noskule wrote:
> . .is there a object for mathematic basic operations on lists. . .?
> multiply(divide, add, substract) all elements of listA with listB . .
> .if possible the listlenght should be variable
> a1 a2 a3
> b1 b2 b3
> a1*b1, a2*b2, a3*b3,
GridFlow does this. Listlength is variable. All basic operations like that
are in the [@] class, so you'd do [@ *] for multiplication. You can also
do something like [@ * 3] for multiplication by the constant 3 (whatever
the listlength is), and so on.
Since GridFlow converts to its own listlike datatype (called "grid") for
improved performance, you have to convert it back using [@export_list].
It also can sum all elements in a list (using [@fold +]), and dozens of
other operations.
________________________________________________________________
Mathieu Bouchard http://artengine.ca/matju
More information about the Pd-list
mailing list