Creating reactions to the Audio Levels keyframes is best handled by deciding what range of values you want to work with and then converting the Audio Levels keyframe values to fill the range of values you want as the last result. A linear interpolation method is usually the place you want to start.
If the range of your Audio Levels keyframes if from 0 to 18, and you want to change another value from 20 to 200, and you want the reaction to the changing values to start at 2 and reach the maximum at 6, the expression to do that would look like this:
t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
v = linear(t, 2, 18, 20, 200);
[v, v]
The output will be 20 until the audio amplitude reaches 2, then it will expand in a linear method to 200 when the audio amplitude reaches 6 and never go higher than 200. The linear method looks like this: linear (t, tMin, tMax, value1, value2)
If you want a more exponential expansion of the values, you can do a little math and multiply the value by some power. You just have to work backward from the maximum ending result. For example, if you still wanted the maximum value to be 200 but you wanted exponential scaling, then the square root of 200 would be the value2 maximum value. The new expression would look like this:
t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
v = linear(t, 2, 18, 1, 14.1421356237);
nV = Math.pow(v, 2);
You don't need the array if you apply the value to rotation. You can also change the exponent in Math.Pow(v, 2) to 1.2 or some other value to get the results you want.
