How does music affect your mood?

By the feeling of the music, it changes your moods, if it is sad and grey, your feelings can turn the same, triggering memories aswell.