pushing/popping from a matrix

Mar 15, 2013 at 3:29am

pushing/popping from a matrix


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!


Mar 15, 2013 at 7:22am

Probably you want to use jit.split and jit.concat for this. See attached:

– Pasted Max Patch, click to expand. –

Best, Jeremy

Mar 15, 2013 at 9:10am

Or do some matrix positioning gymnastics (srcdimxxx & dstdimxxx attributes), see Jitter tutorial 14.

Mar 15, 2013 at 12:44pm

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).


You must be logged in to reply to this topic.