Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Is there a wordPerSec expression?

  • Is there a wordPerSec expression?

    Posted by Olly Starkey on May 8, 2019 at 8:49 am

    Hi there

    I hope you can help.

    I am looking for a wordPerSec expression that works in the same way as this expression

    charPerSec = 40;
    tTotal = value.length/charPerSec;
    t = easeIn(time,0,tTotal,0,tTotal);
    idx = Math.floor(t*charPerSec);
    value.substr(0,idx)

    But with words not individual characters.

    Thanks in advance

    Olly Starkey replied 7 years ago 2 Members · 3 Replies
  • 3 Replies
  • Kalleheikki Kannisto

    May 8, 2019 at 3:02 pm

    There’s probably a neater way to do this, but this should work.

    wordsPerSec = 4;
    word_array = value.split(" ");
    tTotal = word_array.length/wordsPerSec;
    t = easeIn(time,0,tTotal,0,tTotal);
    idx = Math.floor(t*wordsPerSec);
    output = "";
    for (i=0; i

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Kalleheikki Kannisto

    May 8, 2019 at 3:05 pm

    Note: since there’s an Ease In, it doesn’t really start at 4 words per second but builds up to it.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Olly Starkey

    May 8, 2019 at 3:50 pm

    Thanks Kalleheikki. That’s super helpful.

    I’ll have a check on this when I get back in later.

    Thanks so much

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