Help me replace matrixctl with live.grid?
When I was starting my latest patch I couldn’t figure out how to configure a live.grid the way I wanted and ended up using a matrixctl. Now I’ve sussed the matrix mode of live.grid and want to go back to that but my patcher is using the matrixctl approach of sending out changes e.g. (row col sel) -> (1 1 0) rather than the live.grid approach of sending out the entire configured matrix on each change.
Does anyone know how to get live.grid to be compatible with matrixctl and send messages for each cell change?
hope this helps
(in case you dont know, copy the code below. go to max -> file -> new from clipboard.)
----------begin_max5_patcher---------- 1157.3oc0Y0sahqCD9ZVo8cvaTu6PYicBAxd244nBUYRLfOahMx1gROqNu6G ameZBj.oTZfppFCy3L9ye1yLdL+46eajyR9dhzA7KvSfQi9iVxHqLijQkBF4 jh2Gkfk1N5rJgyxRcFWnimoRHJ0qaI4lwnGqbFCbVhYqc.KJ63VrJZCks9YA IRk2Wu.2ItiAnv.SiGx7DNeh6auzJNSIo+q01PSmKjqQ.koGWKjfkRowVDxW 9OO564T2FLbp0FN+sfhSbpYlb7asCxJ8+992Ls5lw8lSh3ooDlpxtJxd6TTO oi9MPsg.XjW.6vIYDIXoUFeMYihHbNA8.mZYDu7FXvzOJ+rRrdYgoMlxs5Ar tMqwhdg8gEMy1HdBWbda2jvcu9D9S+3QvrE.JaGQnj.Wf9qZxV+3QfFLKIQ3 LIwtjjvegH.B9K.9JPJVIn6iThD.UBlo6Yl53dkP2QlrVPiMcRaNJCDg0l6U dlnvDfMXodsx7FRibPZlTALioAZvfEZFAkq0J.s.fYw.IGvYSlLoZFkPYjHd FyNs7NwtDen06AMCk6K4YZ7gC4tj4e01krhJLKJrJ2SuRmyS5OFlSwHeKhgy Fd+wYe0X5+ROaq75zb.MMK8HOIcWzpN1Mz8TqF9t4IMxSgL6FrXDbmtXny0n wWqqEcm1lZhzbxj0n5DtNY8zKhuQswj9u+j0v6M5I3yidf2CziIw5GmeJRSc c4G2gjeRIRIdM4XBRRTQjjDvCPvCHvCdcSV8yQKOaybX9g+tJLEJ7dXmjMqK Df.eXJJ+jwggWXreu1nnYCIE0YdScJirTF3m1Sd9y7SmbxCmfbma8u7sMPW+ AOeHx+NMe3UrhUeW2Zr7UshUDZHqX8SnJ9OCNw8qJmf9z3D37gjS5JFdQsSt l+N8oBF2noWrVdAVWbX8VYsf2Oq4cwrVU0MUVdGVTMlGqMOZu8cm2cJwws7e e3S+hBVKtGISyaul4lHZLt4kfkxiIM3xsXgF+Jh3YBCuLooxXpYPoblMPcuO NBzqClOnTrDuiD+LVogzxLE4sOIKn+R92vv5Tj7UkxqTTG5T1JtczKG2FZ4h Xhn9Lng1LFMGbs+xxsDRbBMsy2WpHakcpkreKmQxusG3jtAf50Bpu0tjp2EZ 0hlMoiNPyWiZWc4tMuwsRdTk1Yo15e6yyMbgp685GXxcTI8fcSMALO9byILi wUXytumqF1VGMc3808DXlg8jLUBk8ais5dE0XhBmH2B0EgRd6CW05OhRHXwk dhZzT6sH5Wu50qSMGPzfVcV0EH0MSjPk17Q119D.M38D+7rohB5YR57wvdQv G9SzXgpQwATgjmIhJmlk+LHfZnMlHUTFtLT8SucAC060FZbLoYr7TZ7VtNAd AR.K5dEp2fyT294A2gSggBb98AblpEuAfybFvdrr5eaXNXuYN3fCNTu1yc3N ygBbg8AbvaiCwga06XYM71.NTu2ygFdu0flCaGfCcaBkDzzOrCv4d6.24cHl eS.W+vVvsg35k+v6FanfolSFNMz7zCEV9kivrQft4+kLd.6F -----------end_max5_patcher-----------
I’m very grateful to for you trying to help me, thank you. Unfortunately I’ve just realised how my request could be misinterpreted.
In my device I am using a matrixctl to manage connections among other objects. I ended up using it because I thought I couldn’t get live.grid to do what I want.
Now I’ve learned enough about live.grid and want to replace the matrixctl I am using with a live.grid.
The problem is that matrixctl sends out a message for each cell change as a tuple (row,col,state) whereas live.grid – so far as I can see – will only send out a list of all cells switched on as [(row,col),(row,col),(row,col),....].
The rest of my device has been designed around the matrixctl approach and is expecting single cell changes. I’m flinching at the prospect of having to re-engineer the device to work with live.grid.
To do this I am probably going to have to create something that remembers the state of the live.grid and compares it’s output with previous states in order to generate single cell messages but I see complications ahead.
So I am hoping that maybe I have missed a way to make live.grid emit single cell state change messages like matrixctl. Or that someone might have already gone down this road and made an adapter.
If live.grid in matrix mode really isn’t drop-in-compatible with matrixctl then I’m pretty ticked off the Ableton/C’74 for the inconsistency.
Anyway thanks again for your help and if you have any further advice I’d be grateful.
I’ve written an email to C’74 support to ask them why:
live.grid (in matrix mode) has a different output system to matrixctl
live.grid uses 1-based addressing instead of 0-based addressing throwing out any notion of consistency
live.grid uses (1,1) as bottom left while matrixctl uses (0,) as top-left so they are not address compatible
It’s hard to believe this sort of inconsistency could be the product of chance alone. This kind of work requires a devious mind.
i can guess what support’s answer will be:
live.grid states within the help file that it is a UI grid of ‘steps’ and it is ‘designed for use with the chucker~ object’
whereas matrixctrl is more open-ended(does not readily confine itself to specific step/direction/transposition style use but is rather a simple matrix of switches(or dials))
they don’t work readily within the same message protocol because they are meant to do completely different things, otherwise, you wouldn’t need one or the other included in Max.
if you’re unable to reverse coffeencigs patch to get live.grid to change matrixctrl, then you can try to learn more about the [zl] object to help you process the lists coming from live.grid…
otherwise, you should really post your patch so far so we know exactly what you’re trying to do…
hope that helps.
Yeah I guess so.
It just seems like when you put the live.grid into matrix mode it would have made a lot of sense to make it compatible with the matrixctl object.
I think I can figure out an adapter to make it compatible, I just hoping I wouldn’t have to. Or I suppose I can re-engineer the rest of the patch state to take complete updates rather than individual cell updates. That’s probably the better long-term option but more work now.
Thanks anyway guys.
I’ve built an adapter that takes the output from a live.grid (in matrix mode) and makes it suitable for patches that were, previously, expecting the output from a matrixctl.
It’s not really generic enough to just "drop in" into any other patch as I made some choices about interpreting the output specific to my situation (the size of my matrix being the principal one), but it should be pretty easy to re-use.
There were two obvious approaches to this problem one of which would have kept the matrixctl behaviour of a single message (col,row,state) for each cell change, and another that involves resetting the entire matrix on each cell change.
The former would have involved redundantly maintaining state inside the patch. Since I didn’t expect performance to be an issue I went for the simpler approach which outputs the entire state of the matrix, as a series of messages, on each cell change.
Any comments on my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