FORUMS: list search recent posts

Sequence Layers to automatically fill length of audio layer?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kevin Reiner
Sequence Layers to automatically fill length of audio layer?
on Feb 13, 2013 at 5:46:04 am

Hey all,

I thought I saw a script once on AEscripts that would sequence a set of layers to add up to a predetermined length. I know how to do the "sequence layers" under the Animation menu, but I always end up using a lot of trial and error. What I want to be able to do is select 25 layers and say sequence these with 10 frame dissolves and come out being 2:55 in total length.

Does this exist or is there another way? Just trying to speed up my workflow.

-Reiner

Mac Pro 2 x 3 GHz 6-Core Intel Xeon
32GB Memory
Dual-channel 4Gb Fibre Channel PCI Express card
Dell Display (23" flat panel)
ATI Radeon HD 5770
AJA Kona LSi SD/HD capture card
Rourke 16 TB
Flanders 2460

SOFTWARE
Mac OS X 10.6.5
FCP 7
After Effects CS5
Boris Continuum
Sapphire Plug Ins
All Trapcode Plugs
Zaxwerks Invig


Return to posts index

Scott McDonnell
Re: Sequence Layers to automatically fill length of audio layer?
on Feb 13, 2013 at 9:47:46 am

With scripts I always start out working out how I do it manually. Then working out how much time it would save to do it by script (and balance that against the time to write the script!).

So if I get you right you want a length of 2:55 and I am guessing a framerate of 25fps? Then you have (2x60+55)*25=4375 frames divided by your 25 layers = 175 frames each if they are to be evenly spread across time + 10 frames for your dissolve and you get 185.

To set up manually you could:
1. Go to frame 0, select all layers and hit "[" to make sure they start at frame 0.
2. Go to frame 185, select all layers and hit "ALT + ]" to cut all layers at 185.
3. Choose Animation -> Keyframe Assistant -> Sequence Layers...
4. Check overlap and duration of 10 frames and OK.

Would that give you what you are looking for?


Return to posts index

Kevin Reiner
Re: Sequence Layers to automatically fill length of audio layer?
on Feb 13, 2013 at 12:53:40 pm

Thanks for the reply Scott,

Yes, that is how I would do it manually as well. I should have made it clear that I was just throwing out a random time span. I'd like to have it do the calculation automatically to any time span.

I often get asked to make quick slideshows (always with different pics and a different music track). This is mostly for friends and family, mind you. I'd love to automate the process as I have less and less time to help with these gift projects.

And I know there are a lot of consumer apps that do this, but I've been on AE for 12 years and feel most confident if I could find an Adobe workflow. I already have a PS action that preps all of the slides for size and basic color correction. Now I just want to speed up the AE side of things.

-Reiner

Mac Pro 2 x 3 GHz 6-Core Intel Xeon
32GB Memory
Dual-channel 4Gb Fibre Channel PCI Express card
Dell Display (23" flat panel)
ATI Radeon HD 5770
AJA Kona LSi SD/HD capture card
Rourke 16 TB
Flanders 2460

SOFTWARE
Mac OS X 10.6.5
FCP 7
After Effects CS5
Boris Continuum
Sapphire Plug Ins
All Trapcode Plugs
Zaxwerks Invig


Return to posts index


Scott McDonnell
Re: Sequence Layers to automatically fill length of audio layer?
on Feb 13, 2013 at 4:22:23 pm

You could write a spreadsheet formula to do the calculation automatically for you. It would be a lot quicker than writing a script.

I can't think of any existing script that does what you are looking for so you could roll your own custom script. You will need a javascript UI for entering in the total time and overlap - see the AlertBoxBuilder1.jsx for an example of collecting data from user input. This may or may not be your idea of time well spent!


Return to posts index

Kevin Camp
Re: Sequence Layers to automatically fill length of audio layer?
on Feb 13, 2013 at 7:29:17 pm

this expression will do it -- of course expressions will increase render time, though it may not be by too much unless you have many many layers.
dissolve = 10; // value in frames

dur = thisComp.duration / (thisComp.numLayers-1);
inT = dur*(index-2);
outT = dur*(index-1)+framesToTime(dissolve);
if (time >= inT && time < outT){
if (time >= outT-framesToTime(dissolve)) linear(time,outT-framesToTime(dissolve),outT,100,0) else 100;
}else{
0;
}

i assumed the music would be the duration of the comp, so it bases the duration of each slide from the duration of the comp.

the expression also assumes the music would be the first (top most) layer and that the slides are the remaining layers. if you have other layers (perhaps adjustment or text layers), then you'd need to adjust the expression or convert the expressions to keyframes and then add the other layers.

if this works for you, you can simply create an animation preset for it and call it up whenever you needed it.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Kevin Camp
Re: Sequence Layers to automatically fill length of audio layer?
on Feb 13, 2013 at 7:41:44 pm

i should have mentioned, the expression would go in the opacity property.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

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