This paper discusses solutions for generating melodies in the context of a system that intends to produce music with a specified emotional content. The research sets up from an existing system, which produces music by manipulating and combining MIDI music. We aim to analize the benefit from using automatic music composition techniques in order to improve musical quality, while conforming with the desired emotional content. We considered Neural Networks and Cellular Automata for the task.