## managing events (markers and timing)

May 25 2012 | 3:05 pm
hello, could somebody push me in he right direction ?
what I need to achieve is : - I have a coll with list of markers. - if I play an event at marker (M1) during a certain amount of time (D1), the next event will play at next marker (Mn) after M1+D1. and the next (Mn+x) after Mn+D2, etc...
how to do that ?

• May 25 2012 | 6:23 pm
Basically you could go sequentially through the coll of markers. If an event has finished playing at time x look for the next marker with time y > x.
• May 25 2012 | 6:24 pm
[qlist] perhaps?
• May 25 2012 | 8:16 pm
yep thx. i'll try both. actually I understand the idea, but can't achieve. brain freeze... :-(
• May 25 2012 | 9:53 pm
I forgot to say each event plays in loop during a variable amount of time. so the durations of each event are melt.
I'll try to provide a patch soon...
• May 26 2012 | 1:43 pm
ok, I can now find the right starting point for each event. the problem is how to pass only one duration of each except when duration has changed. It's not to pass only new number because two durations can be equal. only pass new duration of each event.
at least I would like to know how to pass only the last entry even it's same than a previous one. how to ? please.
the input flow is like that : fromSEQ: 1 127. 120000 fromSEQ: 1 0 0 fromSEQ: 1 127. 1096 fromSEQ: 1 127. 1096 fromSEQ: 1 127. 1096 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 120000 fromSEQ: 2 0 0 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 824 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 824 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 824 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 824 fromSEQ: 3 127. 120000 fromSEQ: 3 0 0 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 824 fromSEQ: 3 127. 1033 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 824 fromSEQ: 3 127. 1033 fromSEQ: 1 127. 1096 fromSEQ: 2 127. 824 fromSEQ: 3 127. 1033 etc...
here's a part of the starting patch. I feel I'm in a wrong direction but I can't find where.
`
• May 26 2012 | 2:36 pm
thx nicolas, actually I did this part easily with an efficent solution. you can see it in the subpatch [p seek]. I traverse the coll with uzi only from the last index and until it found the new one. so even for a big content of coll it's ok. thx anyway.
I feel I'm near the goal.
my problem now is how to let pass new number of a stream only the third time ? do you know that ?
• May 26 2012 | 3:39 pm
ok I got it. thx to everybody. here it is (if it could be useful) :