-
A way to divide numbers between positive and negative
So, I have an audio keyframes slider, and it generates only positive numbers as usual. But for animation purposes, I would like to “spread” this values between positive and negative range, so lets say hypothetically the max value the audio generates in the sslider convertion is 25 and the minimum is 0, I want to trasnform it in max = 12,5 and min = -12,5.
Normaly I would simply use the follow expression:
var pos = effect(“Slider Control”)(“Slider”);
var neg = -effect(“Slider Control”)(“Slider”);
value = -12.5+posBut since I dont know the real max value it reaches and it is a really long track that may change in future uses, I would like to know if there is an expression that does the deal of “spreading” the values equally between positive and negative, or maybe a way to figure out/collect the max value of the slider so I can put it on a var.
Any help is much appreciated! I’ve been researching it for a while, but found nothing.