Because AE recalculates expressions on each frame a really smooth ramp up and down for wiggle is actually pretty difficult. Dan Ebberts wrote a brilliant expression though that does exactly that though, create smooth ramps up and down for wiggle.
Create a null and add 2 sliders and name them Frequency & Amplitude. Add this expression to the position property of your null and then parent the camera position to the null so that the wiggle is added to it. Just keyframe the null and you are all set:
freq = effect("Frequency")("Slider");
amp = effect("Amplitude")("Slider");
if (freq.numKeys > 0){
accum = 0;
v0 = freq.valueAtTime(0);
t0 = 0;
i = 1;
while (i <= freq.numKeys){
t = freq.key(i).time;
if (t < time){
accum += (v0 + freq.key(i).value)*(t - t0)/2;
v0 = freq.key(i).value;
t0 = t;
if (i == freq.numKeys){
accum += (time - t0)*v0;
}
}else{
accum += (freq + v0)*(time - t0)/2;
break;
}
i++;
}
}else{
accum = freq*time;
}
wiggle(1,amp,1,.5,accum);
Johnny Cuevas, Editor
Thinkck.com
“I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
—THOMAS EDISON on inventing the light bulb.