Lemur Switches to Matrixctrl

Phijel's icon

Hello all

this is a small patch i wrote to convert switches info from a lemur to a max matrixctrl object.

The switch object is a grid of button sending a list of 0 and 1 values, corresponding to the state of each button. (4 x 4 switches = array of 16 numbers etc...)

The 2 arguments of my object are the dimensions of the switch array (x and y)

For some reason, it's working fine up to 9 x 9 switches, but gives a list formatting error when you reach 10 x 10 switch.

I can't figure why.

Any ideas would be welcome !

Thanks in advance.

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

pdelges's icon
Phijel's icon

Hi, thanks for your reply

Unfortunately your abstraction doesn't seem to work either ;-)

Somebody on JM forum suggested it could be a limitation of the zl group object (max 300 value at once ?), but i can't find any mention of this in the manuals...

I'll try another approach then...

Ph

Phijel's icon
user7777's icon

Hello, I'm having trouble with this same issue.

Lemur 'Switches' output a list of on/off values the length being the number of switches.
A 2x2 switch matrix with only the first switch 'on' therefore outputs: 1 0 0 0. There is not differentiation between rows/cols.
I would like to use this list to turn on the corresponding buttons on a MatricCtrl object of the same size..

I have tried all manner of funneling and unpacking and repacking and attempts to modulo.
This is frustrating as I know it is simple and can imagine doing it very quickly in text code.

For the sake of conversation, posting one iteration below - *this doesn't work and is not how to accomplish what I want* - (and it may seem crazed!).

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

Nat's icon
Max Patch
Copy patch and select New From Clipboard in Max.

This is a strange way to do it but I think it does what you need:

Nat's icon

Edit:
Here's a better version without the cellbock:

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

Nat's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Haha another version with even less objects:

Wetterberg's icon

hehe, I like using Jitter for this. Brave!

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

Here's a "normal" way of doing it. This can easily be abstracted by the way, so you just specify the size of the matrix you're filling.

Nat's icon

Wetterberg: Ah that's better indeed, I've been doing way too much Jitter lately :P

Wetterberg's icon

There is no such thing as too much Jitter!!! :-D

user7777's icon

Thanks, Guys! Will give 'em all a shot.
Have a good night, day and the rest.

Wetterberg's icon

As an aside, do note that if you're building a sequencer, then matrixctl isn't really ideal, at least in my opinion.

Slicing the list up (with zl slice 16, for instance) and feeding it to live.step in mode 4 is what I'm building in right now, it's really powerful.