# AE ENHANCERS

Expressions/Scripts/Presets
 It is currently Wed Jun 19, 2013 12:59 am

 All times are UTC - 8 hours [ DST ]

 Page 3 of 3 [ 38 posts ] Go to page Previous  1, 2, 3
 Print view Previous topic | Next topic
Author Message
 Post subject: Re: To rhythm a video according to a soundPosted: Tue Mar 18, 2008 6:43 pm

Joined: Tue Mar 18, 2008 6:22 pm
Posts: 2
I know this is quite an old post, however I signed up for this forum because I've gotta say this expression has blown my mind. Check out this video I made with it last night, also tying in opacity to certain keys:

I haven't really played around too much with expressions but I'm obsessed now. I wish I'd taken more math in school, but I'm going through tutorials now. this is obviously a rough video and next I'm going to plug in this expressions to trapcode Form / Particular, I'm looking forward to seeing what it can do.

I also have a question - could anyone kind of break this expression down into what it's doing? how would I go about modifying the "default" playback rate or adding my own mods to it?

Top

 Post subject: Re: To rhythm a video according to a soundPosted: Wed Mar 19, 2008 9:32 am
 Enhancement master

Joined: Thu Jun 17, 2004 9:27 am
Posts: 456
Location: New York City, NY
I didnt write this expression, but I will try to break it down based on just looking at it.. the calculations get a little hard to follow but hopefully it will help you on your quest to understand what is happening.

-Lloyd

Code:
t=timeToFrames(inPoint);  //convert the inPoint from time to frames and set it to the variable t
i=0;  // initialize variable i

// this while loop says that as long as the current time (converted to frames)
// is greater than or equal to the inPoint (t); it should continue processing
while(timeToFrames() >= t)
{
min=effect("frequence min")(1).valueAtTime(framesToTime(t));  //define the min freq value, read the value at time t
max=effect("frequence max")(1).valueAtTime(framesToTime(t));  //define the max freq, read the value at time t
a=effect("frames")(1).valueAtTime(framesToTime(t)); //define a as the frame at time t
f=thisComp.layer("Audio Amplitude").effect("Both Channels")(1).valueAtTime(framesToTime(t));  //read the amplitude value at time t

// if the amplitude is greater than or equal to the min freq and lesser than or equal to the max freq
// then i should be incremented by 1 minus a which is the frame at time t
if(f>=min && f<=max){i+=1-a}

}
timeRemap.valueAtTime(time-framesToTime(i))   // subtract the time of frame i from the current time and display the resulting frame

_________________
http://aescripts.com

Top

 Post subject: Re: To rhythm a video according to a soundPosted: Wed Mar 19, 2008 12:19 pm

Joined: Mon Jul 12, 2004 4:35 pm
Posts: 9
Location: Paris
Hi FStop,
Bravo for your video, the result is nice .
My English is not very good, that's why I don't often speak in this discuss.
__________________________
http://oscarvideo.free.fr

Top

 Post subject: Re: To rhythm a video according to a soundPosted: Wed May 07, 2008 3:28 pm

Joined: Tue Mar 18, 2008 6:22 pm
Posts: 2
Hey, you guys might enjoy this one too, I've refined it a little bit and figured out how to get multiple eq bands for several trigger points. this one's just using three; bass, piano and snare affecting camera position, time remapping and shine, respectively. The footage is from night of the living dead.

again thanks for your work oscarus!

in reference to someone who asked me a question on youtube - all you'd need to do to let your audio keys trigger opacity or gaussian blur is the following expression, modified for your effects. copypasta the expression to your effect, then highlight the red text and pickwhip to the sound keys output layer.

put this expression in Opacity/Blur/etc amount:
x=thisComp.layer("Audio Amplitude 1").effect("Output 2");
linear(x,11,25,1,100)

the linear expression basically converts between value scales. What this is saying is that when a graph of the audio output goes between 11 and 25, the opacity will fade from 1 to 100 in a linear manner. you can also use ease(X,1,2,3,4) for a falloff curve

You can do almost anything with this, including converting between x,y values or camera rotational position.

Top

 Post subject: Re: To rhythm a video according to a soundPosted: Tue Apr 20, 2010 11:10 am

Joined: Mon Jul 12, 2004 4:35 pm
Posts: 9
Location: Paris
Hello, I modified lightly my expression that we obtain a best result, easier and faster !
I changed my approach, rather than to examine music by fame as in the previous expression, I divided by level and the expression is far more effective. I made a tutorial (in french) in which I explain how this new expression and how proceed quickly to get a good result. You can watch here :http://www.weecast.fr/after-effects/rythmer-une-video-en-fonction-dun-son-after-effects,9144.html

Top

 Post subject: Re: To rhythm a video according to a soundPosted: Wed Jul 21, 2010 6:07 pm

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
@Llyod: So how do I use this expression?

Do I place it in a time remap field?

I discovered that I need to create 3 slider controls frequence min, frequence max, and frames. How do I use them? Is the frequency in hertz? What is frames for?

...Meanwhile...

After reading higher up in the threads, I got to this page 3 via a search, I gain a bit more understanding about the expression. frequency min and max are really misleading. They should be labeled amplitude min and max because they have nothing to do with the frequency of the wave file.

I still find this expression a bit difficult to tame. I am audio engineer so I have some really clean high end audio files, but I can't get smooth motion out of this beast.

I set my min and max values based upon the values I see in the Audio Amplitude graph channel and I set my frames to -3. I do get an effect, but it is not great.

What is the trick?

_________________
"Up And Atom

No...No

Up And At Them!"

Top

 Post subject: Re: To rhythm a video according to a soundPosted: Thu Jul 22, 2010 9:07 am

Joined: Mon Jul 12, 2004 4:35 pm
Posts: 9
Location: Paris
Hello Atomic ,
You're right, the word frequency has been badly chosen, and I actually use the max and min amplitude. I improved the expression for the result is easy to tame, I explained in my tutorial videos here: http://fr.tuto.com/after-effects/rythme ... ,9270.html
Or here: http://fr.tuto.com/after-effects/rythme ... ,9144.html
Oscarus
-------------------------------------------------- ------------------------
Site: http://oscarvideo.free.fr
email: oscarvideo@free.fr
tel: 0164221523
-------------------------------------------------- ------------------------

Top

 Post subject: Re: To rhythm a video according to a soundPosted: Mon May 02, 2011 6:13 am

Joined: Tue Apr 19, 2011 7:51 am
Posts: 1
oscarus wrote:
Hello Atomic ,
You're right, the word frequency has been badly chosen, and I actually use levitra the max and min amplitude. I improved the expression for the result is easy to tame, I explained in my tutorial videos here: http://fr.tuto.com/after-effects/rythme ... ,9270.html
Or here: http://fr.tuto.com/after-effects/rythme ... ,9144.html
Oscarus

That was ver interesting to watch, really knowlegeble.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 3 of 3 [ 38 posts ] Go to page Previous  1, 2, 3

 All times are UTC - 8 hours [ DST ]

#### Who is online

Users browsing this forum: No registered users and 0 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Announcements    Announcements Expressions    Expressions Library    Expressions Tutorials    Expression Discussion Scripts    General Scripts Library    Script Tutorials    Scripts Discussion    Script requests User Scripts    Paul Tuersley's Scripts    Impudent 1's Scripts Animation Presets    Animation presets Library