[jitter] Please help- two movies in 1 window
jasch
j at jasch.ch
Wed Jun 13 02:57:17 MDT 2007
- Previous message: [jitter] Please help- two movies in 1 window
- Next message: [jitter] Re: Please help- two movies in 1 window
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hello daniela, there are a number of problems with your patch, not the least being readability. you have all the basic elements in place, but obviously you are in the dark on how to use them. the matrix dstdim defines how the incoming matrix is mapped to the outgoing matrix. you change either the source-dimension if you want to zoom into (upscale) the incoming matrix or you use the destination- dimension to zoom out (downscale) the outgoing matrix. you need to use an alphablend process on both streams in order to apply the mask before compositing in the final matrix. you also need to clear the scaling matrix to clean up leftover pixels from previous frames. i cleaned up your patch and added pattr functionality to make initialisation and presets possible, see below. hth /*j > I am trying to use the dstdim with one matrix to have two movies > in one jit.window that are playing simultaneously. ( each movie is > inside a black circle, both are inside a big window) > > I am lost!! I am not sure how to work with my matrix and how to > control the dstdim attrributes in order to see the 2 movies in a > smaller dimention. #P window setfont "Sans Serif" 9.; #P window linecount 1; #P comment 93 448 205 196617 clear matrix befor drawing to erase traces; #P flonum 638 55 35 9 1. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 585 57 35 9 1 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P button 568 57 15 0; #P newex 568 75 66 196617 pack store 0; #P user ubumenu 718 57 77 196617 0 1 1 0; #X add read; #X add write; #X add storagewindow; #X add clientwindow; #X prefix_set 0 0 <none> 0; #X pattrmode 1; #P newex 568 97 67 196617 pattrstorage; #X client_rect 331 90 971 330; #X storage_rect 332 206 954 626; #P objectname u400000121; #P newex 638 97 53 196617 autopattr; #X prestore center_x[0] 1 0 0.; #X prestore center_x[1] 1 0 0.; #X prestore center_y[1] 1 0 0.; #X prestore center_y[2] 1 0 0.; #X prestore dimend_x[0] 1 0 238; #X prestore dimend_x[1] 1 0 358; #X prestore dimend_y[0] 1 0 175; #X prestore dimend_y[1] 1 0 240; #X prestore dimstart_x[0] 1 0 0; #X prestore dimstart_x[1] 1 0 13; #X prestore dimstart_y[0] 1 0 0; #X prestore dimstart_y[1] 1 0 44; #X prestore feather[0] 1 0 0.5; #X prestore feather[1] 1 0 0.5; #X prestore radius[0] 1 0 1.; #X prestore radius[1] 1 0 1.; #X prestore sobel.thresh[0] 1 0 -0.36; #P objectname u662000122; #P number 548 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimstart_y[1]; #P number 501 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimstart_x[1]; #P number 674 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimend_y[1]; #P number 627 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimend_x[1]; #P flonum 755 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname center_y[2]; #P flonum 716 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname center_x[1]; #P flonum 636 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname feather[1]; #P flonum 577 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname radius[1]; #P comment 515 445 205 196617 clear matrix befor drawing to erase traces; #P comment 113 565 95 196617 blend both streams; #P newex 42 445 46 196617 t l clear; #P newex 459 445 46 196617 t l clear; #P number 132 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimstart_y[0]; #P number 85 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimstart_x[0]; #P newex 65 490 123 196617 pak dstdimstart 0 0; #P newex 476 490 123 196617 pak dstdimstart 160 120; #P newex 459 537 70 196617 jit.alphablend; #P newex 606 490 115 196617 pak dstdimend 320 240; #P newex 459 514 194 196617 jit.matrix 4 char 320 240 @usedstdim 1; #P newex 576 250 27 196617 t b l; #P newex 576 314 85 196617 route jit_matrix; #P newex 576 333 91 196617 prepend out_name; #P newex 576 276 129 196617 jit.matrix 4 char 320 240; #P newex 695 222 81 196617 pak center 0. 0.; #P message 635 222 58 196617 feather \$1; #P newex 576 295 98 196617 js js_circlemask.js; #P message 576 222 53 196617 radius \$1; #P newex 459 326 22 196617 b 1; #P newex 459 360 53 196617 jit.pack; #P newex 459 301 66 196617 jit.unpack; #P message 1009 95 110 196617 /servo/1/position \$1; #P number 258 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimend_y[0]; #P number 211 470 44 9 0 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname dimend_x[0]; #P newex 191 490 115 196617 pak dstdimend 160 120; #P newex 42 514 194 196617 jit.matrix 4 char 320 240 @usedstdim 1; #P newex 42 411 54 196617 jit.brcosa; #P newex 1009 175 105 196617 scale 0 900 0. 1023.; #P user hslider 1009 223 18 128 900 1 0 0; #P newex 1009 271 93 196617 scale 0 900 0.2 3.; #P number 1009 249 35 9 0 900 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 1009 137 141 196617 osc-route /analogin/0/value; #P message 893 62 94 196617 /analogin/0/value; #B color 6; #P user dial 1009 50 40 40 1023 1 0 0 159 180 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0; #P newex 1009 116 41 196617 mc.usb; #P flonum 1009 296 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 59 393 72 196617 brightness \$1; #P toggle 893 22 15 0; #P newex 893 40 58 196617 metro 100; #P toggle 893 22 15 0; #P newex 893 40 58 196617 metro 100; #P user jit.pwindow 41 581 282 207 0 1 0 0 1 0; #P hidden newex 819 243 48 196617 loadbang; #P newex 117 251 27 196617 t b l; #P newex 42 326 22 196617 b 1; #P newex 42 360 53 196617 jit.pack; #P newex 117 313 85 196617 route jit_matrix; #P newex 117 332 91 196617 prepend out_name; #P newex 117 275 129 196617 jit.matrix 4 char 320 240; #P newex 42 299 66 196617 jit.unpack; #P flonum 295 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname center_y[1]; #P flonum 256 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname center_x[0]; #P newex 236 221 81 196617 pak center 0. 0.; #P flonum 176 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname feather[0]; #P message 176 221 58 196617 feather \$1; #P flonum 117 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname radius[0]; #P newex 42 561 70 196617 jit.alphablend; #P newex 117 294 98 196617 js js_circlemask.js; #P newex 210 123 48 196617 loadbang; #P message 117 221 53 196617 radius \$1; #P message 210 143 80 196617 read dozer.mov; #P user jit.fpsgui 73 93 60 196617 0; #P message 105 143 30 196617 read; #P message 175 143 29 196617 stop; #P message 141 143 33 196617 start; #P flonum 76 40 35 9 0.5 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P toggle 42 40 15 0; #P newex 42 58 51 196617 qmetro 2; #P newex 42 164 105 196617 jit.qt.movie 320 240; #P flonum 484 198 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P objectname sobel.thresh[0]; #P message 485 216 54 196617 thresh \$1; #P newex 459 237 47 196617 jit.sobel; #P message 473 143 30 196617 read; #P newex 459 164 63 196617 jit.qt.movie; #P comment 532 539 176 196617 apply alpha channel to second stream; #P comment 118 60 219 196617 use only ONE metro to keep everything in sync; #B frgb 255 255 255; #P user panel 76 469 237 18; #X brgb 255 127 0; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 495 469 237 18; #X brgb 255 127 0; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 112 197 237 18; #X brgb 255 127 0; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 568 197 237 18; #X brgb 255 127 0; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 475 197 80 18; #X brgb 255 127 0; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P comment 601 119 157 196617 store variable-values with pattr; #P comment 648 71 36 196617 recall; #P user panel 564 51 238 88; #X brgb 255 127 0; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 115 57 225 18; #X brgb 191 0 0; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P hidden fasten 42 0 36 0 824 270 122 270; #P hidden fasten 42 0 71 0 824 270 581 270; #P connect 18 0 17 0; #P fasten 17 0 16 0 47 108 47 108; #P fasten 22 0 16 0 110 161 47 161; #P fasten 24 0 16 0 215 161 47 161; #P fasten 20 0 16 0 146 161 47 161; #P fasten 21 0 16 0 180 161 47 161; #P connect 16 0 35 0; #P connect 35 0 40 0; #P connect 40 0 39 0; #P fasten 37 0 39 0 122 356 47 356; #P connect 39 0 58 0; #P connect 48 0 58 0; #P connect 58 0 83 0; #P fasten 79 0 59 0 70 510 47 510; #P fasten 83 1 59 0 83 464 47 464; #P connect 83 0 59 0; #P fasten 60 0 59 0 196 510 47 510; #P fasten 59 0 28 0 47 553 47 553; #P connect 28 0 43 0; #P connect 35 1 39 1; #P fasten 49 0 48 0 1014 389 64 389; #P lcolor 6; #P fasten 35 2 39 2 75 324 75 324; #P connect 17 0 23 0; #P connect 19 0 17 1; #P connect 35 3 39 3; #P fasten 77 0 28 1 464 556 107 556; #P fasten 80 0 79 1 90 487 126 487; #P connect 29 0 25 0; #P fasten 25 0 41 0 122 243 122 243; #P fasten 30 0 41 0 181 243 122 243; #P fasten 32 0 41 0 241 245 122 245; #P connect 41 0 36 0; #P connect 36 0 27 0; #P connect 41 1 27 0; #P connect 27 0 38 0; #P connect 38 0 37 0; #P fasten 81 0 79 2 137 487 182 487; #P connect 26 0 24 0; #P connect 31 0 30 0; #P fasten 61 0 60 1 216 487 248 487; #P fasten 62 0 60 2 263 487 300 487; #P connect 33 0 32 1; #P connect 34 0 32 2; #P fasten 17 0 11 0 47 82 464 82; #P fasten 12 0 11 0 478 161 464 161; #P connect 11 0 13 0; #P connect 14 0 13 0; #P connect 13 0 64 0; #P connect 64 0 66 0; #P connect 66 0 65 0; #P fasten 72 0 65 0 581 356 464 356; #P connect 65 0 82 0; #P fasten 76 0 75 0 611 510 464 510; #P fasten 82 1 75 0 500 464 464 464; #P fasten 82 0 75 0 464 489 464 489; #P fasten 78 0 75 0 481 510 464 510; #P connect 75 0 77 0; #P connect 64 1 65 1; #P connect 15 0 14 0; #P connect 64 2 65 2; #P connect 64 3 65 3; #P fasten 92 0 78 1 506 487 537 487; #P connect 98 0 97 0; #P connect 97 0 95 0; #P fasten 100 0 95 0 643 94 573 94; #P fasten 96 1 95 0 756 94 573 94; #P fasten 93 0 78 2 553 487 593 487; #P connect 86 0 67 0; #P fasten 70 0 74 0 700 246 581 246; #P fasten 69 0 74 0 640 244 581 244; #P fasten 67 0 74 0 581 244 581 244; #P connect 74 0 71 0; #P connect 74 1 68 0; #P connect 71 0 68 0; #P connect 68 0 73 0; #P connect 73 0 72 0; #P connect 99 0 97 1; #P fasten 90 0 76 1 632 487 663 487; #P connect 87 0 69 0; #P fasten 91 0 76 2 679 487 715 487; #P connect 88 0 70 1; #P connect 89 0 70 2; #P connect 47 0 46 0; #P connect 45 0 44 0; #P connect 46 0 52 0; #P fasten 57 0 51 0 1014 199 998 199 998 42 1014 42; #P connect 51 0 63 0; #P connect 52 0 50 0; #P connect 63 0 50 0; #P connect 50 0 53 0; #P connect 53 0 57 0; #P connect 57 0 56 0; #P connect 56 0 54 0; #P connect 54 0 55 0; #P connect 55 0 49 0; #P window clipboard copycount 102;
- Previous message: [jitter] Please help- two movies in 1 window
- Next message: [jitter] Re: Please help- two movies in 1 window
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
