[sharing] matrixctrl move contents forward or backward
Someone said in an interview that they found the forum most useful when people didn't post whole patches but design patterns so here's my contribution. I'm stuck in the past and still think step sequencers are kind of cool and matrixctrl is one of my favourite ways of creating them (remember a matrixctrl will interpolate with pattr while a coll or seq~ won't - this is where the fun is).
Sometimes you've created something funky but the downbeat isn't in the right place so you need to rotate the pattern. This is how I do it, it's got my favourite object that I think beginners overlook the power of when designing algorithms, 'grab'. That and a bit of list processing.
Just my two cents.
This is really cool and useful. Thank you.
When I first opened it the patch didn't work because two of the zl objects had the arguments written in wrong so I fixed it.
Here it is with the fixes:
Yeah sorry I think the zl[DOT]arg thing is a max 6 'feature'. Glad you liked it.
Nice!!
Thank you
wouldn't matrixctrl be a lot more fun if you didn't have to do the row/column/value thing all the time?
Like, it would accept "getall" and "setall" messages and just output a long list? That would make working with it so much easier for me.
That's not very hard to do:
that... doesn't really work for me; an empty matrix shows up like:
0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 0 1 0 1 1 0 2 1 0 3 1 0 4 1 0 5 1 0 6 1 0 7 1 0 0 2 0 1 2 0 2 2 0 3 2 0 4 2 0 5 2 0 6 2 0 7 2 0 0 3 0 1 3 0 2 3 0 3 3 0 4 3 0 5 3 0 6 3 0 7 3 0
and there is no real way to send the full matrix back in.
It works, Chris just used a message box to show the long list. Connect a second [matrixctrl] to the same [patcher] outlet and you can copy from the first [matrixctrl] to the second by clicking the bang button:
Maybe you were expecting just the data?
exactly, Chris. My wish is that the iter, counter, pack magic that we do in order to format the data wouldn't be neccesary, as we would be able to just feed in the list.
And even then we still need to set the col/row size in order to properly format. Wouldn't it be great to just have a long list wrap around? I'd love that, and I would certainly be using matrixctl a lot more if it worked like that.
Hey, I am struggling to make this work using only 1 row in the matrixctrl. Example: 16 channels, 1 row. Any idea on how to do it?
Thanks xx
to do what exactly ?
to move content of matrixctrl object forward and backward, like in the patch by ROBIN PRICE but with a matrixctrl with only 1 row and 16 columns.
When I set matrixctrl to 1 row in the inspector, I get an error message in the Max console that says "matrixctrl: cell coordinate(s) out of range".
I'm not sure how to fix this. Any ideas on how to get it working?
you probably have wrong order of cell messages
Thank you for your response and help. However, I am not sure whether your patch has resolved the issue, as it appears to only move predetermined content within the matrixctrl. Basically I need to replicate the patch below, with the matrixctrl settings configured for 1 row and 16 channels without having error message.
you asked how to shift matrix cells in 1 x 16 matrixctrl.
patch I posted does that.
so there is no issue to resolve.
you posted patch with 12x16 matrixctrl with complicated
uzi -> getcolumn etc stuff
reduce it to what you need and don't query uneeded stuff.

This last example is perfect! I also managed to make the previous patch to work by changing the arguments of the counter to 0 0 0, however your latest version is way better and cleaner. Thank you so much.
Can you explain how to do this with a 16x16 matrix?
thank you! this is killer. had not used join and unjoin before