TL;DR
ALYSIA is a machine learning-based songwriting partner that uses Random Forests to generate melodies for user-provided lyrics. By moving beyond traditional Markov chains to incorporate both musical and linguistic context, it achieves high accuracy in predicting rhythm and pitch, enabling a co-creative workflow that has already produced professional-quality pop songs.
What Problem Does This Paper Address?
While modern Digital Audio Workstations (DAWs) like Logic Pro or GarageBand have democratized music production, the core act of composition—specifically the juxtaposition of original lyrics and melody—remains a high barrier to entry.
Existing algorithmic songwriting systems often struggle with "phrase structure." Many rely on Markov chains, which are excellent at predicting the next note in a sequence but often fail to capture the "why" behind a musical choice. They lack the context of the underlying lyrics and the broader musical structure, often resulting in melodies that feel aimless or disconnected from the text. The authors aim to create a system that understands the complex relationship between words and music, making songwriting accessible to those who may have poetic talent but lack formal compositional training.
Methods
The authors introduce ALYSIA (Automated LYrical SongwrIting Application), which departs from the standard Markov chain approach in favor of Random Forests.
The system utilizes a two-stage prediction pipeline:
- Rhythm Model: Predicts note duration based on musical and lyrical features.
- Melody Model: Predicts the scale degree (pitch) of the note, using the output of the rhythm model as additional context.
ALYSIA is "genre-independent" because it doesn't rely on hard-coded musical rules (like "avoid large leaps"). Instead, it learns these patterns directly from a corpus. The authors engineered 59 distinct features, including:
- Musical Context: Key signature, time signature, and the properties of the previous five notes.
- Lyrical Context: Syllable position within a word, word frequency (using the Brown corpus), and vowel strength (using CMUDict).
A key feature of ALYSIA is the Explore/Exploit parameter, which allows users to tune the system. A high "exploit" setting favors the most probable notes for a conventional sound, while a high "explore" setting allows for more experimental, varied melodic lines.
Datasets
The model was trained on a custom corpus of 24 pop songs converted into Music-XML (MXL) format. This resulted in 12,358 observations. The data was split using stratified sampling, with 75% used for training and 25% for evaluation. The authors note that MXL files containing both melody and lyrics are significantly harder to acquire than raw audio files, which limited the initial dataset size.
Key Insights and Ideas
- Context Over Sequence: The shift to Random Forests allows the model to consider non-linear combinations of features. For example, a specific note might be common in C-major but rare in F#-major; Random Forests capture this contextual "why" better than simple transition probabilities.
- The Power of Beat Strength: Feature importance analysis revealed that "beat strength" is the most influential factor for rhythm prediction. This suggests that data-driven models can capture the fundamental pulse of a genre more effectively than rule-based systems.
- Lyrical Influence: Lyrical features like word rarity and vowel strength play a measurable role in melodic choice, validating the authors' premise that lyrics and melody are deeply intertwined.
- Co-Creativity vs. Autonomy: While ALYSIA can function autonomously, the authors advocate for a "co-creative" process. By generating 15–30 variations per line, the system allows a human creator to select melodies that best match the emotional intent of the lyrics (e.g., choosing a lower-pitched melody for the phrase "went wrong").
Key Results
ALYSIA demonstrated strong predictive performance on the test set:
- Rhythm Accuracy: 86.79%
- Melody (Scale Degree) Accuracy: 72.28%
The importance plots highlight that the previous five notes are critical for melody, while beat strength dominates rhythm.
Qualitatively, the system was used to produce three complete songs. Notably, the song Everywhere was composed from start to finish in only two hours, demonstrating the efficiency of the co-creative workflow.
Limitations and Future Work
The primary limitation acknowledged is the size of the training corpus, due to the difficulty of obtaining high-quality MXL files with lyrics. The current system also lacks the ability to automate chord progressions to accompany the generated melodies.
Future directions include:
- Scaling up the corpus to transition from Random Forests to Neural Networks.
- Automating the generation of underlying harmony/chords.
- Testing the system on diverse genres, such as classical Italian arias in the style of Puccini.
- Conducting formal user studies to evaluate the perceived quality of AI-assisted songs compared to fully human-composed works.
Summary updated