matrixctrl - swap rows and columns?

nk.s's icon

With the matrixctrl object, is there a way to swap the default order of rows and columns? When combined with a matrix~, the control object places the inputs on the columns, and outputs on the rows. However this is backwards from how typical audio controllers work (like Dante for example).

matrixctrl.maxpat
Max Patch

Peter Ostry's icon

I think the common, traditional notation of matrices has the source at the top and the target at the right side.

However, you want to exchange columns and rows. If you look at the data, you get 3-digit lists from matrixctl. 1st position is the column, 2nd position is the row, 3rd position is the value. You just have to pull the list apart, exchange the first two digits and combine all three to form the new list. There are various ways to do it. The attached patcher shows 3 examples.

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

message can easily reorder list items

Peter Ostry's icon

Oh my God ... how simple ...
I have to rework all my patches from the past 200 years :-)

nk.s's icon

Wow, so simple! Thank you!

Source Audio's icon

If I were to mod all patches I made that could be optimised in one or the other way
it would need another life.
What counts is that it works