Forums > Jitter

jit.xfade problem

April 7, 2006 | 10:42 am

Hi All,
New member and new user of Jitter – and enjoying it a lot.

I’m putting together a patch so that i can take in 100 frames of video, have 1 play in the right direction, the other in reverse and have them fade into each other as the final effect (this will be reflected into a light box kinda thing)

Anyway – i’m having problems with the xfade object; basically it look like whatever matrixset is going into the right inlet is not playing as a video when i apply a fade (it just displays the first frame of the video – or the last)

Any idea of what i’m doing wrong? or do u think it might be a mermory issue?

Thanks,
Jimmy

PATCH BELOW
————-
max v2;
#N vpatcher 114 44 1794 990;
#P origin 160 -3;
#P setbglock 1;
#P window setfont "Sans Serif" 9.;
#P newex 336 460 50 196617 jit.matrix @planemap 1 1 2 3;
#P newex 441 497 50 196617 jit.alphablend;
#P user jit.pwindow 606 604 322 242 0 1 0 0 1 0;
#P window setfont "Fixedwidth Serif" 10.;
#P flonum 1133 399 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 1133 424 83 1441802 brightness $1;
#P newex 1010 536 68 1441802 jit.brcosa;
#B color 5;
#P window setfont "Sans Serif" 9.;
#P message 1009 412 85 196617 set 0 , 1 5000 50;
#P newex 826 463 114 196617 jit.dimmap @invert 1 0;
#P message 263 154 50 196617 stop;
#P button 88 300 15 0;
#P button 53 300 15 0;
#P window setfont "Sans Serif" 12.;
#P message 271 240 33 196620 read;
#P message 680 458 54 196620 xfade $1;
#P flonum 912 355 35 12 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.pwindow 1147 593 322 242 0 1 0 0 1 0;
#P newex 647 491 49 196620 jit.xfade;
#P message 228 53 29 196620 $1;
#P message 265 54 15 196620 1;
#P hidden message 288 53 15 196620 0;
#P hidden message 1022 96 88 196620 matrixcount $1;
#P toggle 152 26 15 0;
#P window setfont "Sans Serif" 20.;
#P number 1051 47 63 20 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P newex 684 194 35 196620 sel 0;
#P newex 598 205 49 196620 sel 0;
#P button 654 112 15 0;
#P newex 590 287 74 196620 prepend set;
#P message 595 331 66 196620 index 58;
#P newex 684 286 74 196620 prepend set;
#P message 683 329 106 196620 outputmatrix 0;
#N counter 0 100;
#X flags 0 0;
#P newobj 704 143 108 196620 counter 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 595 168 83 196620 counter 0 100;
#P newex 594 242 86 196620 prepend index;
#P newex 681 240 124 196620 prepend outputmatrix;
#P user gswitch2 651 133 39 32 0 0;
#P newex 629 375 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 444 214 35 196620 sel 0;
#P newex 345 209 49 196620 sel 0;
#P message 34 150 36 196620 open;
#P user gswitch 15 357 41 32 0 0;
#P newex 91 166 58 196620 jit.qt.grab;
#P user gswitch 119 531 41 32 1 0;
#P user jit.pwindow 196 599 322 242 0 1 0 0 1 0;
#P newex 225 21 60 196620 loadbang;
#P button 422 109 15 0;
#P newex 349 286 74 196620 prepend set;
#P message 346 327 66 196620 index 0;
#P newex 454 287 74 196620 prepend set;
#P message 440 328 106 196620 outputmatrix 143;
#N counter 1 0 100;
#X flags 0 0;
#P newobj 433 169 93 196620 counter 1 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 344 169 83 196620 counter 0 100;
#P newex 345 248 86 196620 prepend index;
#P newex 442 249 124 196620 prepend outputmatrix;
#P user gswitch2 396 132 39 32 1 0;
#P user jit.pwindow 127 342 82 62 0 1 0 0 1 0;
#P newex 343 358 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 178 145 66 196620 jit.qt.movie;
#P newex 152 60 64 196620 qmetro 40;
#P user jit.fpsgui 62 701 60 9109516 0;
#P window setfont "Sans Serif" 20.;
#P comment 782 59 237 196628 buffer time (in frames);
#P user panel 330 104 232 247;
#X brgb 202 212 135;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 579 105 232 247;
#X brgb 207 174 174;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P fasten 21 0 22 1 96 235 35 235;
#P fasten 18 0 23 0 230 51 39 51;
#P fasten 19 0 3 0 202 755 396 755 396 693 67 693;
#P fasten 4 0 21 0 157 142 96 142;
#P fasten 23 0 21 0 39 174 72 174 72 142 96 142;
#P fasten 38 0 20 0 689 240 815 240 815 357 124 357;
#P fasten 25 0 20 0 449 239 559 239 559 340 124 340;
#P hidden connect 42 0 20 0;
#P fasten 22 0 7 0 20 412 133 412;
#P hidden connect 43 0 40 0;
#P hidden fasten 18 0 4 0 230 51 157 51;
#P connect 40 0 4 0;
#P connect 4 0 5 0;
#P connect 52 0 5 0;
#P connect 49 0 5 0;
#P connect 6 0 19 0;
#P hidden connect 18 0 44 0;
#P hidden connect 18 0 43 0;
#P hidden connect 18 0 42 0;
#P connect 6 0 60 0;
#P hidden fasten 41 0 6 0 1027 98 348 98;
#P connect 10 0 6 0;
#P fasten 9 0 6 0 447 325 348 325;
#P connect 21 0 6 0;
#P fasten 8 0 11 0 401 180 349 180;
#P connect 11 0 24 0;
#P connect 11 0 10 0;
#P connect 16 0 15 0;
#P connect 10 0 16 0;
#P hidden fasten 39 0 24 1 1056 91 389 91;
#P hidden connect 43 0 8 0;
#P connect 17 0 8 0;
#P hidden fasten 39 0 11 4 1056 91 421 91;
#P fasten 25 0 17 0 449 239 541 239 541 113 427 113;
#P fasten 24 0 17 0 350 243 336 243 336 113 427 113;
#P fasten 4 0 8 1 157 137 327 137 327 83 430 83;
#P fasten 8 1 12 0 430 180 438 180;
#P connect 14 0 13 0;
#P connect 60 0 59 0;
#P connect 12 0 9 0;
#P connect 12 0 25 0;
#P connect 9 0 14 0;
#P connect 26 0 59 1;
#P hidden fasten 39 0 12 4 1056 90 518 90;
#P connect 29 0 35 0;
#P connect 30 0 29 0;
#P fasten 27 0 30 0 656 179 600 179;
#P connect 35 0 34 0;
#P connect 30 0 37 0;
#P connect 59 0 58 0;
#P hidden fasten 28 0 26 0 686 324 634 324;
#P connect 29 0 26 0;
#P hidden fasten 41 0 26 0 1027 91 634 91;
#P connect 21 0 26 0;
#P hidden fasten 39 0 37 1 1056 92 642 92;
#P connect 6 0 45 0;
#P connect 48 0 45 0;
#P connect 36 0 27 0;
#P fasten 38 0 36 0 689 240 792 240 792 112 659 112;
#P fasten 37 0 36 0 603 242 587 242 587 112 659 112;
#P connect 43 0 36 0;
#P hidden fasten 39 0 30 4 1056 92 672 92;
#P fasten 4 0 27 1 157 137 327 137 327 51 685 51;
#P fasten 47 0 48 0 917 415 685 415;
#P connect 31 0 28 0;
#P connect 33 0 32 0;
#P connect 31 0 38 0;
#P connect 28 0 33 0;
#P connect 26 0 45 1;
#P fasten 27 1 31 0 685 179 709 179;
#P hidden fasten 39 0 31 4 1056 92 805 92;
#P fasten 56 0 55 0 1138 451 1015 451;
#P hidden connect 39 0 41 0;
#P hidden connect 44 0 39 0;
#P connect 57 0 56 0;
#P connect 26 0 46 0;
#P pop;


