Why do humans find music (melody, harmony, rhythm) pleasant?
Music's ability to elicit pleasure is a complex phenomenon that's still not fully understood and is likely the result of a combination of biological, psychological, and cultural factors. Here are some theories:

1. **Cognitive Processing**: Some theories propose that the pleasure we derive from music is related to the cognitive processing involved in anticipating and recognizing patterns in the music, such as melody, harmony, and rhythm. Successfully predicting musical patterns or being pleasantly surprised by an unexpected musical event can evoke a sense of satisfaction and enjoyment.

2. **Emotional Responses**: Music can evoke a wide range of emotions, from joy to sadness. This emotional engagement can be a significant source of pleasure. Importantly, even music that evokes what might be considered negative emotions, like sadness, can bring pleasure due to the feelings of empathy or the beauty of the music.

3. **Biological Reward Systems**: Research has shown that listening to music can activate the brain's reward system, including the release of dopamine, a neurotransmitter associated with pleasure and reward. This is similar to the brain's response to other pleasurable stimuli, such as food or sex.

4. **Cultural and Personal Associations**: The cultural context of music and personal associations can greatly influence our enjoyment of it. Music associated with positive memories or experiences can bring pleasure when heard again.

5. **Social Bonding**: Music often has a social aspect and can promote feelings of belonging and shared emotional experiences, which can be pleasurable. Singing or playing music in a group can promote social bonding and cooperation.

6. **Physiological Responses**: Music with a strong beat can stimulate our body's natural rhythms (like heart rate), leading to increased arousal and pleasure. 

7. **Aesthetic Appreciation**: Just as people find pleasure in viewing beautiful works of art, the aesthetic qualities of music – its beauty, skill, and creativity – can be deeply satisfying and pleasurable.

These are broad reasons and can vary greatly among individuals. For example, some people may have strong emotional responses to music, while others may derive more pleasure from the intellectual challenge of understanding complex musical compositions.
Please tell me more about how anticipating and recognizing patterns in music work. How do we even know this is the case?
According to research, recognizing patterns in music is a fundamental aspect of how the human mind structures its complex environment. Patterns in music generate expectations as to what course the music will follow, and recognizing these patterns is an important skill that helps facilitate learning new music, sight reading, visualization, and memorization. 

Musical patterns are not simply repetition but one kind of regular alteration of repetition and change. 

Expectations are aroused as a result of patterns. Anticipation means playing a note ahead of the beat it's written on in syncopation, which is often used in popular music to enhance the beat and rhythm. 

Identifying patterns in music gives an advantage when learning a new piece, as understanding that an 8-measure phrase has 3 repeating measures helps simplify learning. 

Musicians and listeners recognize patterns of music differently, but recognizing the content by the pattern of the music affects our emotion. 

Researchers have studied the mechanism that forms the pattern recognition of music and the experience, and various cognitive systems are at work in this recognition of a piece of music and its patterns