Whenever you have a concerning or unexplained medical problem you should schedule an appointment, or at least call your primary care physician
to be evaluated. Sometimes even minor symptoms can signal a serious medical problem, and early intervention can make a big difference in your overall treatment.
There are a number of potential causes of your hearing music when none is playing. Some causes are potentially benign, like tinnitus, although this is usually described as a high pitched, constant tone and is not usually variable the way music is. If you truly hear music it may be the result of a mental illness, however the fact that the music disappears when you try to listen for it makes this less likely. There are also neurologic causes of hearing music, such as epilepsy that originates in the temporal lobe of the brain. Some individuals with brain tumors experienced auditory hallucinations such as music, however brain tumors often cause other symptoms such as headache, blurry vision or impaired coordination.
It is difficult to tell which category your symptom falls into. You should call your primary care physician, or if you do not have one, go to an emergency room for an initial evaluation and a referral. Your doctor may want to get imaging of your brain and may refer you to other physicians, such as neurologists
and doctors who will test your hearing.