Skip to content

CatalinVoss/music-morph

Repository files navigation

Reinforcement learning DJ

We model musical composition as a reinforce- ment learning (RL) problem in which an agent can choose as an action to add or subtract sets of repeated notes of various pitches from a discrete length melody. We reward an agent for creat- ing bars of music that are close to a corpus of human-generated MIDI music. We utilize deep- Q-learning. Our resulting compositions contain diverse harmonies and inherent global structure by construction. We describe how our approach can be integrated into a real time composition work- flow in which the RL agent and human composer take actions on a virtual “launchpad” instrument together to produce a longer, coherent song.

DQN code adapted from Stanford's CS 234 Assignment 2.