Tuesday, October 2, 2007

Motion Active Recording

Here is a clean version of the patch we worked on together. This machine records when their is motion and stops when there is no movement. It captures only the changes. This is an effective surveillance technology. In the comments section you will find the code.

Copy the code into the computer's "Clipboard" like you were going to copy and paste the text.

Open up MMJ and goto File:New_from_Clipboard

There's your patch. Press "esc" for full screen. Play with it.

Record a dance.

Use jit.submatrix or jit.scissors or jit.split just upstream of "motion_detector" in order to make only part of the screen motion sensitive.

Record a dance with your mutated system.

2 comments:

Tony said...

max v2;
#N vpatcher 693 46 1404 872;
#P window setfont "Sans Serif" 9.;
#P user jit.fpsgui 304 459 60 196617 0;
#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P comment 245 294 303 196622 a higher value makes fewer bangs;
#P window linecount 3;
#P comment 245 230 303 196622 when the total frame difference (integrated over time) reaches this value a "bang" is released;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 38 552 68 196617 fullscreen \$1;
#P toggle 38 529 15 0;
#P newex 38 505 35 196617 sel 27;
#P newex 38 477 40 196617 key;
#P window setfont "Sans Serif" 14.;
#P newex 243 516 162 196622 jit.window 720 480;
#P newex 243 390 238 196622 jit.dimmap @map 0 1 @invert 1 0;
#P flonum 139 190 74 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 42 292 15 0;
#P number 91 41 52 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 8 194 54 196622 t l l;
#P message 35 401 42 196622 stop;
#P message 21 377 190 196622 write 15. jpeg normal 600;
#P newex 8 433 157 196622 jit.qt.record 720 480;
#P newex 8 323 286 196622 jit.matrix frame 4 char 720 480 @thru 0;
#N vpatcher 632 59 1259 679;
#P origin 0 9;
#P inlet 316 412 15 0;
#P outlet 303 584 15 0;
#P window setfont "Sans Serif" 18.;
#P flonum 316 460 81 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P newex 82 510 36 196622 t f f;
#P message 236 389 17 196622 0;
#P window setfont "Sans Serif" 18.;
#P newex 283 544 82 196626 select 1;
#P newex 281 500 45 196626 > 5.;
#P flonum 265 197 81 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 64 245 210 196626 jit.op @op > @val 0.15;
#P flonum 82 468 86 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 82 412 44 196626 + 0.;
#P flonum 82 350 86 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 66 294 60 196626 jit.3m;
#P newex 63 195 113 196626 jit.rgb2luma;
#P window linecount 7;
#P comment 394 197 100 196626 object inputs only cause output when left input is triggered;
#P window linecount 1;
#P newex 50 41 38 196626 t l l;
#P newex 65 147 164 196626 jit.op @op absdiff;
#P window linecount 5;
#P comment 388 50 100 196626 trigger outputs come out from right to left;
#P inlet 50 21 15 0;
#P connect 0 0 3 0;
#P connect 2 0 5 0;
#P connect 5 0 10 0;
#P fasten 3 1 2 0 83 100 70 100;
#P connect 10 0 6 0;
#P connect 6 1 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 15 0;
#P fasten 15 1 8 1 113 549 197 549 197 396 121 396;
#P fasten 14 0 8 1 241 414;
#P fasten 3 0 2 1 55 116 224 116;
#P fasten 13 0 14 0 288 603 447 603 447 379 241 379;
#P connect 11 0 10 1;
#P fasten 15 0 12 0 87 558 226 558 226 480 286 480;
#P connect 12 0 13 0;
#P connect 13 0 17 0;
#P connect 18 0 16 0;
#P connect 16 0 12 1;
#P pop;
#P newobj 8 229 141 196622 p motion_detector;
#P message 88 105 53 196622 open;
#P newex 8 147 179 196622 jit.qt.grab 720 480;
#P newex 8 74 93 196622 metro 33;
#P toggle 8 27 35 0;
#P comment 246 199 303 196622 set this number to the desired threshold;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P fasten 4 0 3 0 93 136 13 136;
#P connect 3 0 10 0;
#P connect 10 0 5 0;
#P connect 5 0 6 0;
#P fasten 10 1 6 0 57 273 13 273;
#P connect 6 0 7 0;
#P connect 9 0 7 0;
#P connect 8 0 7 0;
#P connect 16 0 17 0;
#P fasten 17 0 18 0 43 527 43 527;
#P connect 18 0 19 0;
#P connect 5 0 12 0;
#P connect 11 0 2 1;
#P connect 13 0 5 1;
#P fasten 6 0 14 0 13 359 248 359;
#P connect 14 0 15 0;
#P fasten 19 0 15 0 43 590 181 590 181 493 248 493;
#P connect 14 0 22 0;
#P pop;

Tony said...

Matt Gough had this to say: http://quodlibet.tumblr.com/post/14119720
Think how you would construct Matt's dream machine.