Here are two simple timing mechanisms. Build both of them and explain what they do. The code for these is in the comments section of this post.
Which do you think is better (more computationally efficient) ? Build a simple mechanism using two "line" objects to have a number go from 0.0 to 2.0 in 5.5 seconds and then back from 2.0 to 0.0 in 2.0 seconds.
Read the help patch for "line" to start you on your way.
Subscribe to:
Post Comments (Atom)
1 comment:
#P button 362 71 15 0;
#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P newex 58 185 57 196622 / 120.;
#P flonum 58 222 57 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 122 185 35 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 0 120;
#X flags 0 0;
#P newobj 58 137 107 196622 counter 0 120;
#P toggle 58 81 15 0;
#P newex 58 105 72 196622 metro 33;
#P button 434 158 15 0;
#P message 362 102 108 196622 0. \, 1. 4000;
#P newex 362 129 82 196622 line 0.;
#B color 5;
#P flonum 362 157 57 14 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 10 0 2 0;
#P fasten 7 0 5 0 127 214 180 214 180 70 63 70;
#P connect 9 0 8 0;
#P connect 6 0 9 0;
#P connect 6 2 7 0;
#P connect 4 0 6 0;
#P connect 5 0 4 0;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P connect 1 1 3 0;
#P window clipboard copycount 11;
Post a Comment