Forums > Jitter

2 matrices output in 1 window ?



jin
September 10, 2007 | 1:13 pm

Hello.

How can I have 2 matrices output (or several matrices’)
side by side in a window at the same time?
Is it possible?

I can only see 1 matrix output at a time
in the patch below.

max v2;
#N vpatcher 51 366 640 737;
#P user jit.pwindow 454 271 82 62 0 1 0 0 1 0;
#P user jit.pwindow 141 144 82 62 0 1 0 0 1 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 142 112 394 196617 jit.matrix d 4 char 640 240 @usedstdim 1 @dstdimstart 320 0 @dstdimend 640 240;
#P user jit.pwindow 23 269 82 62 0 1 0 0 1 0;
#P newex 24 240 382 196617 jit.matrix c 4 char 640 240 @usedstdim 1 @dstdimstart 0 0 @dstdimend 320 240;
#P message 125 49 30 196617 read;
#P message 89 49 30 196617 read;
#P newex 142 84 105 196617 jit.qt.movie 320 240;
#P newex 24 84 105 196617 jit.qt.movie 320 240;
#P toggle 24 27 15 0;
#P newex 24 49 57 196617 qmetro 20;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P fasten 4 0 2 0 94 74 29 74;
#P connect 2 0 6 0;
#P connect 6 0 7 0;
#P fasten 0 0 3 0 29 75 147 75;
#P fasten 5 0 3 0 130 74 147 74;
#P connect 3 0 8 0;
#P connect 8 0 9 0;
#P fasten 8 0 10 0 147 134 460 134;
#P fasten 6 0 10 0 29 264 460 264;
#P pop;

September 10, 2007 | 1:50 pm

Hello!

I used jit.glue with two columns…

#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P newex 537 252 131 9109518 jit.glue @columns 2;
#P user jit.pwindow 514 331 255 190 0 1 0 0 1 0;
#P user jit.pwindow 201 204 82 62 0 1 0 0 1 0;
#P window setfont "Sans Serif" 9.;
#P newex 202 172 293 9109513 jit.matrix d 4 char 640 240 @dstdimstart 320 0 @dstdimend 640 240;
#P user jit.pwindow 83 329 82 62 0 1 0 0 1 0;
#P newex 84 300 283 9109513 jit.matrix c 4 char 640 240 @dstdimstart 0 0 @dstdimend 320 240;
#P message 185 109 30 9109513 read;
#P message 149 109 30 9109513 read;
#P newex 202 144 105 9109513 jit.qt.movie 320 240;
#P newex 84 144 105 9109513 jit.qt.movie 320 240;
#P toggle 84 87 15 0;
#P newex 84 109 57 9109513 qmetro 20;
#P connect 6 0 7 0;
#P connect 6 0 11 0;
#P connect 2 0 6 0;
#P connect 8 0 9 0;
#P connect 8 0 11 1;
#P connect 3 0 8 0;
#P connect 11 0 10 0;
#P fasten 5 0 3 0 190 134 207 134;
#P connect 0 0 2 0;
#P fasten 0 0 3 0 89 135 207 135;
#P fasten 4 0 2 0 154 134 89 134;
#P connect 1 0 0 0;
#P window clipboard copycount 12;

is this what you need?
Greetings from Paris!
Johannes


jin
September 15, 2007 | 11:33 am

Cool.
That’s it.

thank you so much
jin


jin
September 15, 2007 | 6:10 pm

OK
It’s not exactly what I want.
Sorry, Johannes but it helped me.

I want one matrix is kinda floating on the other(s).
Like, let’s say, I have big square output from one
matrix and I want to have a smaller square output from the other matrix in the middle of big one.


jin
September 15, 2007 | 6:17 pm

Please see the pic below. not the one above.

September 15, 2007 | 6:48 pm

Here are 3 ways to do it. jit.glue is probably the slowest. Using
named matrices is a bit faster. The 3rd way using jit.gl.videoplane
will be the fastest and highest quality.

