hi and welcome, couple advices.<br><br>1. start small. isolate just one sensor. get it right and duplicate. build a mechanism that changes movie only after it finish playing, see @loopreport attribute of qt.movie, gate<br>
<br>2. refrain from using number boxes *as part* of the flow, connect object directly and have numboxes connected separately, ready to be deleted when you no longer need them, they take precious cycles. same for other gui obj like, like bangs. they help debugging. see <a href="http://www.cycling74.com/story/2007/2/5/142639/8843">http://www.cycling74.com/story/2007/2/5/142639/8843</a> for more advanced topics<br>
<br>3. working with sensors is can be frustrating, research this objects: slide, change, onebang, gate<br><br>4. have a single metro (or better, qmetro) in a patch. get to know the order of execution in max, if "right to left, top to bottom" is news, see tutorials.<br>
<br>5. decide if your working with floats or ints.<br><br>#P window setfont "Sans Serif" 9.;<br>#P window linecount 3;<br>#P comment 404 117 100 9109513 <<consider using split instead of if \, but using elseif is also possible.;<br>
#P window linecount 1;<br>#P newex 154 355 19 9109513 t 1;<br>#B color 5;<br>#P newex 23 63 27 9109513 t b b;<br>#P toggle 23 19 15 0;<br>#P newex 23 40 50 9109513 qmetro 33;<br>#P user jit.pwindow 37 374 82 62 0 1 0 0 1 0;<br>
#P newex 38 288 42 9109513 gate 1 1;<br>#B color 5;<br>#P newex 38 257 42 9109513 t 0 l;<br>#B color 5;<br>#P newex 154 334 74 9109513 route loopnotify;<br>#B color 5;<br>#P newex 343 127 53 9109513 clip 0 1500;<br>#P button 439 190 15 0;<br>
#P button 383 191 15 0;<br>#P button 343 170 15 0;<br>#P number 343 110 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br>#P newex 383 169 66 9109513 split 500 1000;<br>#P newex 343 148 51 9109513 split 0 500;<br>#P number 108 132 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br>
#P button 181 204 15 0;<br>#P message 169 233 78 9109513 522;<br>#P newex 169 174 121 9109513 if $i1 > 500 then set $i1;<br>#P button 48 201 15 0;<br>#P newex 38 173 121 9109513 if $i1 > 500 then set $i1;<br>#P message 38 233 73 9109513 522;<br>
#P newex 38 311 189 9109513 jit.qt.movie 720 480 @loopreport 1 @loop 0;<br>#B color 5;<br>#P comment 144 134 100 9109513 master number box;<br>#P window linecount 3;<br>#P comment 247 341 100 9109513 << wait for end of file to open gate for other read messages;<br>
#P connect 4 0 3 0;<br>#P connect 4 0 5 0;<br>#P connect 17 0 24 0;<br>#P fasten 23 0 2 0 28 309 43 309;<br>#P connect 2 0 20 0;<br>#P connect 19 0 2 0;<br>#P fasten 2 1 17 0 222 332 159 332;<br>#P fasten 24 0 19 0 159 377 233 377 233 283 43 283;<br>
#P connect 18 0 19 0;<br>#P fasten 18 1 19 1 75 282 75 282;<br>#P connect 6 0 7 0;<br>#P connect 6 0 8 0;<br>#P connect 9 0 4 0;<br>#P connect 9 0 6 0;<br>#P connect 21 0 23 0;<br>#P connect 22 0 21 0;<br>#P fasten 7 0 18 0 174 254 43 254;<br>
#P fasten 3 0 18 0 43 254 43 254;<br>#P connect 16 0 10 0;<br>#P connect 12 0 16 0;<br>#P connect 10 1 11 0;<br>#P connect 11 0 14 0;<br>#P connect 11 1 15 0;<br>#P connect 10 0 13 0;<br>#P window clipboard copycount 26;<br>
<br><br><div class="gmail_quote">On Thu, May 1, 2008 at 6:39 AM, bow <<a href="mailto:bowneyjones@gmail.com">bowneyjones@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, I'm a New Media student at SUNY Purchase and am looking for some assistance with this project because none of the professors here know MAX at all.<br>
<br>
I'm using light sensors to trigger video playback but the problem is it bangs it continuously so the video never actually gets going until the sensor has been covered again.<br>
<br>
The sensors are giving off numbers like 300 when covered and 500 when exposed so I'm using IF objects like this:<br>
<br>
if $i1 > 500 then set $i1<br>
<br>
Also, if I want it to trigger only during a certain range of numbers can I just tack on a "< 600" after my "> 500"?<br>
<br>
Any advice on how better to do this would be much appreciated! I've attached my patch so far if you want to take a look.<br>
<br>_______________________________________________<br>
jitter mailing list<br>
<a href="mailto:jitter@cycling74.com">jitter@cycling74.com</a><br>
<a href="http://www.cycling74.com/mailman/listinfo/jitter" target="_blank">http://www.cycling74.com/mailman/listinfo/jitter</a><br>
<br></blockquote></div><br>