matrix sequenced from same and different "jit.matrix". works forward and backward

benjamin vyger's icon

Hi all,

I wish you a happy new year ahead ;)
I would like to move each letter (of a jit.matrix) of a word as a sequence

Let's have 5 letters in 5 different cells.

The letters M O R P H are respectively in cell 0 0, 1 0, 2 0, 3 0, 4 0

I would like to route data (letter M) from cell 0 0 --> to 0 0, then 0 1, then 0 2, then 0 3, then 0 4

Then from cell 1 0 (letter 0), send the data --> to 0 0, then 0 1, then 0 2, then 0 3, then 0 4

The same process until cell 4 0 (letter H) sends data --> to 0 0, then 0 1, then 0 2, then 0 3, then 0 4

Between each routing we must disconnect the previous route

So at the end we will have 25 movements.

I did something with [route 5 5] but is a too boring method I think.

In my patch I made the routing with letter M and O.
I found this object [ mc.gate~] but it works with audio signal, not video signal.

Thank you very much for helping.


Pedro Santos's icon

Idon't see any jit.matrix in your example.
Can you select all, Edit/"copy compressed" and paste here your patch?
And I agree, that is a "too boring method"!

benjamin vyger's icon

Hi Pedros.

I made this patch

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

Imagine the top three rectangles as 'M' 'O' 'R'. Thanks ;)

TFL's icon

First, there is some inconsistencies in your request. In your first post, you are talking about one letter per cell, then we discover that one letter is in fact a 8x16 matrix. Then, in your example patcher, why do you send the main bang to [toggle] connected to the [jit.matrix]? What's the meaning of this? Then, keep in mind that the first argument of [jit.matrix] is the number of planes (if it's an int) or the matrix name (if it's a symbol). Here, you are using ints as the first argument, so your first matrix will have 3 planes, the second one 2, and the last one only 1 (that's why it's in blanck and white). However, you can't simply glue matrices with different number of planes.

Here is a possible solution. Using [funnel] to tag the matrices with an index, [counter] to increment that index, [% 3] to stay in the 0-2 range, [spray] to send the matrices in the new order, and [buddy] to synchronize the outputs of [spray].

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

benjamin vyger's icon

Hi TFL.
Thanks for helping
You method seems very good.
Actually I work with matrix 3 char 8 8 and the way to sequence letter are M -> M -> M -> M ->M, then O->O ->O->O ->O without changing the previous letter.
At the end I will have 5 letters, that's why in my patch nothing move for a moment but you can see, the movement with circles trigged with the message dump
I made my patch with two 'letter' and your patch with three 'letter'.
I hope It will be easier to understand.

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

Thanks again 8)

benjamin vyger's icon

Hi TFL,

It almost works nows but I have a sequencing offset by playing with [route] and with your method.

I hope you'll see something easily.

[buddy] is not useful now but I keep for the moment.

Your method is great because we can sequencing matrix forward and backward, so I haven't have to ask to you this feature anymore ;)

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

TFL's icon

Your request is unclear.

You only have 3 matrices getting out of your [funnel 3], so the [spray 5] will only receive these 3 matrices and send them through 3 of its outputs. That's why you get only 3 updates matrices at once, and that's why [buddy 5] doesn't work as expected anymore.

benjamin vyger's icon

Hi.

It works now but I think my method could be more elegant.

[buddy 5] is useless now (I think)

Could you share any idea to perform sequencing?

Thank for what you have ever done ;)

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

Hi again. I understand the logic you're having but I'm not sure of the end goal you're trying to accomplish. Is this it?

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

Hi Pedros,

No it isn't the goal but I think I will use your patch for my project if I can letter easily ;)

For my project, you have to imagine letters M O R P H inside 5 "square-screen" inside.

In the first square, letter M ,.., the fifth, letter H.

I would like to distribute 5 times the letter M to 5 others screens, [jit.matrix] like that

M

. M

. . M

. . . M

. . . . M

then letter O

O

. O

. . ...

.........................O

then letter R until H

If I should have to speak in pseudo code, I would say:

sequence first letter to 5 differents screens from left one to right one. then Do it for letter two. Do it until letter five

in this patch there the good sequencing

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

Pedro Santos's icon

So, just to be sure, at the same time:

Screen1: MORPH

Screen2: ORPHM

Screen3: RPHMO

Screen4: PHMOR

Screen5:HMORP

And they rotate the information periodically, right?

The letters are to be drawn on the screen.

The "screens" are physically different monitors or video projectors?

benjamin vyger's icon

Hi Pedros.

My patch works, the sequence appears as I want.

I wonder if I can make the patch more elegantly.

I want one letter in one screen.

At first trig letter M appears to the screen 1 and there is nothing in the others screens.

At the second trig letter M appears to the second screen. And there is still the letter M in first screen

first trig

M . . . .

second trig

M M . . .

fifth trig

M M M M M

sixth trig

O M M M M

seventh trig

O O M M M

twelfth

R O O O O

twenty sixth trig, it comes back at the beginning

M M M M M

twenty seventh.

O M M M M

The 5 differents colors in the patch called " ONE letter from One screen sequenced to 5 screen" are the 5 different letters

Letters go out one by one to one different screen.

here the last letter that appears is the letter P to the screen 4.

the sequence that occurs is

P P P P R

the next sequence will be

P P P P P

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

Sébastien Gay's icon
My patch works, the sequence appears as I want

But there is no letter appearing in any of the patches you posted ? That's a bit like "an elephant in the living room", here ;-)

benjamin vyger's icon

Hi Sébastien.

Indeed, because I cannot easily represent a letter on a jit.matrix.

As we can see in the first screenshot of my previous post, each colored screen represents a different letter that we have to imagine.

red color is M green color is O.....

In my patch if we see Yellow Yellow Yellow Yellow Blue, it means P P P P R.

The next sequence will be the change of the fifth screen. from blue it will change to yellow. therefore R will become P.

Bonné année au fête ;)

Pedro Santos's icon
Indeed, because I cannot easily represent a letter on a jit.matrix.

Then, why are you doing it? Is there a specific reason you're trying to represent and process the information in matrix form?

If I'm understanding correctly, we could simply do it rotating a list, and distributing the first five elements to five jit.gl.text objects, each drawing on a particular window. The windows could be positioned on each different screen in fullscreen.

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

Hi.

Thank for your help!

This is exactly what I want but I need to distribute the data from 5 different matrices.

Actually I'm getting data from 5 different screens. One screen is [jit.matrix 3 char 8 8].

In each of these 5 screens, I have a letter. In my patch I only did one color, but actually in the real patch I have a letter instead of a color.

In other words, in the first jit.matrix I have M, the second O, ...., the fifth H

[M] [O] [R] [P] [H]. These are the 5 screens. In other words the 5 jit.matrix with a different letter

I need to distribute these 5 screens to 5 different screens like this

trig 1 [ M ] [ ] [ ] [ ] [ ]

trig 2 [ M ] [ M ] [ ] [ ] [ ]

...

trig 6 [ O ] [ M ] [ M ] [ M ] [ M ]

trig 8 [ O ] [ O ] [ O ] [ M ] [ M ]

Pedro Santos's icon

Hi. I've changed the code to include matrices as inputs.

The jit.movies above are the jit.matrix equivalents. This should get you in the right direction.

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