john saylor wrote:
hi
i'd like to create a loop where every second a number is divided by two. i have been unsuccessful so far in stringing together metro, /, f, and print in any combination.
i think it is very unlikely that i am the first person to come across this problem. any pointers to documentation or example patches are welcome.
thanks.
try this patch.
it takes advantage of the [f] object's second inlet, which allows you to adjust the number without outputting the new value.
--eric
------ http://USFamily.Net/info - Unlimited Internet - From $8.99/mo! ------
#N canvas 0 0 454 304 12; #X obj 55 183 / 2; #X obj 56 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 55 224 5 0 0 0 - - -; #X obj 56 77 metro 1000; #X obj 55 144 f 100; #X msg 90 116 100; #X text 130 117 re-initialize; #X text 146 78 1000 msecs = 1 second; #X text 78 45 start; #X text 103 144 put in a float; #X text 88 184 divide by 2 , return output to float; #X text 105 223 result; #X connect 0 0 2 0; #X connect 0 0 4 1; #X connect 1 0 3 0; #X connect 3 0 4 0; #X connect 4 0 0 0; #X connect 5 0 4 1;