Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Colour that changes when the bass from the music hits

  • Colour that changes when the bass from the music hits

    Posted by Jonathan Sikkema on July 27, 2015 at 2:50 pm

    Hello people off the internet 🙂

    I want to make something but i dont know how…
    I will post a video link so you know what i mean: https://www.youtube.com/watch?v=MPI9kdP6n6o

    I can make the spectrum and everyting else accept that color changing on the music. Can someone help me with that?? 🙂 I have adobe after effects CS6

    Have a great day and thanks in advance.

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    John Cuevas replied 11 years, 1 month ago 3 Members · 4 Replies
  • 4 Replies
  • Richard Herd

    July 27, 2015 at 10:03 pm

    That requires an expression from the math and design guru, Dan Ebberts.

    By DAN EBBERTS
    //change colors to the beat

    threshold = 10.0;

    colors = [[255,205,47,255]/255,[213,116,45,255]/255];

    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–
    }

    colors[n%colors.length]

  • Jonathan Sikkema

    July 27, 2015 at 11:26 pm

    Thanks for the reply!

    I am trying to figure out how it works but till now i havent done that yet…
    Can u say me what i need to do so i can get it to work??

    Thanks in advance!

  • John Cuevas

    July 28, 2015 at 2:51 pm

    Seems to be a line missing from the expression that Dan originally posted. To use this expression, you need to select your audio layer, go the “Animation” drop down > Keyframe Assistant > Convert Audio to Keyframes. That will drive your color changes.

    Then add a fill to your spectrum, alt + click the color stopwatch and add this expression. In my example I have it set to 3 colors, RGB, you can add more colors by adding a “, [0,0,255,255]/255]” to the end of the expression, just make sure you take the last bracket ] off the previous color.

    threshold =10.0;

    colors = [[255,0,0,255]/255,[0,255,0,255]/255, [0,0,255,255]/255];

    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--
    }

    colors[n%colors.length]

    Johnny Cuevas, Editor
    ThinkCK

    “I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
    —THOMAS EDISON on inventing the light bulb.

  • John Cuevas

    July 28, 2015 at 2:54 pm

    Here’s a simple project(minus the audio) that shows how you place the effect and expression.

    9088_audiobeatexrpession.aep.zip

    Johnny Cuevas, Editor
    ThinkCK

    “I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
    —THOMAS EDISON on inventing the light bulb.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy