My first guess without actually being there is that the belt tensioner shock bushing has worn out to the point that the shock is just banging around where it mounts...
...the noise (which most describe as a connecting rod about to self-destruct) usually occurs at idle, but disappears when the car is in motion.
If it is indeed the belt tensioner, then you can push against the shock mount and the noise will immediately disappear. Then you're talking about a costly $2.00 repair for replacing the worn bushing!