5 Replies Latest reply on Aug 5, 2017 10:39 PM by jose angelg35587819

    expresiones para opacidad sin variaciones

    joser24077220

      buenos días a todos. espero puedan ayudarme con esta duda.

      no se mucho de after effects, así que tratare de ser específico.

      lo que intento hacer es trabajar con la opacidad del espectro de audio.

      usando la amplitud de audio(la que se genera convirtiendo el audio en fotogramas clave), lo que quiero hacer es que de acuerdo a la variación de la amplitud de audio quiero que la opacidad vaya desde 0 a 100, pero lo que hace es variar entre 0 y 100. yo quiero que solo se mueva de esos dos puntos 0 y 100. para que cuando el audio suene la opacidad vaya al 100 y cuando no haya nada o casi nada desaparezca.

      espero me puedan comprender. lo e intentado con wiggle pero solo hace variaciones.

      saludos y gracias por responder.

       

      [Moved from After Effects to After Effects Expresssions - MOD]

        • 1. Re: expresiones para opacidad sin variaciones
          Roei Tzoref Adobe Community Professional

          o.k but a warning: I am far from an expressions expert. here goes (hope this will translate nice for you!)

           

          if you want to control the audio waveform amplitude you need to decide what is the low value for you and what is the high. you can do that with the graph editor. on the both channel parameter look at the value graph and decide what is for you the minimum and maximum.

           

          for example my graph looks like this and I decide for myself for a threshold for the opacity

          for example I want that if the value is higher than 4, my opacity will be 100%. and if it's lower - 0%

           

          I need to select my opacity layer and create an if function expression on the opacity value that looks like this:

          if(thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider")>4) 100 else 0

           

          see if that works for you!

          1 person found this helpful
          • 2. Re: expresiones para opacidad sin variaciones
            Mylenium Most Valuable Participant

            I want to only move those two points 0 and 100

             

            Math.round(amplitude/100)*100

             

            Mylenium

            • 3. Re: expresiones para opacidad sin variaciones
              Roei Tzoref Adobe Community Professional

              Hey M how are you . I tried this so this on the opacity: Math.round(thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider")/100)*100 after putting linear on the amplitude: linear(value, 0, 10, 0, 100) and it seems what math.round does is that if the value is above 50 it makes it 100 and if it's below it's 0. is that it? wouldn't my expression be more accurate to create the variables exactly that control when is the value 0 and when is 100 instead of the 50 threshold? also only one expression instead of two. what do you think?

               

              • 4. Re: expresiones para opacidad sin variaciones
                Mylenium Most Valuable Participant

                No idea. The description is too vague to realyl make sense of it. Just let the user decide what suits his needs.

                 

                Mylenium

                • 5. Re: expresiones para opacidad sin variaciones
                  jose angelg35587819

                  Hello, your post was extremely helpful for me too, but I want to do something similar but with the tool degraded, for when there is a high level the gradient comes up complete and when it does not come down, it will be that you can help me, sorry for the English I had translate it