hi
i needed to schedule a sequence of events, in this case start/stop
certain parts of a patch over time. I wanted to be able to pass to an
abstraction a list of time intervals (in secs and with variable length)
and then get output a series of bangs after each of the intervals. I
attach the solution I found, not sure if this is clever or there is
maybe something already done for this? I use drip, coll and delay.
It receives a list of times like
2 3 0.5
and outputs the index at the right time. In this case after 2 secs
outputs num 0, after 3 secs num 1, and after half a sec more outputs num 2.
I called it sequence but i bet this name is already taken and it would
be wise to rename it with another one.
thanks for any feedback or ideas
enrike
#N canvas 328 332 784 519 10;
#X msg 144 366 next;
#X msg 97 201 clear;
#X obj 31 218 drip;
#X obj 31 261 i;
#X obj 58 261 + 1;
#X obj 31 239 t b f;
#X msg 46 193 0;
#X obj 31 326 coll xxxx;
#C restore;
#X obj 58 391 delay;
#X obj 31 282 pack f f;
#X text -2 388 index;
#X text -2 350 time;
#X obj 33 391 f;
#X msg 138 201 stop;
#X obj 31 351 * 1000;
#X obj 14 170 t b l b b;
#X text -35 198 wait;
#X obj 33 451 outlet;
#X obj 14 80 inlet;
#X obj 97 170 t b b;
#X obj 178 102 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1
1;
#X obj 58 414 spigot 0;
#X msg 166 71 1;
#X obj 178 19 inlet;
#X msg 65 38 0.5 1 2 3;
#X obj -35 218 delay 50;
#X connect 0 0 7 0;
#X connect 1 0 7 0;
#X connect 2 0 5 0;
#X connect 3 0 4 0;
#X connect 3 0 9 0;
#X connect 4 0 3 1;
#X connect 5 0 3 0;
#X connect 5 1 9 1;
#X connect 6 0 3 1;
#X connect 7 0 14 0;
#X connect 7 1 12 1;
#X connect 8 0 21 0;
#X connect 9 0 7 0;
#X connect 12 0 17 0;
#X connect 13 0 8 0;
#X connect 14 0 8 0;
#X connect 15 0 25 0;
#X connect 15 1 2 0;
#X connect 15 2 6 0;
#X connect 15 3 22 0;
#X connect 15 3 19 0;
#X connect 18 0 15 0;
#X connect 19 0 1 0;
#X connect 19 1 13 0;
#X connect 20 0 21 1;
#X connect 21 0 12 0;
#X connect 21 0 0 0;
#X connect 22 0 20 0;
#X connect 23 0 20 0;
#X connect 24 0 15 0;
#X connect 25 0 0 0;
#X coords 0 -1 1 1 95 19 1 100 100;