Can't get that infectious new Taylor Swift song out of your head? Chew gum.

Earworms, obsessive melodies that replay in neverending loops inside your head, are frustrating and experienced by more than 99 percent of individuals. Researchers at the University of Reading found that chewing gum is the best way to block these tunes.

The auditory cortex, the part of the brain that processes sound, is triggered when people hear a song. Therefore when they hear a familiar tune again, their mind fills in the rest repeatedly. Researcher Philip Beaman said this suggests that tune wedgies "may be a form of involuntary musical memory."

Beaman believes the act of gum-chewing is very similar to irrelevant sub-vocalisation, which has proved to degrade short term memory performance as well as auditory images.

For the study, Beaman and his colleagues carried out three separate experiments, in which participants were exposed to catchy tunes while either chewing or not chewing gum.

In the first experiment, researchers evaluated the effect of bubble-gum on the conscious appearance of musical images, as well as the recurrence of earworms once attempts to suppress them had ceased. The second experiment looked at the actual "hearing" of music in participants' heads, also demonstrated the reducing effect of gum-chewing upon the music-hearing phenomenon. Last but not the least, Experiment 3 was designed to assess whether the effects of gum were common to any kind of motor activity, or specific to the speech articulators only; to this end, partakers were asked to either chew some gum or tap with their fingers at the beat of a novel melody.

Based on their findings, researchers concluded that chewing gum interferes with the experience of hearing musical recollections therefore can be recommended as an aid to get rid of earworms.

The results are detailed in The Quarterly Journal of Experimental Psychology.