Discussion:
Wiggle effect between two values?
(too old to reply)
N***@adobeforums.com
2008-11-06 19:09:12 UTC
Permalink
I'm trying to wiggle an effect slider between -80 and -10. I was trying to use Dan's Wiggle Within Range expression, but I'm getting an error it's only for 2D spacial arrays. How do I use this for slider (1D?) controls?

freq = 2; // wiggles per second
amp = 100;
minWiggle = -80
maxWiggle = -20;

w = wiggle(freq,amp)[2] - value[2];
value + [0, 0, linear(w, -amp, +amp, minWiggle, maxWiggle)]
D***@adobeforums.com
2008-11-06 23:11:21 UTC
Permalink
Try this:

hi = -20;
lo = -80;
freq = 2;
amp = Math.abs(hi - lo)/2;
offset = (hi + lo)/2;

wiggle(freq,amp) + offset

Dan
N***@adobeforums.com
2008-11-10 23:26:25 UTC
Permalink
Once again, Dan is the man! Thank you very very much!

Loading...