TL;DR
This paper applies natural language processing (NLP) techniques, specifically n-grams, to model and generate harmonic movement in 17th-century French dance music (sarabandes). By preprocessing the music into a normalized harmonic representation and annotating structural elements like phrases and bars, the authors demonstrate that statistical learning can capture musical style and generate new pieces that are stylistically plausible.
What Problem Does This Paper Address?
The authors aim to bridge the gap between music and language processing by exploring whether statistical techniques, successful in NLP, can be effectively applied to model and generate musical structures. Specifically, they focus on capturing and generalizing the "harmonic movement" – the progression of chords – within a corpus of 17th-century dance music. The challenge lies in representing complex musical data in a way that statistical models can learn from, and then using these learned models to create new music that adheres to the learned style. They also aim to test the adequacy of these automated methods for musical tasks.
Methods
The core methodology involves applying n-gram models, a standard technique in NLP, to sequences of musical harmonies. The process includes:
- Corpus Preprocessing:
- Normalization: Harmonies are converted into a "normal form" (Root Position Form - RPF) to capture underlying similarities and reduce variation. This involves steps like removing doubled notes, completing incomplete triads, simplifying seventh chords, and resolving dissonances.
- Scale-Degree Representation: Pitches are represented relative to the tonic of the piece to remove key-specific differences and focus on relative harmonic relationships.
- Harmony Sampling: Harmonies are sampled at regular intervals (quaver-length) to create discrete units for analysis.
- Annotation: The musical pieces are annotated with structural markers, including:
- Piece Boundaries: Start and end of each piece.
- Phrase Boundaries: Indicating the end of musical phrases (often marked by cadences).
- Bar Boundaries: Marking the end of each bar.
- Numbered Phrases: To capture context-dependent phrase behavior and key progressions.
- N-gram Learning: Trigrams (3-grams) and 4-grams are trained on the preprocessed and annotated corpus to learn the probabilities of harmonic sequences.
- Generation: New musical sequences are generated using the learned n-gram probabilities. Two methods are explored:
- Unconstrained Generation: Generates sequences based on n-gram probabilities until an end symbol is encountered.
- Template-Based Generation: Uses a template derived from the annotation structure to guide the generation of pieces with specific lengths and phrase structures. This method involves a "generate and test" approach where generated sequences are checked against the template.
Datasets
The primary dataset used is a corpus of 84 seventeenth-century French sarabandes. This corpus was specifically compiled for this research. The paper also references the use of large corpora in NLP (e.g., million-word corpora) for comparison.
Key Insights and Ideas
- Music as a Language: The paper strongly posits that music can be treated as a language, with harmonies as symbols and harmonic progressions as grammatical rules. This perspective justifies the application of NLP techniques.
- Normalization is Key: Converting harmonies to a normalized form (RPF) is crucial for reducing noise and revealing underlying harmonic similarities, making the data more amenable to statistical learning.
- Structure Matters: Simple n-grams alone are insufficient. Annotating structural elements like phrases and bars is essential for capturing higher-level musical structure and generating more plausible compositions.
- Context is Crucial for Cadences: The ability to learn and generate convincing cadences (musical endings) is directly related to the context window size (n in n-grams). 4-grams, with their larger context, show a better potential for capturing these crucial musical events.
- Trade-off Between Sparsity and Context: Increasing the context (larger n) or adding detailed annotation (like numbered phrases) makes the data sparser, requiring larger corpora to maintain statistical significance.
Key Results
- The system successfully generated sequences of harmonies that were judged subjectively to resemble the style of the training corpus.
- Experiments showed that annotation significantly improved the quality of generated music, particularly when capturing structural elements like phrases and bars.
- Numbered phrase annotation was found to be more effective than general phrase markers for guiding key progressions.
- 4-grams generally captured more context than 3-grams, leading to better results, especially when combined with annotation. However, even 4-grams sometimes struggled with complex structures like perfect cadences due to limited context.
- The paper highlights that piece length is a significant issue for probability comparisons, as shorter strings are unfairly favored. They propose a geometric mean approach to address this.
- The number of learned n-gram parameters varied significantly between normalized (RPF) and non-normalized input, demonstrating the impact of preprocessing. For example, for major-key pieces, RPF resulted in 1060 trigrams, while non-RPF had 3758.
Limitations and Future Work
- Limited Context: Even with 4-grams, the context is still limited, leading to occasional weak cadences or uncharacteristic modulations (enharmony).
- Piece Length Bias: The probability calculation is biased towards shorter strings, making direct comparison of generated pieces of different lengths problematic.
- Unconverted Harmonies: Some complex harmonies could not be converted to RPF, requiring the introduction of non-standard symbols.
- No Bass Line Modeling: The current model focuses solely on harmony, omitting the bass line, which was historically important.
- Future Work:
- Developing more general normal forms that include sevenths and other non-triads.
- Improving cadence-finding heuristics for variable phrase lengths.
- Developing more sophisticated annotation (e.g., numbered bars) and increasing corpus size to compensate for data sparsity.
- Adding bass line modeling to create a more complete musical representation.
- Addressing the length bias in probability calculations more effectively.
- Investigating smoothing techniques or Hidden Markov Models (HMMs) for better handling of sparse data.
Summary updated