So-called drumming on a tree is often used as a territorial call among different species of woodpeckers. I remember coming across a Red-breasted Sapsucker in a wooded park who had discovered that the metal sign on a metal post really amplified his sound! Drumming is also how they get food, of course. Not hard to tell when Pileateds have been around based on the size of the holes they leave. They tend to be VERY shy around humans, though, so good on you for having one come to visit!
Mike.