Thanks for that its put me on the right lines now,
This expression is connected to my key frames from the audio i am using.
thisFrame = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
compDuration = timeToFrames(thisComp.duration, fps = 1.0 / thisComp.frameDuration, isDuration = false);
max = 0;
for(i = 1; i < compDuration; i++){
ftt = framesToTime(i, fps = 1.0 / thisComp.frameDuration);
sld = effect("Both Channels")("Slider");
val = sld.valueAtTime(ftt);
if(val > max) max = val;
}
linear(sld, 0, max, 0, 100);
then this is my layer that scales
vol = comp(“music 2”).layer(“Audio Amplitude”).effect(“Final”)(“Slider”);
mlp = thisComp.layer(“Multiply”).effect(“Slider Control”)(“Slider”) / 1000;
[vol, vol, vol * (mlp + 1)]
I know I have one a linear function already but that dose something ells, I want variable ‘vol’ to have the full range but not do anything one it goes be low 15 so I am guessing something like this
linear(vol, 0, 100, 15, 100);
Maybe? Would this have the full range input and limit the output from 15 to 100?
cheers
Paul