'After Effects Scripting - Set ease() for slider

I have an Audio Amplitude layer in After Effects and I want to programmatically add the following expression to the "Both Channels" slider:

ease(value, 40, 55, 0, 10)

Manually, the expression looks like this: Example of slider expression

I tried to execute the following code, but unfortunately, KeyFrameEase only accepts two arguments.

var channelSlider = amplitude.Effects.property("Both Channels").property("Slider");
for(var i = 1; i < channelSlider.numKeys; i++){
   var easeIn = new KeyframeEase(40,33.33333);
   var easeOut = new KeyframeEase(40,33.33333);
   channelSlider.setTemporalEaseAtKey(i, [easeIn], [easeOut]); 
}

How can I add the ease(t, tMin, tMax, value1, value2) expression to the slider using After Effects scripting?



Solution 1:[1]

Found it:

channelSlider.expression = "ease(value, 40, 55, 0, 10)";

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pjotr Mega