Music generation is an emerging field in artificial intelligence. It allows musicians and music lovers to compose music when they lack inspirations as well as to enjoy music in the style they desire. Existing projects like Magenta have successfully generated polyphony based on a given monophony. However, none has particularly focused on a two-line polyphony creation, or duet creation. Since the duet composition is a very common and useful practice for musicians, we intend to create an Artificial Intelligence that can transform one line of monophonic melody into a two-line polyphonic melody using Magenta’s Polyphony RNN Generator and Q-learning. It takes in one line of music without accompanying chords, creates another monophonic melody that harmonizes with the input melody, and eventually outputs the resulting combined polyphonic melody. By doing this, we aim to provide one elementary solution to the problem of automatic music creation.

The following video showcases the original monophonic piece of music and the polyphonic piece generated by our AI.

If you are interested in the specific techniques we used during the project, please refer to the repository.