Re: resize a matrix non destructively?


Forums > Jitter > resize a matrix non destructively?
October 20, 2010 | 11:05 pm

Thanks for the input, I’ve spent the day looking into these and other various ways forward but have had no luck,

I guess I should have been more clear about what im aiming for,

I have a multiplane matrix 6 planes each 1 by 1024 filled with values which i want to keep intact.

1- Using [number box] id like to reduce the matrix down to "1 by [number box]" keeping the values that exist in this range unchanged.

2- Id then like to be able to increase the matrix to "1 by [number box}" any new cells made should be filled with 0′s.

So far i’ve found a convoluted way of almost achieving 1, although instead of reducing the matrix’s dimensions the values im wanting to get rid of are replaced with zeros- this is not a massive problem.

However when I scale the matrix back up the new values are not replaced with zero’s, they’re going back to what was previously in the matrix.

I’ve attached a patch which demonstrated the problem. opening up p interface and p matrix planes shows what im getting at. using the lcd in ‘p interface’ puts values into the matrix. scrolling the ‘total objects’ number box increases and decreases the matrix. the matrix is viewable in ‘p matrix planes’

If anyone could take a look at the patch id really appreciate it, thought id be able to sort it out in a couple of hours but have been at it all day with no luck so far!