ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Make letters react to audio. Advice needed.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Robert Hoisan
Make letters react to audio. Advice needed.
on May 4, 2011 at 4:24:38 pm

Hey!

I got stuck on this one and i hope someone can help me.

I have a text layer (one word), and i need each letter to react independently to an audio layer and to behave like vibrating in z space reacting to the sound. Like pomping out in z when the beats are louder and coming back near to it's original position as the beat sound decrease but if possible in a vibrating manner, like some speakers, but the vibrating speakers are my letters.

I need each letter to vibrate/react in a random order, not the entire word in the same time. First A, C, B, D... as one pops out in z and comes back other letter does the same after.

I was thinking first to separate the word in individual letters so i have a layer/comp for each letter and apply an expression but as i said i'm stuck.

I work on AE CS5 and i have installed the BCC Effects with the Beat reactor and Trapcode Sound keys but i don't use them as often... But i think i can use one of those with better results that the native audio spectrum and to connect my letters to the audio layer somehow using an expression so the letters will react the audio layer in the way i described.

Help please!

Thank you!

Robert Hoisan
Motion Graphics Artist


Return to posts index

Dan Ebberts
Re: Make letters react to audio. Advice needed.
on May 4, 2011 at 7:41:45 pm

Convert your audio to keyframes.
Enable per-character 3D for your text layer.
Add a Position Animator and set the z amount to something (say 200).
Add an Expression Selector.
Deleter the Range Selector.
Add this to the Amount parameter of the Expression Selector:


p = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
threshold = 15;
trig = false;
n = 0;
f1 = 0;
for (f = timeToFrames(); f >= 0; f--){
tCur = framesToTime(f);
v = p.valueAtTime(tCur);
if (trig){
if (v < threshold){
trig = false;
}
}else if (v >= threshold){
trig = true;
n++;
if (n == 1) f1 = f;
}
}
t = trig ? time - framesToTime(f1+1) : 0;

seedRandom(n,true)
curIdx = Math.floor(random(textTotal))+1;
if (textIndex == curIdx){
amp = 100;
freq = 4;
decay = 5;
amp*Math.sin(t*freq*Math.PI*2)/Math.exp(decay*t)
}else
0


Adjust threshold, freq and decay to suit your needs (leave amp at 100).

Dan



Return to posts index

Robert Hoisan
Re: Make letters react to audio. Advice needed.
on May 4, 2011 at 9:55:48 pm

I did all the stuff but it doesn't' seem to work. In the picture attached is the comp with my text layer, the Audio Amplitude null and the audio layer. I copied the expression and paste it.

Ram preview returns no motion. I double checked and cant find where's the problem.

I appreciate some feedback, thanks!



Robert Hoisan
Motion Graphics Artist


Return to posts index


Dan Ebberts
Re: Make letters react to audio. Advice needed.
on May 4, 2011 at 10:03:40 pm

What's the level of your audio where beats occur? The threshold value has to be less than that.

Dan



Return to posts index

Robert Hoisan
Re: Make letters react to audio. Advice needed.
on May 4, 2011 at 10:33:31 pm

I set the threshold to a smaller value, i typed even 2 and still no letter is reacting to the audio. You think anything else is set up in a wrong way? The expression should work but the text doesn't react.

Thanks.

Robert Hoisan
Motion Graphics Artist


Return to posts index

Dan Ebberts
Re: Make letters react to audio. Advice needed.
on May 4, 2011 at 11:20:09 pm

Everything I can see in your screen grab looks correct. I just tried it again, and it works for me. Hard to say what's wrong without seeing it...


Dan



Return to posts index


Robert Hoisan
Re: Make letters react to audio. Advice needed.
on May 4, 2011 at 11:34:09 pm

Ok, thanks very much, i'll look over it later on. As a temporary solution i used the pickwhip now and used the "both channels" slider as a trigger for the "start" of the position range selector of my text.

It works pretty good but i don't have to much control over the expression.




Robert Hoisan
Motion Graphics Artist


Return to posts index

Nikki van Onna
Re: Make letters react to audio. Advice needed.
on Nov 23, 2018 at 6:18:01 pm

I know it's been a while ago since you posted this, but I'm having exactly the same problem as you had.
I also followed all the steps Dan described, but no luck here too. ☹
Did you finally solve it?

Any advice would be much appreciated!

Thank you.
Nikki


Return to posts index

Jesse Forsell
Re: Make letters react to audio. Advice needed.
on Oct 2, 2012 at 12:10:30 pm

Thank you. Old post worked as a charm ;)

Will tweak and play around a bit with it and maybe make some color particles flying around too


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]