I want my rotation to switch between 5 degrees and -5 degrees every frame, but then in the course of 24 frames I want that number to slow down to 0. So 5 becomes 4 becomes 3 becomes 2, etc. In essense I'm creating a shaking/buzzing image...how can I do this?
Add a Slider Control to your layer. Call it something like Degree Control.
Option- (or Alt-) click on the stopwatch for Rotation. Add the following expression:
angle=effect("Degree Control")("Slider"); //feel free to pickwhip this
Now add keyframes for Degree Control for your maximum and minimum rotation at the points in time you want them to be. In your case, 5 degrees at 00:00 and 0 degrees at 00:24.
Math.sin will bounce between the positive and negative values of the Degree Control. You can speed up or slow down the rotation by changing the number for frequency in the second line.
This won't give you EXACTLY 5 degrees, then 4 degrees, then 3 degrees, etc. but it will give you a decaying oscillation, which seems to be what you want. I'm a bit of an expressions newbie myself, so there's no doubt a more elegant solution, but this should get you rolling.