pushing/popping from a matrix
Hi
I have a 3 plane matrix where x = 60 and y = 1 (a simple array), and I'm wondering if there is any object/function (or a well established design pattern), for popping or shifting a cell off of a matrix and moving every other cell over by one? conversely, is there an established function or pattern for pushing an item onto a matrix and shifting every cell over by one? many thanks!
Peter
Probably you want to use jit.split and jit.concat for this. See attached:
Best, Jeremy
Or do some matrix positioning gymnastics (srcdimxxx & dstdimxxx attributes), see Jitter tutorial 14.
thanks! i'll check those both out. it also occurred to me that array manipulation with shift/push in JS might be easier (and just send the adjusted array/list into a matrix on each bang).