-
Text animator expressions controlled by slider controls
Hello everybody, I need your help. I have found many answers on this forum before in the past but this problem I just cannot find a solution to, maybe I have to dig a little deeper. But I am trying to animate text using expressions and the expressions have adjustable parameters(amplitude, freq, decay). I am trying to parent those parameters to slider controls so it is easier for me to navigate to control them rather than go into the text layer and find the expression selector drop down. When I parent the specific parameter(amplitude) to a slider control I get various errors, most common is “Bad argument: couldn’t find layer named ‘Control Layer’ expression disabled”. Here is a copy of the specific expression I am using, thanks to Dan Ebberts and his wonderful expressions.
**Working Expression**
freq = 05;
amplitude = 100;
decay = 9.0;
delay = .05;
myInDelay = delay*textIndex;
myOutDelay = delay*(textTotal -textIndex + 10); tStart = inPoint + myInDelay;
tStop = outPoint – myOutDelay;
if ((time < tStart) || (time > tStop)){
t = 0; }else{
if (time < (tStart + tStop)/4){ t = time – tStart;
}else{
t = tStop – time;
} }
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]****
**Slider Controlled expression**(does not work)
freq = thisComp.layer(“Controls”).effect(“freq”)(“Slider”);
amplitude = 100;
decay = 9.0;
delay = .05;
myInDelay = delay*textIndex;
myOutDelay = delay*(textTotal -textIndex + 10); tStart = inPoint + myInDelay;
tStop = outPoint – myOutDelay;
if ((time < tStart) || (time > tStop)){
t = 0; }else{
if (time < (tStart + tStop)/4){ t = time – tStart;
}else{
t = tStop – time;
} }
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]****
I am also using the control layer on a null object if that makes any difference**Working Expression**
freq = 05;
amplitude = 100;
decay = 9.0;
delay = .05;
myInDelay = delay*textIndex;
myOutDelay = delay*(textTotal -textIndex + 10); tStart = inPoint + myInDelay;
tStop = outPoint - myOutDelay;
if ((time < tStart) || (time > tStop)){
t = 0; }else{
if (time < (tStart + tStop)/4){ t = time - tStart;
}else{
t = tStop - time;
} }
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]**Slider Controlled expression**(does not work)
freq = thisComp.layer("Controls").effect("freq")("Slider");
amplitude = 100;
decay = 9.0;
delay = .05;
myInDelay = delay*textIndex;
myOutDelay = delay*(textTotal -textIndex + 10); tStart = inPoint + myInDelay;
tStop = outPoint - myOutDelay;
if ((time < tStart) || (time > tStop)){
t = 0; }else{
if (time < (tStart + tStop)/4){ t = time - tStart;
}else{
t = tStop - time;
} }
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]