The Root of the Behavior
Why do dogs do this? As with most dog behavior, it is very complex to pin things down to just one singular answer. But there are several logical explanations behind why our dogs love singalongs.
Though they cannot speak in words, dogs are expert communicators. One theory suggests that dogs howl along with music as a means of pure canine expression. It is possible that many of the sounds involved in the production of music are reminiscent of other familiar sounds for our dogs. Perhaps your piccolo playing reminds him of the barking of the neighbor's pretty poodle Fifi, and he feels inspired to joyously howl his response. Particularly high-pitched noises such as fire alarms, police car sirens, and even the scream of the Emergency Broadcast System test on the TV are enough to elicit a symphony of howls from our beloved pets.
Why? Although these noises sound nothing like a dog to us, to our beloved pets; many of them are similar to the howls, barks, whines, and cries that their fellow canine members produce, and they are compelled to respond in kind. If you've ever stood out on your back porch on a warm, summer evening and heard a lone dog howling in the distance, you know that it is only a matter of time before the dog finds himself engulfed in a chorus of echoing howls from dogs throughout the neighborhood. If you can't beat them join them, seems to be our dogs' mantra when it comes to their response to music.
Encouraging the Behavior
There are other explanations for this unique canine behavior. One such reason finds its roots in our dogs' ancient origins. When dogs were animals in the wild, it was necessary for them to use a wide range of vocalizations to communicate with each other. High pitches were more capable of carrying further distances which was necessary to allow other members of the dog pack to source the position of each member of their canine family. The howl of a wild dog was a call to return to common ground. This call always resulted in reciprocal howls from each pack member. With this in mind, it is highly possible that our dogs mistake the tinkling of the ivories in our living room for the ancient howl of a lone dog in the wilderness, and they instinctively respond with a "tune" of their own. It is a response to a natural impulse still alive today in our domesticated canine friends.
Though these are both plausible theories, it is possible that some dogs respond with shrieks to our musical efforts because they are experiencing pain. However, this is far less likely than other options for the behavior. In general, when our canine companions are suffering with pain, they opt to hide rather than howl. Most vocalizations as a response to an injury or illness are very different in scope to the response we see from our pets to music. When in pain, an animal will whine or softly cry as opposed to letting loose with an enthusiastic series of shrieks or barks.
Another possibility is that your dog's howling along to tunes is simply a coincidence. If there is an established pattern of vocalization to a particular piece of music or the playing of an instrument, this is likely not the case. But if the howling persists long after the music has ended, your dog might be "singing along" to something entirely different than the music you are producing.
Of course, there is always the chance that Fido really doesn't like your taste in music. Prominent psychologist Dr. Deborah Wells conducted a study on dogs and music in a local animal shelter in Belfast, Ireland. The results of this study indicated that dogs do indeed have musical preferences as do their human counterparts.
Other Solutions and Considerations
Thankfully, if eliminating the trigger is not an option, you could begin to desensitize your dog to the music to which he likes to "contribute". Desensitization is a long process of slowly introducing your dog to the music that elicits the response and rewarding with a food or toy reward or even praise for calm, quiet behavior. With much love, patience, and dedication, it is possible to teach your dog that it's okay to just listen to the music without having to participate. A professional dog trainer can also assist with this process.