FORUMS: list search recent posts

Produce particles to a beat?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Spencer Beeson
Produce particles to a beat?
on Nov 20, 2017 at 7:11:01 pm

Hello,
I'm currently trying to find a way to make a burst of particles happen at every beat in a song. I found a way to make just a few particles spray out at the beat, but its not many, and it's a stream not a burst. I tried to make it happen with the "explode" option in trapcode particular, but it only produces once.
Any ideas?


Return to posts index

Kevin Camp
Re: Produce particles to a beat?
on Nov 20, 2017 at 9:00:36 pm

you may have done this already, but select the track with the audio/music and then choose animation>keyframe assistant>convert audio to key frames. this will create a new layer with the audio levels saved as keyframe values.

for the emitter (or producer), you can add an expression for birthrate to use the audio level keyframe values. something like this will give you control over the audio threshold to start emitting the particles and the birthrate for the burst:
levels = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
birthrate = 100;
threshold = 10;
if ( levels > threshold ) birthrate else 0;

modify the birthrate and threshold values as needed.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Spencer Beeson
Re: Produce particles to a beat?
on Nov 20, 2017 at 10:53:08 pm

Thank you very much this is exactly what I needed. I know this might be a bit advanced for me, but is there a way to have two emitters that alternate emissions to the beat?


Return to posts index


Kevin Camp
Re: Produce particles to a beat?
on Nov 21, 2017 at 8:09:02 pm

i think you could use Dan Ebbert's beat counter expression to separate even numbers beats from odd beats.

try this:
threshold = 10.0;
birthrate = 100;
audioLev = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
above = false;
frame = Math.round(time / thisComp.frameDuration);
n = 0;
while (frame >= 0){
t = frame * thisComp.frameDuration;
if (above){
if (audioLev.valueAtTime(t) < threshold){
above = false;
}
}else if (audioLev.valueAtTime(t) >= threshold){
above = true;
n++;
}
frame--
}
if ( n % 2 == 1 && audioLev > threshold ) birthrate else 0;

that should count the odd beats. for even, change the last line to:
if ( n % 2 == 0 && audioLev > threshold ) birthrate else 0;

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Spencer Beeson
Re: Produce particles to a beat?
on Nov 23, 2017 at 7:39:36 am

Thanks so much for all the help!


Return to posts index

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