Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Get text changes from CSV/TSV table

  • Get text changes from CSV/TSV table

    Posted by Daniel Salaw on May 28, 2021 at 8:58 pm

    Hi guys,

    I am trying to link the values from a heart rate monitor to a text layer using an expression. I have a TSV file with the time in frames and the value. The table looks like this:

    timeInFrames	heartRate
    0	9
    75	96
    650	95
    800	95

    // etc.

    
    

    I didn’t manage to work with the TSV file, nor with hardcoded values, like this:

    if (timeToFrames() >= 0){text.sourceText = ’96’;}

    if (timeToFrames() >= 75){text.sourceText = ’96’;}

    if (timeToFrames() >= 650){text.sourceText = ’95’;}

    if (timeToFrames() >= 800){text.sourceText = ’95’;}

    
    

    Do you have a tip for me, how I can change the text automatically at the appropriate time?Thanks for your help!

    Andrei Popa replied 5 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    May 29, 2021 at 8:07 am

    You can’t modify property values like that via expressions. The way expressions work is the property takes the last value from the expression. Try this.

    if (timeToFrames() >= 0){val = '96';}
    if (timeToFrames() >= 75){val = '96';}
    if (timeToFrames() >= 650){val = '95';}
    if (timeToFrames() >= 800){val = '95';}
    val

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