max v2; #N vpatcher -3 44 932 768; #P origin 0 25; #P window setfont "Sans Serif" 14.; #P message 739 586 59 196622 \$1 500; #P newex 740 615 42 196622 line~; #P newex 653 685 52 196622 / 500.; #P number 653 660 59 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 635 516 27 196622 +; #P newex 653 627 34 196622 abs; #P newex 635 555 73 196622 trigger i i; #P newex 653 594 27 196622 - 0; #P newex 823 444 44 196622 *~ 0.; #P newex 700 438 50 196622 + 240; #P newex 818 320 87 196622 cycle~ 100; #P newex 635 439 50 196622 + 320; #P user gain~ 823 472 24 100 158 0 1.071519 7.94321 10.; #P user ezdac~ 821 612 865 645 0; #P newex 823 411 87 196622 cycle~ 440; #P number 700 405 52 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 635 404 51 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 635 374 74 196622 unpack i i; #P newex 635 341 102 196622 jit.findbounds; #P newex 103 465 127 196622 vexpr $i1/255.; #P user jit.pwindow 358 487 162 122 0 1 0 0 1 0; #P newex 102 495 126 196622 prepend color 0.; #P user suckah 78 176 335 256; #P hidden message 482 293 46 196622 0.2; #P hidden newex 482 252 82 196622 loadbang; #P flonum 482 349 53 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 482 383 56 196622 tol \$1; #P newex 81 549 234 196622 jit.chromakey @mode 1 @tol 0.2; #P message 226 102 66 196622 settings; #P user jit.pwindow 80 177 322 242 0 1 0 0 1 0; #P user jit.fpsgui 359 630 60 196622 0; #P toggle 81 19 24 0; #P newex 81 53 73 196622 qmetro 5; #P message 168 98 46 196622 close; #P message 118 99 44 196622 open; #P newex 81 136 141 196622 jit.qt.grab 320 240; #P comment 436 40 251 196622 Track an object in view of a video camera to control sound.; #P window setfont "Sans Serif" 9.; #P comment 161 58 90 196617 get fastest frame rate we can; #P comment 225 138 100 196617 grab frames at 320x240 resolution; #P comment 417 183 100 196617 click on this image to set the color we want to track; #P comment 236 477 63 196617 nasty color conversion; #P comment 490 411 100 196617 color tolerance in chromakey ("bluescreen") algorithm; #P comment 428 624 100 196617 the filtered image; #P comment 638 294 100 196617 find bounding rectangle of color we are tracking; #P connect 12 0 11 0; #P fasten 15 0 8 0 231 131 86 131; #P connect 11 0 8 0; #P fasten 10 0 8 0 173 128 86 128; #P fasten 9 0 8 0 123 127 86 127; #P connect 8 0 14 0; #P fasten 22 0 16 0 107 539 86 539; #P connect 14 0 16 0; #P fasten 17 0 16 0 487 461 86 461; #P connect 24 0 22 0; #P fasten 21 0 24 0 83 446 108 446; #P fasten 16 0 23 0 86 587 326 587 326 475 364 475; #P connect 23 0 13 0; #P hidden connect 19 0 20 0; #P hidden connect 20 0 18 0; #P connect 18 0 17 0; #P fasten 23 0 25 0 364 614 624 614 624 336 640 336; #P connect 25 0 26 0; #P connect 26 0 27 0; #P connect 27 0 32 0; #P connect 32 0 39 0; #P connect 39 0 37 0; #P fasten 34 0 39 1 705 506 657 506; #P connect 37 1 36 0; #P connect 36 0 38 0; #P connect 38 0 40 0; #P connect 40 0 41 0; #P connect 37 0 36 1; #P connect 26 1 28 0; #P connect 28 0 34 0; #P fasten 41 0 43 0 656 709 729 709 729 575 744 575; #P connect 43 0 42 0; #P fasten 34 0 33 0 705 477 781 477 781 294 823 294; #P connect 31 0 30 0; #P fasten 32 0 29 0 640 484 797 484 797 398 828 398; #P connect 29 0 35 0; #P connect 35 0 31 0; #P connect 31 0 30 1; #P fasten 42 0 35 1 745 677 897 677 897 439 862 439; #P connect 33 0 29 1; #P pop;