wes

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 485 505 151 196617 method3 – opengl videoplanes;
#P newex 476 581 351 196617 jit.gl.videoplane test @transform_reset 2
@scale 0.5 1 1 @position 0.5 0 0;
#P newex 374 537 356 196617 jit.gl.videoplane test @transform_reset 2
@scale 0.5 1 1 @position -0.5 0 0;
#P message 177 474 34 196617 reset;
#P newex 177 494 186 196617 jit.gl.handle test @inherit_transform 1;
#P newex 42 494 48 196617 r render;
#P toggle 157 465 15 0;
#N vpatcher 53 128 279 297;
#P inlet 106 30 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 43 95 47 196617 gate 1 1;
#P newex 42 116 41 196617 s draw;
#P window linecount 1;
#P newex 17 52 58 196617 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 4 0 3 0;
#P fasten 5 0 4 0 111 88 48 88;
#P fasten 2 1 4 1 46 83 85 83;
#P lcolor 15;
#P pop;
#P newobj 95 494 42 196617 p Draw;
#P toggle 233 433 15 0;
#P message 233 453 68 196617 fullscreen $1;
#N vpatcher 30 89 166 253;
#P window setfont "Sans Serif" 9.;
#P newex 50 71 35 196617 sel 27;
#P newex 50 50 40 196617 key;
#P outlet 50 93 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 250 433 33 196617 p Esc;
#P newex 233 471 222 196617 jit.window test @depthbuffer 1 @size 640 240;
#P toggle 95 446 15 0;
#P newex 95 465 57 196617 qmetro 30;
#P newex 95 521 187 196617 jit.gl.render test @erase_color 0 0 0 1;
#P newex 651 221 98 196617 jit.glue @columns 2;
#P user jit.pwindow 650 267 242 92 0 1 0 0 1 0;
#P comment 702 249 151 196617 method2 – jit.glue;
#P newex 202 202 394 196617 jit.matrix d 4 char 640 240 @usedstdim 1
@dstdimstart 320 0 @dstdimend 640 240;
#P user jit.pwindow 83 273 242 92 0 1 0 0 1 0;
#P newex 84 230 382 196617 jit.matrix d 4 char 640 240 @usedstdim 1
@dstdimstart 0 0 @dstdimend 320 240;
#P message 241 69 83 196617 read dishes.mov;
#P message 155 69 80 196617 read dozer.mov;
#P newex 202 144 105 196617 jit.qt.movie 320 240;
#P newex 84 144 105 196617 jit.qt.movie 320 240;
#P toggle 84 87 15 0;
#P newex 84 109 57 196617 qmetro 20;
#P comment 143 255 151 196617 method1 – named matrices;
#P connect 4 0 9 0;
#P connect 4 0 26 0;
#P fasten 4 0 12 1 207 184 744 184;
#P connect 3 0 7 0;
#P connect 3 0 25 0;
#P fasten 3 0 12 0 89 191 656 191;
#P connect 18 0 16 0;
#P connect 19 0 18 0;
#P connect 17 0 19 0;
#P connect 24 0 23 0;
#P fasten 21 0 20 1 162 487 132 487;
#P fasten 22 0 13 0 47 516 100 516;
#P connect 20 0 13 0;
#P fasten 23 0 13 0 182 516 100 516;
#P connect 14 0 20 0;
#P connect 15 0 14 0;
#P connect 12 0 11 0;
#P connect 7 0 8 0;
#P fasten 6 0 4 0 246 134 207 134;
#P connect 1 0 3 0;
#P fasten 1 0 4 0 89 135 207 135;
#P fasten 5 0 3 0 160 134 89 134;
#P connect 2 0 1 0;
#P window clipboard copycount 28;


jin
September 16, 2007 | 5:31 pm

Thank you Wes.
Named matrix is cool.

However, what I want is I want one matrix is kinda floating
on the other(s) in a window.
Pls, look at the pic that I attached

Thanks

September 16, 2007 | 6:00 pm

the jit.videoplane method is exactly what you need.
just play with scale and positioning of the two videoplanes to get the proper arrangement.


jin
September 19, 2007 | 10:38 am

OK videoplane is the one I’m looking for.
Thanks guys..

However, what does ‘transform_reset 2′ do in wes’ patch?
and also why do we need ‘p Draw’?

Even though I can control the layer’s order of movies using ‘depth_enable’, I still don’t understand how jitter decide the order.

I also find interesting thing.
If I do the ‘full screen’ in the patch below, the order gets
reversed.
If I move the window to 2nd monitor, it gets also reversed.
Is this natural or am I doing some thing stupid?

Thanks
Jin

