How to swap Matrixctrl columns and rows?

Tommy Edwards's icon

Hi! I'm hoping to swap the columns with the rows on the Matrixctrl object, so that rows are inputs and columns are outputs instead of the default which is the opposite way.

I've managed to get half-way there by unpacking the cell addresses and then packing them with the column and row numbers swapped around, but when sending it to the Matrix~ object, it doesn't seem to turn any notes off when turning a cell off.

I was wondering if anyone had any ideas on how to make this method work or perhaps there's a better way to achieve it?

matrixcolumnrowswap.maxpat
Max Patch

Source Audio's icon

this is not doing what you think:
output is having 2 lists

simplest way :

Tommy Edwards's icon

That's perfect, thank you so much for your help!