What you are describing (reading audio amp values at periodical time intervals) doesnt look too good, not very convincing motion. It can be written like this:
var sc = transform.scale // the keyframe value of the scale
var T = 0.50 // the period at which the audio amp is read
var t = time-(time%T);
var audioAmp = thisComp.layer(“Audioamplitude 2”).effect(“Beide Kanäle”)(“Schieberegler”).valueAtTime(t);
var extra;
if (audioAmp>=20) extra = 60;
else if (audioAmp>=10) extra = 30;
else extra = 0;
sc +[0,easeOut(time-t, 0,T, extra, 0)];
————
I would like to suggest another expression but for some reason it won’t copy in the browser; part of the code is being chunked out, even if i copy it in the “code” box. Sorry.
Xavier.