max v2; #N vpatcher 0 44 913 731; #P origin 39 0; #P window setfont Times 10.; #P comment 506 89 185 1310730 set random range to the length of the movie; #P window linecount 2; #P comment 517 110 136 1310730 jump to a random time between 0 and the end of the movie; #P window linecount 1; #P comment 663 400 116 1310730 movie duration (in frames); #P window setfont "Fixedwidth Serif" 18.; #P flonum 665 379 109 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 739 323 141 1310730 "duration" divided by "timescale"; #P comment 723 364 120 1310730 movie duration (in seconds); #P window setfont "Fixedwidth Serif" 18.; #P flonum 728 343 89 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P window linecount 4; #P comment 579 293 139 1310730 note the importance of including the decimal point in objects that you want to do calculations with floats instead of ints; #P window linecount 1; #P comment 779 279 121 1310730 timescale (units per second); #P window setfont "Fixedwidth Serif" 18.; #P number 772 258 58 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P number 670 258 97 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont Times 10.; #P comment 653 279 121 1310730 duration (in timescale units); #P window setfont Times 18.; #P comment 297 63 31 1310738 fps; #P window setfont "Fixedwidth Serif" 18.; #P flonum 206 62 91 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 665 343 54 1441810 * 1.; #P newex 728 299 54 1441810 / 1.; #P window setfont Times 10.; #P comment 217 153 60 1310730 milliseconds; #P comment 217 90 154 1310730 calculate the milliseconds per frame; #P window linecount 5; #P comment 304 105 99 1310730 "reverse" divide object \, divides the left input INTO the right input (instead of divding BY the right input); #P window setfont "Fixedwidth Serif" 18.; #P window linecount 1; #P newex 206 104 98 1441810 !/ 1000.; #P window setfont Times 18.; #P comment 11 112 180 1310738 start/stop movie display; #P window setfont Times 10.; #P window linecount 2; #P comment 218 249 170 1310730 start the movie only when displaying it \, stop it when metro is stopped; #P window setfont "Fixedwidth Serif" 18.; #P flonum 206 132 98 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P button 412 50 15 0; #P window setfont Times 18.; #P window linecount 3; #P comment 1 24 205 1310738 begin reading a QuickTime movie (or other media file) off the hard disk; #P window linecount 1; #P comment 323 193 268 1310738 toggle loop qt.movie attribute on/off; #P window setfont Times 10.; #P comment 395 222 139 1310730 set the "loop" attribute on or off; #P window linecount 5; #P comment 572 461 83 1310730 note that the order of these queries is important for the math objects to work properly; #P window linecount 3; #P comment 464 460 96 1310730 use commas to send separate messages in immediate succession; #P window linecount 2; #P comment 483 411 161 1310730 if movie has been loaded successfully \, then ask for some info; #P window setfont "Fixedwidth Serif" 18.; #P window linecount 1; #P newex 470 387 98 1441810 select 1; #P message 202 460 215 1441810 bus1.mov; #P window setfont Times 10.; #P comment 499 368 63 1310730 show success; #P toggle 484 368 15 0; #P window linecount 2; #P comment 213 404 131 1310730 use the 'set' message to set the contents of a message box; #P window setfont "Fixedwidth Serif" 18.; #P window linecount 1; #P newex 202 431 131 1441810 prepend set; #P window setfont Times 10.; #P window linecount 6; #P comment 377 360 83 1310730 expects a symbol (the movie name) and an integer (the success flag) \, and sends them out separate outlets; #P window setfont "Fixedwidth Serif" 18.; #P window linecount 1; #P newex 360 336 120 1441810 unpack s i; #P window setfont Times 10.; #P window linecount 2; #P comment 370 274 200 1310730 you can set the autostart attribute to 0 initially \, so the movie does not start playing until told; #P window linecount 3; #P comment 259 503 172 1310730 note the importance of including the decimal point in objects that you want to do calculations with floats instead of ints; #P window linecount 1; #P comment 178 489 172 1310730 scale the values 0-127 into the range 0-1; #P window linecount 8; #P comment 263 299 97 1310730 if a message begins with the word "read" \, send the rest of that message out the left outlet \; otherwise \, pass the whole message out the right outlet (for possible further use); #P window linecount 5; #P comment 128 299 126 1310730 when you "read" in a movie \, this object sends out the message "read" followed by the name of the movie and a "success flag" of 1 or 0; #P window setfont "Fixedwidth Serif" 18.; #P window linecount 1; #P newex 360 303 120 1441810 route read; #P window setfont Times 10.; #P window linecount 3; #P comment 97 414 92 1310730 you could use a fader or any MIDI controller to do this; #P window setfont Times 18.; #P window linecount 1; #P comment 176 515 83 1310738 brightness; #P window setfont Times 10.; #P comment 110 564 223 1310730 change the value of the obejct's "brightness" attribute; #P comment 113 645 351 1310730 arguments are window name and left \, top \, right \, bottom coordinates of window corners; #P comment 94 604 252 1310730 this object can modify brightness \, contrast \, and/or saturation; #P comment 510 520 39 1310730 esc key; #P window setfont "Fixedwidth Serif" 18.; #P newex 436 539 109 1441810 select 27; #P newex 436 508 43 1441810 key; #P toggle 436 570 15 0; #P message 436 591 153 1441810 fullscreen \$1; #P toggle 430 30 15 0; #P number 540 25 71 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 430 50 120 1441810 metro 1000; #P message 430 111 87 1441810 time \$1; #P newex 430 83 76 1441810 random; #P message 443 439 351 1441810 gettimescale \, getduration \, getfps; #P newex 568 229 316 1441810 route fps duration timescale; #P toggle 308 195 15 0; #P message 308 218 87 1441810 loop \$1; #P newex 147 189 124 1441810 select 0 1; #P message 147 218 54 1441810 stop; #P message 204 218 65 1441810 start; #P newex 102 483 76 1441810 / 127.; #P newex 102 453 64 1441810 ctlin; #P flonum 102 514 74 18 0. 0 1 22 0 0 0 221 221 221 222 222 222 0 0 0; #P message 102 541 153 1441810 brightness \$1; #P newex 85 580 120 1441810 jit.brcosa; #P toggle 85 132 15 0; #P newex 85 158 131 1441810 metro 33.33; #P newex 85 622 406 1441810 jit.window TheMovie 704 528 1024 768; #P message 32 80 54 1441810 read; #P newex 85 275 285 1441810 jit.qt.movie @autostart 0; #P window setfont Times 18.; #P comment 451 568 302 1310738 toggle fullscreen window attribute on/off; #P user panel 18 74 82 37; #X brgb 255 219 207; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 77 270 300 34; #X brgb 255 219 207; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 74 620 425 40; #X brgb 255 219 207; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 79 508 180 110; #X brgb 223 248 255; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 409 6 210 141; #X brgb 253 254 192; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 82 127 223 120; #X brgb 208 255 209; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 357 298 126 38; #X brgb 244 223 255; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 564 223 328 39; #X brgb 244 223 255; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P user panel 436 432 361 35; #X brgb 244 223 255; #X frgb 0 0 0; #X border 0; #X rounded 0; #X shadow 0; #X done; #P connect 14 0 13 0; #P connect 13 0 10 0; #P connect 11 0 10 0; #P connect 20 0 10 0; #P connect 21 0 10 0; #P connect 23 0 10 0; #P connect 26 0 10 0; #P connect 28 0 10 0; #P connect 10 0 15 0; #P connect 16 0 15 0; #P connect 15 0 12 0; #P fasten 32 0 12 0 441 618 90 618; #P connect 18 0 19 0; #P connect 19 0 17 0; #P connect 17 0 16 0; #P fasten 14 0 22 0 90 153 152 153; #P connect 22 0 21 0; #P fasten 48 0 50 0 365 401 207 401; #P connect 50 0 54 0; #P connect 22 1 20 0; #P connect 25 0 72 0; #P connect 72 0 66 0; #P connect 66 0 63 0; #P connect 63 0 13 1; #P connect 24 0 23 0; #P connect 10 1 42 0; #P connect 42 0 48 0; #P connect 31 0 29 0; #P connect 62 0 27 0; #P connect 29 0 27 0; #P connect 27 0 28 0; #P connect 34 0 35 0; #P connect 35 0 33 0; #P connect 33 0 32 0; #P connect 55 0 26 0; #P connect 48 1 55 0; #P connect 48 1 52 0; #P connect 25 1 27 1; #P connect 30 0 29 1; #P fasten 42 1 25 0 475 330 564 330 564 225 573 225; #P connect 25 0 71 0; #P connect 71 0 82 0; #P connect 25 1 75 0; #P connect 70 0 71 1; #P connect 75 0 70 0; #P connect 70 0 79 0; #P connect 25 2 76 0; #P connect 76 0 70 1; #P pop;