Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Natural Type-On Expression

  • Natural Type-On Expression

    Posted by Navarro Parker on July 16, 2013 at 8:22 pm

    The old text animator Typewriter preset is great. However, it types at a constant cadence like a dot matrix printer.

    Is there a way to make a more natural type-on that emulates a human typing? Maybe something with variable micro-pauses between letters and a different variable micro-pause between words?

    Brie Clayton replied 7 months, 3 weeks ago 13 Members · 31 Replies
  • 31 Replies
  • Dan Ebberts

    July 16, 2013 at 10:07 pm

    Here’s a Source Text expression you could play around with:


    minRate = 3; // frames per character
    maxRate = 6;

    charCount = 0;
    t = 0;
    seedRandom(index,true);
    while (t < time){
    charCount++;
    t += framesToTime(random(minRate,maxRate));
    }
    value.substr(0,charCount)

    Dan

  • Mitch Mann

    July 17, 2013 at 10:41 am

    I was thinking of some kind of wiggle expression for this. I tried your solution, Dan, and its great!

  • Navarro Parker

    July 17, 2013 at 4:09 pm

    As usual, works great Dan!

  • Dovi Shraga

    December 20, 2013 at 2:09 pm

    Hi Dan!

    This looks just like what I’m looking for. The problem is I can’t figure out where this code goes (Range Selector 1 -> Strat?). I’d be happy if you’re willing to elaborate on that a little.

    Thanks!
    Dovi

  • Dan Ebberts

    December 20, 2013 at 5:23 pm

    It’s an expression for the Source Text property.

    Dan

  • Dovi Shraga

    December 20, 2013 at 11:14 pm

    I got that, but couldn’t get it to work. What I did was alt+click on the stopwatch near “Source Text” and then pasted your code. When I moved the cursor to see what’s happening, I saw nothing. I’ve also tried to disable the Typewriter effect but that didn’t help either.

  • Dan Ebberts

    December 20, 2013 at 11:20 pm

    1. Create a new text layer with your desired text.
    2. Alt+click the Source Text stopwatch.
    3. Paste this in:


    minRate = 3;
    maxRate = 6;
    charCount = 0;
    t = 0;
    seedRandom(index,true);
    while (t < time){
    charCount++;
    t += framesToTime(random(minRate,maxRate));
    }
    value.substr(0,charCount)

    That should do it. No Typewriter effect necessary.

    Dan

  • Lance Clayton

    May 10, 2016 at 4:29 am

    Thanks Dan.

    However, this does seem to only work when the layer starts at the beginning of the comp. When further down the timeline all letters appear at once.

    Is there some parameters that can be added to allow the expression to start at the beginning of the layer no matter how far down the timeline it is? (or will I have to precomp).

    Thanks

    Lance

  • Dan Ebberts

    May 10, 2016 at 5:27 am

    I think you just need to change this line:

    t = 0;

    to this:

    t = inPoint;

    Dan

  • Marcelo Cabral

    October 1, 2017 at 3:11 pm

    Hi Dan
    This expression works awesome as type on effect. I have a text with this expression inside a composition (“text”) nested in another composition (“chat”). In this composition, I have an adjustment layer with a mark called “start”. I was wondering if there is some way to make this text expression start with that mark. Thank you in advance

    minRate = 1;
    maxRate = 2;

    charCount = 0;
    t = inPoint;
    seedRandom(index,true);
    while (t &lt; time){
    charCount++;
    t += framesToTime(random(minRate,maxRate));
    }
    value.substr(0,charCount)

Page 1 of 4

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy