8 Replies Latest reply on Apr 23, 2015 10:47 PM by jlewallen18

    Color Filling Over Time Help


      Hello, I am working on an audio template. I am trying to make a waveform similar to the one you can see in Soundcloud. I've managed to program an expression to generate the waveform. But I am having an issue with filling up the waveform with a color with respect to time. For example, do you see on soundcloud how the waveform fills up orange as the song progresses? This is the concept I am trying to work on. Here is what I have so far:



      I want the blue bar to move to the right over time, but I only want the white parts of the waveform to turn blue as it progresses (the rest of the blue solid hidden). How would I go about doing this? My knowledge in After Effects is limited so any help is GREATLY appreciated! Thank you


      Please let me know if you need more information

        • 1. Re: Color Filling Over Time Help
          Rick Gerard Adobe Community Professional & MVP

          I would use the Audio Waveform layer as an alpha track matte for a shape layer with an animated gradient fill.

          • 2. Re: Color Filling Over Time Help
            Mylenium Most Valuable Participant

            Use a duplicate of the waveform/ audio spectrum as an Alpha matte for the color.



            • 3. Re: Color Filling Over Time Help
              jlewallen18 Level 1

              Hey Rick, thanks for the response. I thought of this too. The issue is that I am using an expression on a solid that generates the size of the next block with respect to the Audio Amplitude Keyframe. Therefore, I have about 100 duplicates of the solid to generate that whole waveform. If I duplicated the whole thing again, it just adds on to the end of the existing spectrum thanks to the expression code :/ Here is the code I used: How to generate a static waveform presentation of an audio file. : Adobe After Effects Expressions. Do you have any suggestions to make this waveform easier? Or a different way to make the duplicate waveform/ alpha matte process work?


              Is there a way I can post my project for you to look at?


              Thank you again for your help

              • 4. Re: Color Filling Over Time Help
                jlewallen18 Level 1

                Thanks for the suggestion, please look at my previous response to Rick to see if you have any other suggestions

                • 5. Re: Color Filling Over Time Help
                  Rick Gerard Adobe Community Professional & MVP

                  So just to clarify you are trying to create a levels representation for the duration of an audio file and not an animated audio frequency analysis. If that's what you're doing just pre-compose those hundreds of layers or nest the comp in your main comp and then use the track matte. If it were me I'd probably just import the audio layer into the comp, press the L key twice to reveal the audio wave form, press the ~ key to make the timeline full screen, expand the wave form, take a screenshot, add the screenshot to the comp, apply Keylight, then add a shape layer below the screenshot, set the screenshot as an inverted alpha track matte for the animated gradient and be done with it. This comp would be nested in my main comp to complete the effect.

                  Screen Shot 2015-04-23 at 7.06.48 AM.png

                  If I wanted a different look for the waveform I would edit the screenshot in Photoshop or use a Premiere Pro or any other program to capture a screenshot of the waveform. Since you've done all the work of creating your hundreds of layers I'd just pre-compose them all, drop a shape layer with an animated gradient below the pre-comp and set up the track matte.

                  • 6. Re: Color Filling Over Time Help
                    jlewallen18 Level 1

                    Hey Rick, one last question. Do you know of an expression that would duplicate the solid for me? So instead of having 100+ solid layers, I could have 1 solid layer that duplicates a solid and "offsets" it? Just curious if this is an option since the pre-comp with 100 solids takes quite a long time to render. The above tips were extremely helpful

                    • 7. Re: Color Filling Over Time Help
                      Rick Gerard Adobe Community Professional & MVP

                      You could use this expression on the position property of your first layer to offset duplicates 20 pixels to the right:

                      ofst = index*20;

                      x = value[0] + ofst;

                      [x, value[1]]

                      Add the expression, position the first layer then add your other expression and start duplicating.


                      There is no expression or way to do this on a single layer. You could use 100 rectangles on a single shape layer but the expression for offset would be more complicated.


                      100 Solids that were no bigger than your tallest bar would not much longer to render than a single solid the size of the comp but when you throw in an expression that looks at a different value in time for each copy things are going to slow down considerably.

                      • 8. Re: Color Filling Over Time Help
                        jlewallen18 Level 1

                        Alright, well thank you very much Rick, your help is greatly appreciated. I ended up doing a variation of your idea using Keylight. Saves so much time on rendering!