As i see it, you want the increment of the revealed text to vary (wiggle) over time.
Thus, the variable you need is the “progress” (how much of the text is revealed) multiplied by the “speedMultiplier” parameter (giving you control of the overall speed of the animation).
Thus, your expression for the “Text” property turns to:
speedMultiplier = 10;
curTimer = time - thisLayer.inPoint;
progress = effect("Progress")("Slider");
enableOverwrite = effect("Use Overwrite Cursor")("Checkbox");
T = speedMultiplier*progress;
F = Math.round(curTimer % 1);
if (F == 1 | (T, 0)) {
if(enableOverwrite == 1){
cursor = "_";
} else {
cursor = "|";
}
} else {
cursor = " ";
}
substr(0, T) + cursor;
(curTimer is now only to determine the mode of the “cursor”)
The “progress” variable is assigned to the value of the “Progress” slider effect. It’s a strictly increasing function corresponding to how much of the text is revealed. The expression for the Progress slider effect is:
spd = effect("Increment")("Slider")
accum = 0;
for (i = timeToFrames(inPoint); i <= timeToFrames(time); i++){
accum += spd.valueAtTime(framesToTime(i));
}
value + accum*thisComp.frameDuration
(that’s from Dan Ebberts, btw)
“Increment” is another slider effect, whose value is non-negative and wiggles over time. It’s expression is:
Math.abs(wiggle(1, 0.5))
The actual parameters here are for you to play with, of cause.
In the end, the whole scheme makes the typing speed vary over time.