Don't confuse pre-ignition with detonation.
Pre-ignition happens when something in the combustion chamber causes the air fuel mixture to ignite before the spark. This is more damaging than detonation.
I believe the rattle you are talking about is detonation. This is when the fuel air mixture combusts too fast. This can be from to much advance, too low an octane, among other things.
Detonation and Pre-Ignition