hcube: hypercube calculator using 4 layers of nested clones and a dynamic [expr]
Preface:
Mainly I did this for two reasons, 1) to see what it would look like to have a 4-d "tree" of clone objects and 2) I think it's funny (in a pure data sense).
As to practical purposes...I leave that up to the user.
Though, being (sort of) 4-d, I think it lends itself to audio sequencers, samplers, and esp. GEM projects.
requires: iemguts
(See hcube-help.pd for more detailed info.)
hcube is a series of four nested clones: cube, table, row, col(umn), with col holding a dynamically generated [expr] object.
It is created using arguments for the number of cubes, tables/cube, rows/table, and columns/table plus an expr, in [expr] notation where $f1 is the variable, $f2 is cube index, $f3 table, etc.
It reports the calculated result, i.e. sends [send]s, in the format [r #-#-#-#] where the numbers represent the (1-indexed) index of the object, ex. [r 1-1-1-1] is the first cube, first table, first row, and first column result.
It can take messages in the format [cubeidx tableidx rowidx columnidx variable formula]. Where if idx=0 then the messages is sent to [all ( clones and if >0 the message is sent to that (index=N-1) item.
The abstraction lends itself to changing the variable, locations, and (esp.) [expr] formulas on the fly, i.e. over time. So sending the variable down the chain and getting a cascade of values. (There is an example of this in the help file.)
I hope it may give you either 1) some use or 2) a giggle.
Now more than ever: Peace and Love through sharing.
Stay safe.
-S
p.s. it's my guess iemmatrix may already do this, but from a logic standpoint, using the clones like this, I think makes a lot of sense and is easy to follow.