Music has been used to evoke emotions for centuries. The mechanisms underlying this effect have remained largely unclear. This thesis contributes to research on how music evokes emotions by investigating two mechanisms from the model of Juslin and Västfjäll (2008) - musical expectancy and emotional contagion. In the perception studies the focus is on how musical expectancy violations are detected by either musically trained or untrained individuals. In the music-making studies, we concentrate on mood change brought about by cheerful music in healthy and depressed individuals and factors which could modulate this change like personality, musical preference and general emotional state. The results indicate that the subtlest scale violations are detected at the level of brain electrical potential while the task remains behaviourally difficult. This suggests that scale information is processed using music-syntactic analysis and in memory existing representations of tonal hierarchies, instead of auditory sensory memory as previously believed. Music-making decreased anxiety, depression and fatigue in both depressed and healthy participants whereas arousal and positive mood increased. This suggests that musicmaking could be beneficial for depressed individuals in terms of improving their mood on a short-term basis, even though a reliable music-related decrease of depression symptoms was not found. Among healthy participants, intraversion, openness to experience, agreeableness, musical training and liking of the music predicted positive changes in mood following a music-making session. Taken together, these studies indicate that subtle musical scale violations are detected even if they are not consciously perceived as deviants and could therefore be used to evoke emotions, and music-making improves the mood in both healthy and depressed individuals and could serve as a temporary relief in case of depression.