• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Text character to trigger a keyboard sound

New Here ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

I have a text layer in After Effects that I’m animating using a type writer effect and  a keyword sound manually matched to the individual characters showing up on screen to make it sound as isf some one was typing them.

Yes, it is a tideous work!

I’m thinking surely there must be a way to maybe make these individual character trigger a sound from another comp instead.

I literally vacuumed the Internet but all I find is the opposite - sound to control wave forms among others which is not what I’m looking for.

There is also suggestions to use text to speech apps, but the speech would then need to only have one keyboard stroke sound in it. Maybe that would work but I’d rather have it made inside of After Effects if possible.

Is there a solution?

Views

3.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 08, 2019 Apr 08, 2019

It would help if we could see your comp with the modified properties of the layer you are using revealed.

If I were doing the project I would animate a range selector by letter. I would put the sound its own layer trimmed to just the length of the click. Then I would apply Time remapping, apply a loopOut expression and set up the time remapping keyframes so that the clicks happened at a specific number of beats per minute.

Now you have two sources, a typewriter effect that you can control by the

...

Votes

Translate

Translate
Mentor ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

You can put the audio into a precomp and add a slider to it named "letterfps" for example.

Next you activate time-remap and put an expression to it:

letterfps = Math.floor(thisLayer.effect("Slider Control")("letterfps"));

t = timeToFrames(time) % letterfps;

This will repeat the audio every x frames, depending on what you set up the slider. It will cut off the audio, if the audio is longer than the frames you have set up (audio 10 frame, letterfps set to 5 frame = audio cut off and repeat after 5 frames).

You can try to animate the slider, if the typewriter isn't linear (faster and slower writing).

To increase automation, you'll need to look at the effect. There are selectors - start and end I think - and those numbers are in interest. You could analyze the numbers, calculate the increasing of the start selector and trigger a sound when it's happening. But to play the sound is a bit triggy this way and will return in slow processing code, especially on long comps.

*Martin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 09, 2019 Apr 09, 2019

Copy link to clipboard

Copied

@martinr84659894
Thank you so much for a quick answer.
I realise that my skill in understanding expressions is at a lower level so I might have to dive in to understand the syntax a bit more.

I tried to follow the instructions as far as my understanding goes but I get this error message:Screen Shot 2019-04-09 at 10.58.46.png

This is what I did:
Screen Shot 2019-04-09 at 11.00.41.png
The sound I'm using is only 1 frame plus a pause of one, but I guess it would not be a problem:Screen Shot 2019-04-09 at 11.08.28.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2019 Apr 08, 2019

Copy link to clipboard

Copied

It would help if we could see your comp with the modified properties of the layer you are using revealed.

If I were doing the project I would animate a range selector by letter. I would put the sound its own layer trimmed to just the length of the click. Then I would apply Time remapping, apply a loopOut expression and set up the time remapping keyframes so that the clicks happened at a specific number of beats per minute.

Now you have two sources, a typewriter effect that you can control by the keyframing of the range selector to make the letters type on, and a soundtrack that will last as long as you need it to last. The easiest thing to do would be to adjust the position of the third - the pause keyframe, in the click audio track so the timing matches. This will give you constant rate characters appearing and keys clicking sound effect in one comp.

Screenshot_2019-04-08 15.53.27_MAXU6Q.png

Once you get the loop out expression in the audio layer you can press the L key twice to reveal the waveform to help you line up the timing.

To adjust the final timing, because Pitch is probably not that critical, you could pre-compose both the text layer and the looped audio layer and apply time remapping to the pre-comp so you could make letters type on faster at one point and slower at another. As long as the timing is fairly consistent it should be pretty easy to set up.

That's the first simple idea that I came up with. To keep the pitch consistent and play an audio track every time a letter appears would take an expression that it would take me a while to come up with, but it would be driven by the index number of the letters in the text animator.

Maybe this will give you some ideas. If you are lucky enough to have Dan Ebberts drop by he could probably write that expression off the top of his head.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 09, 2019 Apr 09, 2019

Copy link to clipboard

Copied

Rick Gerard
Thank you so much!
I will try your suggestion and see if it'll do the trick.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 09, 2019 Apr 09, 2019

Copy link to clipboard

Copied

Oh, and the screen dump of the project with the manually positioned key stroke sounds:
Screen Shot 2019-04-09 at 11.29.44.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 09, 2019 Apr 09, 2019

Copy link to clipboard

Copied

Sorry, my fault! I always mess the syntax for sliders, because I pig-whip them in most cases.

letterfps = Math.floor(thisLayer.effect("letterfps")("Slider"));

t = timeToFrames(time) % letterfps;

This should work - if not, pig-whip the slider.

You can choose Ricks solution and remake the typing-timing with time remap as he suggested - or take my solution and keyframe the slider.

*Martin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2019 May 09, 2019

Copy link to clipboard

Copied

LATEST

Thank you Rick! You were both right but I chose to go with your solution.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines