Skip to main content
Known Participant
September 7, 2018
Answered

Audio and Opacity expression error AE

  • September 7, 2018
  • 2 replies
  • 2587 views

Hello, I am trying to make a particles video to react at audio with an expression, but, when I use the expression to the particles video, it doesn't work, gives error. If I use the expression with a solid, it works. Where is the problem?

I have a video to show you:  Example - YouTube

    This topic has been closed for replies.
    Correct answer OussK

    Exactly it look like your expression is correct, so as a quick solution create new solid or null and  hide it (remove the eye on the left)

    apply your expression to this solid (it must work) than link the opacity of the particles video to the opacity of the solid or null you created.

    i know it's not the best scenario but it must help

    2 replies

    OussK
    Community Expert
    OussKCommunity ExpertCorrect answer
    Community Expert
    September 7, 2018

    Exactly it look like your expression is correct, so as a quick solution create new solid or null and  hide it (remove the eye on the left)

    apply your expression to this solid (it must work) than link the opacity of the particles video to the opacity of the solid or null you created.

    i know it's not the best scenario but it must help

    Community Expert
    September 7, 2018

    The error is in line 11 and because the spacing in your expression on the forum is different than the spacing in AE I can't count the lines. If just copying the expression from a layer that is working does not work on the video layer then there is something else going on in the layer. Try pressing the U key twice to reveal all modified properties of the layer and start turning things off or resetting the properties until you find the problem.

    AndrewL32Author
    Known Participant
    September 7, 2018

    Thanks for the help!

    Mike_Abbott
    Legend
    September 7, 2018

    This basic linear interpolation expression should work on your video. For clarity can you copy and paste the full expression here - it'#s hard to see the whole expression on your video.

    Does it work if you apply it to a different video layer?

    AndrewL32Author
    Known Participant
    September 7, 2018

    This is the expression:

    audio = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

    audioMin = 0;

    audioMax = 75;

    opacityMin = 30;

    opacityMax = 100;

    linear ( audio, audioMin, audioMax, opacityMin, opacityMax)

    No, I tried, if I use the expression with another video, it gives the same error.

    Mike_Abbott
    Legend
    September 7, 2018

    It all looks OK to me...