Baroque music
When a soloist in an opera sings a song (an aria) the aria is in a particular mood. They called this “affection”. There were several “affections” or moods: there were arias about revenge, jealousy, anger, love, despair, peaceful happiness etc. Each movement in a concerto also had one particular mood. Music from later periods is different. For example: Haydn in the Classical Period would often change its mood during a piece.