TL;DR
This paper presents a formal model and constraint programming implementation for generating tonal chord progressions and modulations, forming a crucial layer in a larger music composition tool. By leveraging constraint satisfaction, it aims to provide composers with more control and a structured approach to creating music, moving beyond limitations of purely data-driven or overly rigid rule-based systems.
What Problem Does This Paper Address?
Creating a practical tool for music composition that aids composers without stifling their creativity is a significant challenge. Existing approaches often fall into two camps: those that formalize specific musical aspects but lack generality, or those that model extensive music theory but require programming expertise to use. This paper tackles the problem of generating coherent and musically plausible chord progressions and modulations within tonal music, a fundamental aspect of Western classical and popular music. The authors aim to bridge the gap by providing a formal, constraint-based model that respects music theory while offering composers flexibility to express their musical ideas.
Methods
The core of this work is a formal model of tonal chord progressions and modulations implemented using Constraint Programming (CP). The model is built upon two key concepts: chord transitions and chord degrees within a tonality.
- Four-Layer Framework: The Harmoniser project, of which this paper is a part, decomposes music composition into four layers: global structure, chord progressions/modulations, voicing, and ornaments. This paper focuses on the second layer.
- Constraint Programming: The Gecode constraint solver is used to implement the model. This allows for declarative specification of musical rules, enabling the solver to find valid solutions.
- Formal Model: The model defines variables for chord roots, qualities, states, and degrees. It uses matrices (T, M, P, L) to encode a significant amount of tonal music theory, including accepted rules for chord successions and transitions.
- Modulation Modeling: Specific constraints are developed to handle transitions between different tonalities, distinguishing between perfect cadence, pivot chord, alteration, and chromatic modulations. These constraints ensure smooth and musically coherent shifts in harmony.
- Composer Input: The system allows composers to specify parameters like the number of chords, tonalities, and desired modulations. They can also add custom constraints to guide the generation process.
Datasets
Not discussed in the paper. The model relies on formal music theory rules rather than training data.
Key Insights and Ideas
- Constraint Programming as a Creative Partner: The paper demonstrates that CP can be a powerful tool for composers, acting as a "creative partner" that suggests possibilities while adhering to theoretical frameworks.
- Decomposition for Tractability: The four-layer approach is crucial for managing the complexity of music composition. By breaking down the problem, each layer becomes more manageable, leading to more efficient generation.
- Encoding Music Theory in Matrices: The use of transition matrices (T) and other matrices (M, P, L) to encode music theory rules is an elegant way to represent complex relationships concisely and allows for easier composer modification.
- Modulation as a Constraint Problem: Modeling modulations as a set of specific constraints, rather than just arbitrary jumps, ensures musical coherence and allows for different types of transitions to be explored systematically.
- Balancing Freedom and Structure: The model aims to provide a large search space of valid progressions, allowing composers to prune it with their specific preferences and constraints, thus balancing theoretical correctness with creative freedom.
Key Results
- Efficient Generation: The constraint-based model demonstrates high efficiency, with musical pieces of significant length (e.g., 28 chords with modulations) generated in milliseconds on modern hardware. This speed is attributed to the model's focus on satisfaction rather than optimization by default.
- Coherent Progressions and Modulations: The implemented model successfully generates musically plausible chord progressions and modulations that adhere to tonal music theory.
- Foundation for a Larger Tool: The generated output serves as input for the third layer (voicing), demonstrating the integrated nature of the Harmoniser project.
Limitations and Future Work
- Composer Subjectivity: The current model primarily focuses on theoretical correctness. Future work will involve incorporating composer-subjective constraints and preferences to guide the generation towards "better" solutions, potentially transforming the problem into an optimization task.
- Distant Modulations: The current focus is on modulations to neighboring tonalities. Extending the model to handle modulations to more distant keys is a planned future enhancement.
- Larger Harmonic Structures: Incorporating more complex harmonic structures like harmonic sequences is a direction for future research.
- User Interface and DAW Integration: The development of a graphical user interface and integration as a Digital Audio Workstation (DAW) plug-in is ongoing work to make the tool more accessible to composers.
- Efficiency for Optimization: While current satisfaction problems are solved quickly, optimization problems (finding the "best" solution based on composer criteria) will require more advanced techniques.
- More Chromaticism and Borrowed Chords: The model could be enriched by allowing for a wider range of chromatic and borrowed chords.
Summary updated