Copy link to clipboard
Copied
why may expression curVal in not define ?
Copy link to clipboard
Copied
You have not entered any meaningful information at all in the interpolation method. You can't possibly have any success using expressions unless you get some training. Start right here on the forum with the Getting started with After Effects expressions thread. This is your third post about expression problems and all of them tell me the same thing. You need to do some homework.
Copy link to clipboard
Copied
As Rick said, your expression does nothing. Variables are not values. If it wasn't curVal, then min,max,valueMin and valueMax would equally still be undefined. It seems you don't understand how AE expressions work at all and are simply copy&pasting stuff you find on the Internet. This just cannot get you anywhere. I can only second what Rick said - time to study up.
Mylenium
Copy link to clipboard
Copied
I wrote the expression ease (curValue, min, max, valueMin, valueMax) to do the parent on layer soundkeys, to adjust the shape according to the change in sound value on my track that I set from 0 to 1 and this is what I mean in my expression. is curValur useless in the expression after effect?
Danmaniel
Copy link to clipboard
Copied
curValue, min, max, valueMin, and valueMax are not part of the expression language. They are variable names of variables that need to be defined within your expression before ease() will do anything at all.
Dan
Copy link to clipboard
Copied
Maybe this will help you figure out what is going on:
// ease is an interpolation method
// ease(t, tMin, tMax, value1, value2) is just the way the method is organized
// you have to define t by linking it to a property that changes value over time
// the property you define as t cannot be an array - if it is you have to extract one of the values in the array before you can use it
// you have to set tMin and tMax to the minimum and maximum value for the "t" property
// you have to set value1 and value2 to the new corresponding minimum and maximum values you want the ease method to return
// an expression that do anything must define t and set tMin, tMax, value1 and value2 to do anything
You have attached the ease interpolation method to the Amplitude property of the Fractal parameter in the MIR effect applied to Layer 5 but you have not linked to any other property and you have set no values. When you changed the names inside the operator, which is everything enclosed in parentheses, you did not supply any useful values to the equation so you received an error.
If you wanted to drive the Amplitude of the Fractal parameter by an audio track and you wanted the minimum Amplitude property to be 10 and the maximum value to be 200 then you would need to convert the audio to keyframes, point to the thisComp.layer("Audio Amplitude").effect("Both Channels)(slider). You would also have to look at the minimum and maximum values for the Both Channels Slider property and enter appropriate values there.
The expression would look like this:
t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
ease(t, 0, 50, 10, 200)
I can also see that you are using Trapcode Sound Keys. This effect generates an output that is much more controllable than the Convert Audio to Keyframes tool in the Keyframe Assistant. All you have to do is set a custom range, adjust the frequencies you want, then simply drag the pickwhip from the Fractal>Amplitude property to the Output 1 property in your Sound Keys layer. There is no need to setup interpolation. If you added sound keys to a layer called Control then the expression would simply be a link to that layer and it would look like this:
thisComp.layer("Control").effect("Sound Keys")("Output 1")
Like we have said before, it's nearly impossible to learn AE without spending some time with the user guide. Not one thing in any of your posts gives me any conficence that you have read anytnhing about expressions.