## managing events (markers and timing)

May 25, 2012 at 3:05pm

# managing events (markers and timing)

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 ?

[attachment=194809,3950]

###### Attachments:
#57436
May 25, 2012 at 6:23pm

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.

#205814
May 25, 2012 at 6:24pm

[qlist] perhaps?

#205815
May 25, 2012 at 8:16pm

yep thx. i’ll try both.
actually I understand the idea, but can’t achieve. brain freeze… :-(

#205816
May 25, 2012 at 9:53pm

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…

#205817
May 26, 2012 at 1:43pm

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.

`

– Pasted Max Patch, click to expand. –
#205818
May 26, 2012 at 2:32pm

Hello,

i’m not sure to understand really what you want to achieve … but there a way to find next marker.

It can be not very efficient with a very long list of markers ; in this case you can traverse the [coll] more efficiently or maybe use [jit.matrix] instead to store values ;-)

– Pasted Max Patch, click to expand. –

HTH

#205819
May 26, 2012 at 2:36pm

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 ?

#205820
May 26, 2012 at 3:39pm

ok I got it. thx to everybody.
here it is (if it could be useful) :

– Pasted Max Patch, click to expand. –
#205821

You must be logged in to reply to this topic.