[Paper Review] Algorithmic Composition of Melodies with Deep Recurrent Neural Networks
This paper proposes a deep recurrent neural network using gated recurrent units (GRUs) to generate coherent monophonic melodies by learning long-range temporal dependencies from a large corpus of Irish folk songs. Trained on normalized pitch and duration sequences, the model generates musically plausible continuations of partial melodies and fully autonomous compositions that preserve rhythmic patterns, tonal structure, and stylistic features without explicit rules or prior musical knowledge.
A big challenge in algorithmic composition is to devise a model that is both easily trainable and able to reproduce the long-range temporal dependencies typical of music. Here we investigate how artificial neural networks can be trained on a large corpus of melodies and turned into automated music composers able to generate new melodies coherent with the style they have been trained on. We employ gated recurrent unit networks that have been shown to be particularly efficient in learning complex sequential activations with arbitrary long time lags. Our model processes rhythm and melody in parallel while modeling the relation between these two features. Using such an approach, we were able to generate interesting complete melodies or suggest possible continuations of a melody fragment that is coherent with the characteristics of the fragment itself.
Motivation & Objective
- To develop a machine learning model capable of generating musically coherent melodies that capture long-range temporal dependencies in music.
- To overcome the limitations of Markov models and simple RNNs in modeling complex musical structures such as repeated patterns and modulations.
- To train a deep recurrent neural network on a large, real-world dataset of Irish folk songs to learn stylistic features automatically from data.
- To evaluate the model's ability to generate novel, complete melodies and to suggest plausible continuations of partial melodies.
- To demonstrate that GRU-based RNNs can effectively model both pitch and duration in parallel, preserving rhythmic and tonal coherence.
Proposed method
- Represents melodies as sequences of one-hot encoded pitch and duration vectors, normalized to C major/A minor and relative durations.
- Employs a deep multi-layer gated recurrent unit (GRU) network to model sequential dependencies in the melody data.
- Trains the network using backpropagation through time with stochastic gradient descent to minimize prediction error on next-note sequences.
- Uses the trained model for generation by autoregressively sampling from output probability distributions, starting from a seed note.
- Applies temperature sampling during inference to control randomness and diversity in generated melodies.
- Evaluates generation quality both qualitatively (via listening and structural analysis) and quantitatively using held-out test data likelihood.
Experimental results
Research questions
- RQ1Can a deep GRU-based RNN learn and reproduce long-range rhythmic and melodic patterns in monophonic music?
- RQ2To what extent can the model generate novel, coherent melodies that are stylistically consistent with the training data?
- RQ3How well does the model generalize to melody continuation tasks, preserving both rhythmic and tonal structure?
- RQ4Can the model capture hierarchical musical structures such as repeated patterns and temporary modulations without explicit architectural or rule-based guidance?
- RQ5How does the model's performance compare to simpler models like Markov chains or LSTM-based approaches in capturing musical coherence?
Key findings
- The GRU-based model successfully learned and reproduced complex rhythmic patterns, such as the four-part structure in 'Brother John', which are not captured by local Markov models.
- The model generated novel melodies that were perceived as coherent and musically pleasant, with recognizable structural elements like repeated motifs and temporary modulations.
- In melody continuation tasks, the model produced variations that preserved the rhythmic and tonal characteristics of the input seed, including alternation between tonic and dominant areas.
- The model achieved high likelihood on held-out test data, indicating strong generalization to unseen melodies from the same style.
- The model autonomously generated complete songs with consistent metrical structure and tonal coherence, even without explicit time signature modeling.
- The model demonstrated the ability to learn and reproduce hierarchical musical structures such as repeated patterns and phrase-level cadences from raw data alone.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.