Copy link to clipboard
Copied
I know that in After Effect you can make audio react to layers by using the "convert audio to keyframes" command. But is there an expression that would allow me to automatically sync and trigger the sound of a typewriter with AE's "typewriter" effect? I know I could just insert that effect and manually align the sound to every instance of a letter being typed, but I that would require a lot of layers and be quite time consuming. I was hoping there might be a more efficient way to do this with an expression that would automate it. Thank you in advance for any help with this.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you very much for your help Mylenium. But isn't that plugin just a more efficient way to browse files in AE?
Copy link to clipboard
Copied
Probably the easiest thing to create that kind of timing scenario would be to create a smooth typewriter effect, then pre-compose, time remap the animated layer, then apply an expression to time remapping to control the timing. Dan Ebberts has an example or two on his website. Look at his audio-counter, or his audio-trigger example, or look down the page on his Expression Speed and Frequency Control page for the streetcar example that uses audio amplitude to retime a movie.
This can be a lot easier if you purchase this script: https://aescripts.com/beatnik/. Dan is the man when it comes to this kind of animation.
I hope this helps.
Copy link to clipboard
Copied
Thanks so much for your help Rick. I'll definitely check that out. Would loopout("offset") be a good "expression to time remapping" choice to use in this case?
Copy link to clipboard
Copied
The trick with something like this is deriving the triggers. You could set up a time-remapped audio layer of a single typewriter keystroke and use a time remapping expression like this to use the Start property in the Typewriter effect's Range Selector to calculate the timing for the sound of each character typed:
T = thisComp.layer("Text");
txt = T.text.sourceText.value;
st = T.text.animator("Animator 1").selector("Range Selector 1").start;
n = txt.length;
delta = (st.key(2).time - st.key(1).time)/n;
if (time >= st.key(1).time && time <= st.key(2).time){
(time - st.key(1).time)%delta;
}else{
0
}
but the sounds will fire off at a very regular, mechanical-sounding rate (and spaces will sound the same as letters). But it might be a good place to start if you're up for a challenge.
Copy link to clipboard
Copied
Thank you very much for your help Dan. I'll be sure to try that out. Thanks again! 😀
Copy link to clipboard
Copied
For setting the audio trigger to individual keystrokes, you might use markers. This would be a pain for long passages, (might be worth just recording someone typing the text you are showing), but fairly easy for a shorter passage.
See this short video: "Link Text Animation to Markers in After Effects" from UKramedia.
Copy link to clipboard
Copied
Thank you very much for your help granth. I'm hoping to use an expression because I have a whole paragraph of text to animate, and manually lining up the typewriter key sound to each character would take quite a long time.