Activity › Forums › Adobe After Effects › Produce particles to a beat?
-
Produce particles to a beat?
Posted by Spencer Beeson on November 20, 2017 at 7:11 pmHello,
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?Spencer Beeson replied 8 years, 9 months ago 2 Members · 4 Replies -
4 Replies
-
Kevin Camp
November 20, 2017 at 9:00 pmyou 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 -
Spencer Beeson
November 20, 2017 at 10:53 pmThank 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?
-
Kevin Camp
November 21, 2017 at 8:09 pmi 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
Reply to this Discussion! Login or Sign Up