Towards a Practical Tool for Music Composition: Using Constraint Programming to Model Chord Progressions and Modulations

Towards a Practical Tool for Music Composition: Using Constraint Programming to Model Chord Progressions and Modulations

Damien Sprockeels, Peter Van Roy

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence
AI, Arts & Creativity. Pages 10171-10179. https://doi.org/10.24963/ijcai.2025/1130

The Harmoniser project aims to provide a practical tool to aid music composers in creating complete musical works. In this paper, we present a formal model of its second layer, tonal chord progressions and modulations to neighbouring tonalities, and a practical implementation using the Gecode constraint solver. Since music composition is too complex to formalize in its entirety, the Harmoniser project makes two assumptions for tractability: first, it focuses on tonal music (the basis of Western classical and popular music); second, it defines a simplified four-layer composition process that is relevant for a significant number of composers. Previous work on using constraint programming for music composition was limited to exploring the formalisation of different musical aspects and did not address the overall problem of building a practical composer tool. Harmoniser's four layers are global structure (tonal development of the whole piece), chord progressions (diatonic and chromatic) and modulations, voicing (four-voice chord layout), and ornaments (e.g., passing notes, appoggiaturas), all allowing iterative refinement by the composer. This paper builds on prior work for voicing layer 3, Diatony, and presents a model for layer 2, chord progressions and modulations. The results of the present paper can be used as input to Diatony to generate voicing. Future work will define models for the remaining layers, and combine all layers together with a graphical user interface as a plug-in for a DAW.
Keywords:
Application domains: Music and sound
Application domains: Problem Solving
Methods and resources: AI systems for ideation
Application domains: Science, math and programming
Methods and resources: Applications and software frameworks
Methods and resources: Techniques for modeling and simulation of creativity