#P origin 83 0;
#P toggle 278 38 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 278 61 81 196617 depth_enable $1;
#P flonum 640 215 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 602 215 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 562 215 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 534 239 95 196617 pak position 0. 0. 0.;
#P flonum 271 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 220 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 180 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 152 274 95 196617 pak position 0. 0. 0.;
#P flonum 516 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 478 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 438 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 412 244 85 196617 pak scale 1. 1. 1.;
#P flonum 135 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 97 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 57 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 33 277 85 196617 pak scale 1. 1. 1.;
#P newex 412 308 351 196617 jit.gl.videoplane test @transform_reset 2 @scale 0.5 1 1 @position 0.5 0 0;
#P newex 33 312 356 196617 jit.gl.videoplane test @transform_reset 2 @scale 0.5 1 1 @position -0.5 0 0;
#P message 434 385 34 196617 reset;
#P newex 434 405 186 196617 jit.gl.handle test @inherit_transform 1;
#P newex 299 405 48 196617 r render;
#P toggle 414 376 15 0;
#N vpatcher 53 128 279 297;
#P inlet 106 30 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 43 95 47 196617 gate 1 1;
#P newex 42 116 41 196617 s draw;
#P window linecount 1;
#P newex 17 52 58 196617 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 4 0 3 0;
#P fasten 5 0 4 0 111 88 48 88;
#P fasten 2 1 4 1 46 83 85 83;
#P lcolor 15;
#P pop;
#P newobj 352 405 42 196617 p Draw;
#P toggle 30 386 15 0;
#P message 30 406 68 196617 fullscreen $1;
#N vpatcher 30 89 166 253;
#P window setfont "Sans Serif" 9.;
#P newex 50 71 35 196617 sel 27;
#P newex 50 50 40 196617 key;
#P outlet 50 93 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 47 386 33 196617 p Esc;
#P newex 30 424 222 196617 jit.window test @depthbuffer 1 @size 320 240;
#P toggle 352 357 15 0;
#P newex 352 376 57 196617 qmetro 30;
#P newex 352 432 187 196617 jit.gl.render test @erase_color 0 0 0 1;
#P message 436 166 83 196617 read dishes.mov;
#P message 98 165 80 196617 read dozer.mov;
#P newex 412 195 105 196617 jit.qt.movie 320 240;
#P newex 33 215 105 196617 jit.qt.movie 320 240;
#P toggle 33 87 15 0;
#P newex 33 109 57 196617 qmetro 20;
#P connect 10 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 9 0;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P connect 4 0 2 0;
#P connect 36 0 18 0;
#P connect 2 0 18 0;
#P connect 20 0 18 0;
#P connect 28 0 18 0;
#P connect 21 0 20 1;
#P fasten 22 0 20 2 102 271 88 271;
#P fasten 23 0 20 3 140 271 113 271;
#P connect 29 0 28 1;
#P fasten 30 0 28 2 225 269 213 269;
#P fasten 31 0 28 3 276 270 241 270;
#P connect 37 0 36 0;
#P connect 8 0 7 0;
#P connect 7 0 13 0;
#P fasten 15 0 6 0 304 427 357 427;
#P connect 13 0 6 0;
#P fasten 16 0 6 0 439 427 357 427;
#P fasten 14 0 13 1 419 398 389 398;
#P fasten 0 0 3 0 38 135 417 135;
#P connect 5 0 3 0;
#P connect 36 0 19 0;
#P connect 3 0 19 0;
#P connect 24 0 19 0;
#P connect 32 0 19 0;
#P connect 17 0 16 0;
#P connect 25 0 24 1;
#P fasten 26 0 24 2 483 238 467 238;
#P fasten 27 0 24 3 521 238 492 238;
#P connect 33 0 32 1;
#P fasten 34 0 32 2 607 234 595 234;
#P fasten 35 0 32 3 645 234 623 234;
#P pop;


jin
September 19, 2007 | 11:39 am

Quote: gummyboy@naver.com wrote on Wed, 19 September 2007 04:38
—————————————————-

> Even though I can control the layer’s order of movies using ‘depth_enable’, I still don’t understand how jitter decide the order.
>
> I also find interesting thing.
> If I do the ‘full screen’ in the patch below, the order gets
> reversed.
> If I move the window to 2nd monitor, it gets also reversed.
> Is this natural or am I doing some thing stupid?
>

—————————————————-

I solved above problem with ‘layer $1’….
Thank you

Viewing 10 posts - 1 through 10 (of 10 total)

Forums > Jitter