On Feb 11, 2006, at 4:16 AM, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
There are now a couple versions of math objects that do standard math operations on lists: Frank's list-abs and Cyrille's ds_/datastream.
Where can I take a look at ds_?
You can see the mapping library in externals/mapping/, Most of the ds_ objects are checked in there. I attached a tarball of the ds_ collection before being integrated with the hid_ objects into mapping.
So it seems that the list handling versions cannot be interchangable with the standard versions, since standard math objects will interpret lists as input to that objects inlets. But it would be nice to have both options. So I propose making a mirror math library for lists, like this:
math/clip math/list/clip
math/* math/list/*
math/min math/list/min
etc. etc.
This would then largely be built from Frank's list-abs and Cyrille's ds_ objects and assembled to make sure that the list versions have the same interface as the standard versions. Then for handling floats, they would be completely interchangable.
One thing that I considered and important convenience feature for all the arithmetics in [list]-abs was, that they should handle lists where float-elements and symbol-elements are mixed as well by just passing through symbol-elements. That is, "list x 1 y 2 z 3" * "float 2" would result in "list x 2 y 4 z 6". So most of my abstractions have a [route float] inside and math is only done at the left outlet of [route]. ([list-makefilename] works the other way around and ignores floats.)
I'm not sure if this can be included in the proposed arithmetics objects, but IMO it is a very useful feature.
I've never had a situation where I had to use such a feature, but I can't see a problem with it. So unless we come up with a reason against it, sounds fine to me.
.hc ________________________________________________________________________ ____
Man has survived hitherto because he was too ignorant to know how to realize his wishes. Now that he can realize them, he must either change them, or perish. -William Carlos Williams