  Automatic music generation systems have gained in popularity and
sophistication as advances in cloud computing have enabled large-scale complex
computations such as deep models and optimization algorithms on personal
devices. Yet, they still face an important challenge, that of long-term
structure, which is key to conveying a sense of musical coherence. We present
the MorpheuS music generation system designed to tackle this problem. MorpheuS'
novel framework has the ability to generate polyphonic pieces with a given
tension profile and long- and short-term repeated pattern structures. A
mathematical model for tonal tension quantifies the tension profile and
state-of-the-art pattern detection algorithms extract repeated patterns in a
template piece. An efficient optimization metaheuristic, variable neighborhood
search, generates music by assigning pitches that best fit the prescribed
tension profile to the template rhythm while hard constraining long-term
structure through the detected patterns. This ability to generate affective
music with specific tension profile and long-term structure is particularly
useful in a game or film music context. Music generated by the MorpheuS system
has been performed live in concerts.
