Place it at the end of a failed attempt, just after the action stops and before any reaction shot, then follow it with the sad violin for a bigger comic fall, or cut straight to a hopeful sound when the joke needs a quick recovery.