-
Typewriter Expression
Hey expression gurus,
I’ve got a project that has a lot of typing on screen with a typewrite sound effect. It’s a very tedious job making the sound effect match the screen animation so I decided to try this out with an expression to do the work for me.
Here’s what I’ve done so far:
I made a text layer, typed some text and added the typewriter animation preset which gives me the range selector of 0 – 100 percent for the text to type on.
I added my typewriter sound effect and converted audio to keyframes.
I then added an expression to that keyframe layer so that the keyframe will show either 100 or 0 depending on if there is a click sound effect at that moment. That expression was:
x=linear(value, 0, 10, 0, 100)
if (x>30) 100
else 0then I pickwhiped the text layer’s range selection to the audio keyframe and at this point the text will be either 0% or 100%, making the text on and off when the sound effect is heard.
So I”m almost there…now I just need it so that it actually counts each 100% ‘click’ to make the range count from 0% to 1% to 2% and so on. I need an expression that would sort of look like the following, except in an actual expression form:
x=thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”)
if (x=100) add 1 to value
else keep last valueAny ideas? Thanks!