-
Make this expression works with specific marker key
I have this expression written by Dan Ebberts works well with any marker key…
Is there any method to make it works with a specific marker key?
Say i have three keys i need it works with key number tow only
Thanks.
attackTime = .1;
holdTime = .1;
decayTime = .25;
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time)n–;
}
if (n > 0){
t = time – marker.key(n).time;
t1 = attackTime;
t2 = t1 + holdTime;
t3 = t2 + decayTime
if (t < t1)
linear(t,0,t1,0,100)
else if (t < t2)
100
else
linear(t,t2,t3,100,0);
}else 0