April 7, 2006 | 11:00 am

sorry – patch updated – i was trying something else out when i saved the last one – this is the one with the problem – thanks

max v2;
#N vpatcher 114 44 1794 990;
#P origin 160 -3;
#P setbglock 1;
#P user jit.pwindow 606 604 322 242 0 1 0 0 1 0;
#P window setfont "Fixedwidth Serif" 10.;
#P flonum 1133 399 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 1133 424 83 1441802 brightness $1;
#P newex 1010 536 68 1441802 jit.brcosa;
#B color 5;
#P window setfont "Sans Serif" 9.;
#P message 1009 412 85 196617 set 0 , 1 5000 50;
#P newex 826 463 114 196617 jit.dimmap @invert 1 0;
#P message 263 154 50 196617 stop;
#P button 88 300 15 0;
#P button 53 300 15 0;
#P window setfont "Sans Serif" 12.;
#P message 271 240 33 196620 read;
#P message 758 488 54 196620 xfade $1;
#P flonum 912 355 35 12 0.3 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.pwindow 1147 593 322 242 0 1 0 0 1 0;
#P newex 558 505 49 196620 jit.xfade;
#P message 228 53 29 196620 $1;
#P message 265 54 15 196620 1;
#P hidden message 288 53 15 196620 0;
#P hidden message 1022 96 88 196620 matrixcount $1;
#P toggle 152 26 15 0;
#P window setfont "Sans Serif" 20.;
#P number 1051 47 63 20 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P newex 684 194 35 196620 sel 0;
#P newex 598 205 49 196620 sel 0;
#P button 654 112 15 0;
#P newex 590 287 74 196620 prepend set;
#P message 595 331 66 196620 index 200;
#P newex 684 286 74 196620 prepend set;
#P message 683 329 106 196620 outputmatrix 117;
#N counter 0 100;
#X flags 0 0;
#P newobj 704 143 108 196620 counter 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 595 168 83 196620 counter 0 100;
#P newex 594 242 86 196620 prepend index;
#P newex 681 240 124 196620 prepend outputmatrix;
#P user gswitch2 651 133 39 32 1 0;
#P newex 629 375 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 444 214 35 196620 sel 0;
#P newex 345 209 49 196620 sel 0;
#P message 34 150 36 196620 open;
#P user gswitch 15 357 41 32 0 0;
#P newex 91 166 58 196620 jit.qt.grab;
#P user gswitch 119 531 41 32 0 0;
#P user jit.pwindow 196 599 322 242 0 1 0 0 1 0;
#P newex 225 21 60 196620 loadbang;
#P button 422 109 15 0;
#P newex 349 286 74 196620 prepend set;
#P message 346 327 66 196620 index 116;
#P newex 454 287 74 196620 prepend set;
#P message 440 328 106 196620 outputmatrix 0;
#N counter 1 0 100;
#X flags 0 0;
#P newobj 433 169 93 196620 counter 1 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 344 169 83 196620 counter 0 100;
#P newex 345 248 86 196620 prepend index;
#P newex 442 249 124 196620 prepend outputmatrix;
#P user gswitch2 396 132 39 32 0 0;
#P user jit.pwindow 127 342 82 62 0 1 0 0 1 0;
#P newex 343 358 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 178 145 66 196620 jit.qt.movie;
#P newex 152 60 64 196620 qmetro 40;
#P user jit.fpsgui 62 701 60 9109516 0;
#P window setfont "Sans Serif" 20.;
#P comment 782 59 237 196628 buffer time (in frames);
#P user panel 330 104 232 247;
#X brgb 202 212 135;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 579 105 232 247;
#X brgb 207 174 174;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P fasten 21 0 22 1 96 235 35 235;
#P fasten 18 0 23 0 230 51 39 51;
#P fasten 19 0 3 0 202 755 396 755 396 693 67 693;
#P fasten 4 0 21 0 157 142 96 142;
#P fasten 23 0 21 0 39 174 72 174 72 142 96 142;
#P fasten 38 0 20 0 689 240 815 240 815 357 124 357;
#P fasten 25 0 20 0 449 239 559 239 559 340 124 340;
#P hidden connect 42 0 20 0;
#P fasten 22 0 7 0 20 412 133 412;
#P hidden connect 43 0 40 0;
#P hidden fasten 18 0 4 0 230 51 157 51;
#P connect 40 0 4 0;
#P connect 4 0 5 0;
#P connect 52 0 5 0;
#P connect 49 0 5 0;
#P connect 6 0 19 0;
#P hidden connect 18 0 44 0;
#P hidden connect 18 0 43 0;
#P hidden connect 18 0 42 0;
#P hidden fasten 41 0 6 0 1027 98 348 98;
#P connect 10 0 6 0;
#P fasten 9 0 6 0 447 325 348 325;
#P connect 21 0 6 0;
#P fasten 8 0 11 0 401 180 349 180;
#P connect 11 0 24 0;
#P connect 11 0 10 0;
#P connect 16 0 15 0;
#P connect 10 0 16 0;
#P hidden fasten 39 0 24 1 1056 91 389 91;
#P hidden connect 43 0 8 0;
#P connect 17 0 8 0;
#P hidden fasten 39 0 11 4 1056 91 421 91;
#P fasten 25 0 17 0 449 239 541 239 541 113 427 113;
#P fasten 24 0 17 0 350 243 336 243 336 113 427 113;
#P fasten 4 0 8 1 157 137 327 137 327 83 430 83;
#P fasten 8 1 12 0 430 180 438 180;
#P connect 14 0 13 0;
#P connect 12 0 9 0;
#P connect 12 0 25 0;
#P connect 9 0 14 0;
#P hidden fasten 39 0 12 4 1056 90 518 90;
#P connect 6 0 45 0;
#P connect 48 0 45 0;
#P connect 29 0 35 0;
#P connect 30 0 29 0;
#P fasten 27 0 30 0 656 179 600 179;
#P connect 35 0 34 0;
#P connect 26 0 45 1;
#P connect 30 0 37 0;
#P connect 45 0 58 0;
#P hidden fasten 28 0 26 0 686 324 634 324;
#P connect 29 0 26 0;
#P hidden fasten 41 0 26 0 1027 91 634 91;
#P connect 21 0 26 0;
#P hidden fasten 39 0 37 1 1056 92 642 92;
#P connect 36 0 27 0;
#P fasten 38 0 36 0 689 240 792 240 792 112 659 112;
#P fasten 37 0 36 0 603 242 587 242 587 112 659 112;
#P connect 43 0 36 0;
#P hidden fasten 39 0 30 4 1056 92 672 92;
#P fasten 4 0 27 1 157 137 327 137 327 51 685 51;
#P connect 31 0 28 0;
#P connect 33 0 32 0;
#P connect 31 0 38 0;
#P connect 28 0 33 0;
#P fasten 27 1 31 0 685 179 709 179;
#P connect 47 0 48 0;
#P hidden fasten 39 0 31 4 1056 92 805 92;
#P fasten 56 0 55 0 1138 451 1015 451;
#P hidden connect 39 0 41 0;
#P hidden connect 44 0 39 0;
#P connect 57 0 56 0;
#P connect 26 0 46 0;
#P pop;


April 7, 2006 | 11:10 am

hi jimmy,
your problem is that jit.xfade needs to receive a frame in the left
inlet *for every* frame it’s supposed to process. the way you set it
up, you’re only getting matrices in the left inlet when your left
matrixset is being played. try to buffer the last frame on the left
and repeat sending it to xfade when the right chain is active. how?
well, that’s for you to learn…

/*j


April 7, 2006 | 11:16 am

Thanks J – that makes sense.

I really appretiate the reply – i’ll post a fix if/when i figure it out in case anyone else is running into the same problem

best,
jimmy


April 7, 2006 | 12:29 pm

Actually – J – i think ive fixed that issue but just noticed another that i’m sure should be easy but can’t see a solution in the docs or forum.

When running this patch for more than 20 minutes, the patch uses up all my hard drive space (about 2.5. gb free)

Since i’m not writing to disk, this shouldn’t happen – right?

Do i need to clear the kill the grab object after every loop or something?

Any advise would be great

thanks again,
Jimmy


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